Explorar o código

Vitepress: Fix links, typos (#228)

* fix old invalid links,fix zh/net.http, typos, img links

* fix links
Willaaaaaaa hai 6 meses
pai
achega
f3e9cd8e22

+ 1 - 1
docs/api/description/configuration-option.md

@@ -23,7 +23,7 @@ option("test2")
 ```
 
 :::tip NOTE
-The `option` field can be repeatedly entered to implement separate settings. If you want to display the scope settings away from the current option, you can manually call the [option_end](#_end) interface.
+The `option` field can be repeatedly entered to implement separate settings. If you want to display the scope settings away from the current option, you can manually call the [option_end](#option-end) interface.
 :::
 
 ## option

+ 1 - 1
docs/api/description/global-interfaces.md

@@ -165,7 +165,7 @@ The builtin modules are placed in the 'xmake/modules' directory, but for user-de
 ```lua
 add_moduledirs("$(projectdir)/modules")
 ```
-xmake will load the given module in the given directory when calling `import`.
+xmake will load the given module in the given directory when calling [`import`](/api/scripts/builtin-modules/import).
 
 ## add_plugindirs
 

+ 2 - 2
docs/api/description/package-dependencies.md

@@ -130,7 +130,7 @@ add_urls("https://github.com/madler/zlib/archive/$(version).tar.gz", {
 
 - Add package versions
 
-Used to set the version of each source package and the corresponding sha256 value, as described in [add_urls](#packageadd_urls)
+Used to set the version of each source package and the corresponding sha256 value, as described in [add_urls](#add_urls)
 
 ## add_versionfiles
 
@@ -226,7 +226,7 @@ package("libpng")
 
 Add a dependent system frameworks link.
 
-See for example: [add_syslinks](#packageadd_syslinks)
+See for example: [add_syslinks](#add_syslinks)
 
 ## add_linkdirs
 

+ 8 - 8
docs/api/description/project-target.md

@@ -294,7 +294,7 @@ $ xmake install [-a|--all]
 
 ### Set configuration options
 
-Add option dependencies. If you have customized some options through the [option](#option) interface, you can add associations only if you specify this option under the target target field.
+Add option dependencies. If you have customized some options through the [option](/api/description/configuration-option#option) interface, you can add associations only if you specify this option under the target target field.
 
 ```lua
 -- Define a hello option
@@ -309,7 +309,7 @@ target("test")
 ```
 
 :::tip NOTE
-Some settings defined in [option](#option) will affect this `target` target only after calling `set_options` for the association to take effect, such as macro definitions, link libraries, compile options, etc.
+Some settings defined in [option](/api/description/configuration-option#option) will affect this `target` target only after calling `set_options` for the association to take effect, such as macro definitions, link libraries, compile options, etc.
 :::
 
 ## set_symbols
@@ -3142,7 +3142,7 @@ target("test6")
 
 The effect of the generated VS project directory structure is as follows:
 
-![](https://xmake.io/assets/img/manual/set_group.png)
+![](/assets/img/manual/set_group.png)
 
 For more details, please see: [#1026](https://github.com/xmake-io/xmake/issues/1026)
 
@@ -3207,7 +3207,7 @@ target("test")
     add_files("... /... /... /... /src/**.cpp")
 ```
 
-![](https://xmake.io/assets/img/manual/filegroup1.png)
+![](/assets/img/manual/filegroup1.png)
 
 Two main presentation modes are currently supported.
 
@@ -3225,7 +3225,7 @@ target("test")
     add_filegroups("group1/group2", {rootdir = "... /... /... /... /"})
 ```
 
-![](https://xmake.io/assets/img/manual/filegroup2.png)
+![](/assets/img/manual/filegroup2.png)
 
 
 #### Set the group and specifies the file matching pattern
@@ -3248,7 +3248,7 @@ target("test")
     add_filegroups("group1/group2", {rootdir = "... /... /... /... /", mode = "plain"})
 ```
 
-![](https://xmake.io/assets/img/manual/filegroup3.png)
+![](/assets/img/manual/filegroup3.png)
 
 ## set_exceptions
 
@@ -3460,11 +3460,11 @@ running tests ...
 80% tests passed, 7 tests failed out of 36, spent 0.242s
 ```
 
-![](https://xmake.io/assets/img/manual/xmake-test1.png)
+![](/assets/img/manual/xmake-test1.png)
 
 We can also execute `xmake test -vD` to view detailed test failure error messages:
 
-![](https://xmake.io/assets/img/manual/xmake-test2.png)
+![](/assets/img/manual/xmake-test2.png)
 
 #### Run the specified test target
 

+ 22 - 22
docs/api/scripts/extension-modules/core/language/language.md

@@ -11,13 +11,13 @@ The results are as follows:
 
 ```lua
 {
-     [".c"] = cc
-,    [".cc"] = cxx
-,    [".cpp"] = cxx
-,    [".m"] = mm
-,    [".mm"] = mxx
-,    [".swift"] = sc
-,    [".go"] = gc
+    [".c"] = cc,
+    [".cc"] = cxx,
+    [".cpp"] = cxx,
+    [".m"] = mm,
+    [".mm"] = mxx,
+    [".swift"] = sc,
+    [".go"] = gc
 }
 ```
 
@@ -29,9 +29,9 @@ The results are as follows:
 
 ```lua
 {
-     binary = {"ld", "gcld", "dcld"}
-,    static = {"ar", "gcar", "dcar"}
-,    shared = {"sh", "dcsh"}
+    binary = {"ld", "gcld", "dcld"},
+    static = {"ar", "gcar", "dcar"},
+    shared = {"sh", "dcsh"}
 }
 ```
 
@@ -43,15 +43,15 @@ The results are as follows:
 
 ```lua
 {
-     cc = ".c"
-,    cxx = {".cc", ".cpp", ".cxx"}
-,    mm = ".m"
-,    mxx = ".mm"
-,    sc = ".swift"
-,    gc = ".go"
-,    rc = ".rs"
-,    dc = ".d"
-,    as = {".s", ".S", ".asm"}
+    cc = ".c",
+    cxx = {".cc", ".cpp", ".cxx"},
+    mm = ".m",
+    mxx = ".mm",
+    sc = ".swift",
+    gc = ".go",
+    rc = ".rs",
+    dc = ".d",
+    as = {".s", ".S", ".asm"}
 }
 ```
 
@@ -63,9 +63,9 @@ The results are as follows:
 
 ```lua
 {
-     cc = {"cflags", "cxflags"}
-,    cxx = {"cxxflags", "cxflags"}
-,    ...
+    cc = {"cflags", "cxflags"},
+    cxx = {"cxxflags", "cxflags"},
+    ...
 }
 ```
 

+ 1 - 1
docs/api/scripts/native-modules.md

@@ -159,4 +159,4 @@ bar: 1 + 1 = 2
 
 Through the new native module feature, we can also use it to implement auto-codegen, and then continue to execute the subsequent compilation process based on the automatically generated code.
 
-There is also a complete example here for reference: [autogen_shared_module](https://github.com/xmake-io/xmake/tree/master/tests/projects/other/autogen_shared_module).
+There is also a complete example here for reference: [autogen_shared_module](https://github.com/xmake-io/xmake/tree/master/tests/projects/other/autogen/autogen_shared_module).

+ 1 - 1
docs/guide/introduction.md

@@ -6,7 +6,7 @@ Xmake is a lightweight cross-platform build utility based on Lua. It uses a Lua
 
 Xmake can be used to directly build source code (like with Make or Ninja), or it can generate project source files like CMake or Meson. It also has a *built-in* package management system to help users integrate C/C++ dependencies.
 
-If you want to know more, please refer to: the [Documentation](/guide/introduction.html), [GitHub](https://github.com/xmake-io/xmake) or [Gitee](https://gitee.com/tboox/xmake).
+If you want to know more, please refer to: the [Documentation](/guide/quick-start.html), [GitHub](https://github.com/xmake-io/xmake) or [Gitee](https://gitee.com/tboox/xmake).
 You are also welcome to join our [community](/about/contact.html).
 
 ![](/assets/img/index/xmake-basic-render.gif)

+ 1 - 1
docs/zh/api/description/configuration-option.md

@@ -23,7 +23,7 @@ option("test2")
 ```
 
 :::tip 注意
-`option`域是可以重复进入来实现分离设置的,如果要显示离开当前选项的作用域设置,可以手动调用[option_end](#_end)接口。
+`option`域是可以重复进入来实现分离设置的,如果要显示离开当前选项的作用域设置,可以手动调用[option_end](#option-end)接口。
 :::
 
 

+ 1 - 1
docs/zh/api/description/global-interfaces.md

@@ -164,7 +164,7 @@ set_xmakever("2.1.0")
 
 ### 添加模块目录
 
-xmake内置的扩展模块都在`xmake/modules`目录下,可通过[import](#import)来导入他们,如果自己在工程里面实现了一些扩展模块,
+xmake内置的扩展模块都在`xmake/modules`目录下,可通过[import](/zh/api/scripts/builtin-modules/import)来导入他们,如果自己在工程里面实现了一些扩展模块,
 可以放置在这个接口指定的目录下,import也就会能找到,并且优先进行导入。
 
 ## add_plugindirs

+ 2 - 2
docs/zh/api/description/package-dependencies.md

@@ -126,7 +126,7 @@ add_urls("https://github.com/madler/zlib/archive/$(version).tar.gz", {
 
 - 设置每个源码包的版本
 
-它也会设置对应的sha256值,具体描述见:[add_urls](#packageadd_urls)
+它也会设置对应的sha256值,具体描述见:[add_urls](#add_urls)
 
 ## add_versionfiles
 
@@ -220,7 +220,7 @@ package("libpng")
 
 - 添加依赖的系统 frameworks 链接
 
-示例见:[add_syslinks](#packageadd_syslinks)
+示例见:[add_syslinks](#add_syslinks)
 
 ## add_linkdirs
 

+ 8 - 8
docs/zh/api/description/project-target.md

@@ -293,7 +293,7 @@ $ xmake install [-a|--all]
 
 ### 设置关联选项
 
-添加选项依赖,如果通过[option](#option)接口自定义了一些选项,那么只有在指定`target`目标域下,添加此选项,才能进行关联生效。
+添加选项依赖,如果通过[option](/zh/api/description/configuration-option#option)接口自定义了一些选项,那么只有在指定`target`目标域下,添加此选项,才能进行关联生效。
 
 ```lua
 -- 定义一个hello选项
@@ -308,7 +308,7 @@ target("test")
 ```
 
 :::tip WARN
-只有调用`set_options`进行关联生效后,[option](#option) 中定义的一些设置才会影响到此`target`目标,例如:宏定义、链接库、编译选项等等
+只有调用`set_options`进行关联生效后,[option](/zh/api/description/configuration-option#option) 中定义的一些设置才会影响到此`target`目标,例如:宏定义、链接库、编译选项等等
 :::
 
 ## set_symbols
@@ -3135,7 +3135,7 @@ target("test6")
 
 生成的 vs 工程目录结构效果如下:
 
-![](https://xmake.io/assets/img/manual/set_group.png)
+![](/assets/img/manual/set_group.png)
 
 其中 `set_group("group1/group2")` 可以将 target 设置到二级分组中去。
 
@@ -3202,7 +3202,7 @@ target("test")
     add_files("../../../../src/**.cpp")
 ```
 
-![](https://xmake.io/assets/img/manual/filegroup1.png)
+![](/assets/img/manual/filegroup1.png)
 
 目前主要支持两种展示模式:
 
@@ -3220,7 +3220,7 @@ target("test")
     add_filegroups("group1/group2", {rootdir = "../../../../"})
 ```
 
-![](https://xmake.io/assets/img/manual/filegroup2.png)
+![](/assets/img/manual/filegroup2.png)
 
 
 #### 设置分组并指定文件匹配模式
@@ -3243,7 +3243,7 @@ target("test")
     add_filegroups("group1/group2", {rootdir = "../../../../", mode = "plain"})
 ```
 
-![](https://xmake.io/assets/img/manual/filegroup3.png)
+![](/assets/img/manual/filegroup3.png)
 
 ## set_exceptions
 
@@ -3455,11 +3455,11 @@ running tests ...
 80% tests passed, 7 tests failed out of 36, spent 0.242s
 ```
 
-![](https://xmake.io/assets/img/manual/xmake-test1.png)
+![](/assets/img/manual/xmake-test1.png)
 
 我们也可以执行 `xmake test -vD` 查看详细的测试失败的错误信息:
 
-![](https://xmake.io/assets/img/manual/xmake-test2.png)
+![](/assets/img/manual/xmake-test2.png)
 
 #### 运行指定测试目标
 

+ 22 - 22
docs/zh/api/scripts/extension-modules/core/language/language.md

@@ -10,13 +10,13 @@
 
 ```lua
 {
-     [".c"]      = cc
-,    [".cc"]     = cxx
-,    [".cpp"]    = cxx
-,    [".m"]      = mm
-,    [".mm"]     = mxx
-,    [".swift"]  = sc
-,    [".go"]     = gc
+    [".c"]      = cc,
+    [".cc"]     = cxx,
+    [".cpp"]    = cxx,
+    [".m"]      = mm,
+    [".mm"]     = mxx,
+    [".swift"]  = sc,
+    [".go"]     = gc
 }
 ```
 
@@ -28,9 +28,9 @@
 
 ```lua
 {
-     binary = {"ld", "gcld", "dcld"}
-,    static = {"ar", "gcar", "dcar"}
-,    shared = {"sh", "dcsh"}
+    binary = {"ld", "gcld", "dcld"},
+    static = {"ar", "gcar", "dcar"},
+    shared = {"sh", "dcsh"}
 }
 ```
 
@@ -42,15 +42,15 @@
 
 ```lua
 {
-     cc  = ".c"
-,    cxx = {".cc", ".cpp", ".cxx"}
-,    mm  = ".m"
-,    mxx = ".mm"
-,    sc  = ".swift"
-,    gc  = ".go"
-,    rc  = ".rs"
-,    dc  = ".d"
-,    as  = {".s", ".S", ".asm"}
+    cc  = ".c",
+    cxx = {".cc", ".cpp", ".cxx"},
+    mm  = ".m",
+    mxx = ".mm",
+    sc  = ".swift",
+    gc  = ".go",
+    rc  = ".rs",
+    dc  = ".d",
+    as  = {".s", ".S", ".asm"}
 }
 ```
 
@@ -62,9 +62,9 @@
 
 ```lua
 {
-     cc  = {"cflags", "cxflags"}
-,    cxx = {"cxxflags", "cxflags"}
-,    ...
+    cc  = {"cflags", "cxflags"},
+    cxx = {"cxxflags", "cxflags"},
+    ...
 }
 ```
 

+ 1 - 1
docs/zh/api/scripts/extension-modules/core/project/project.md

@@ -1,6 +1,6 @@
 # core.project.project
 
-用于获取当前工程的一些描述信息,也就是在`xmake.lua`工程描述文件中定义的配置信息,例如:[target](/api/description/project-target)、 [option](/api/description/configuration-option) 等。
+用于获取当前工程的一些描述信息,也就是在`xmake.lua`工程描述文件中定义的配置信息,例如:[target](/zh/api/description/project-target)、 [option](/zh/api/description/configuration-option) 等。
 
 ## project.target
 

+ 0 - 0
docs/zh/api/scripts/extension-modules/net/nttp.md → docs/zh/api/scripts/extension-modules/net/http.md


+ 1 - 1
docs/zh/api/scripts/native-modules.md

@@ -145,4 +145,4 @@ bar: 1 + 1 = 2
 
 通过新的 native 模块特性,我们也可以用来实现 auto-codegen,然后根据自动生成的代码,继续执行后续编译流程。
 
-这里也有完整的例子可以参考:[autogen_shared_module](https://github.com/xmake-io/xmake/tree/master/tests/projects/other/autogen_shared_module)。
+这里也有完整的例子可以参考:[autogen_shared_module](https://github.com/xmake-io/xmake/tree/master/tests/projects/other/autogen/autogen_shared_module)。

+ 1 - 1
docs/zh/guide/introduction.md

@@ -8,6 +8,6 @@ xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 
 
 目前,xmake主要用于C/C++项目的构建,但是同时也支持其他native语言的构建,可以实现跟C/C++进行混合编译,同时编译速度也是非常的快,可以跟Ninja持平。
 
-如果你想要了解更多,请参考:[在线文档](/zh/guide/introduction), [Github](https://github.com/xmake-io/xmake)以及[Gitee](https://gitee.com/tboox/xmake),同时也欢迎加入我们的 [社区](/zh/about/contact).
+如果你想要了解更多,请参考:[在线文档](/zh/guide/quick-start), [Github](https://github.com/xmake-io/xmake)以及[Gitee](https://gitee.com/tboox/xmake),同时也欢迎加入我们的 [社区](/zh/about/contact).
 
 ![](/assets/img/index/xmake-basic-render.gif)