Browse Source

fix some links

ruki 6 months ago
parent
commit
4029be39eb

+ 4 - 0
docs/guide/package-management/package-distribution.md

@@ -1,3 +1,7 @@
+---
+outline: deep
+---
+
 # Package Distribution
 
 ## Define package configuration

+ 6 - 2
docs/guide/package-management/using-official-packages.md

@@ -157,7 +157,9 @@ xmake require --info spdlog
 Among them, configs is the configurable parameters provided by the spdlog package itself, and the configs part with builtin below is the built-in configuration parameters that all packages will have.
 The top required section is the current configuration value of the project.
 
-!> `vs_runtime` is the setting for vs runtime under msvc. In v2.2.9, it also supports automatic inheritance of all static dependencies. That is to say, if spdlog is set to MD, then the fmt package it depends on will also inherit automatically. Set the MD.
+::: tip NOTE
+`vs_runtime` is the setting for vs runtime under msvc. In v2.2.9, it also supports automatic inheritance of all static dependencies. That is to say, if spdlog is set to MD, then the fmt package it depends on will also inherit automatically. Set the MD.
+:::
 
 It can be seen that we have been able to customize the required packages very conveniently, but each package may have a lot of dependencies. If these dependencies are also customized, what should I do?
 
@@ -416,7 +418,9 @@ If we feel that the above hosts mode configuration is not flexible enough, we ca
                                        end
 ```
 
-!> If there are proxy_hosts, the host configuration is preferred, otherwise, the pac configuration can be used.
+::: tip NOTE
+If there are proxy_hosts, the host configuration is preferred, otherwise, the pac configuration can be used.
+:::
 
 The default path of pac: ~/.xmake/pac.lua, if --proxy is set, and this file exists, it will automatically go to pac. If it does not exist, and there are no hosts, then the proxy will take effect globally.
 

+ 3 - 3
docs/guide/package-management/using-packages-in-cmake.md

@@ -193,7 +193,7 @@ package("myzlib")
     end)
 ```
 
-We can write a custom package in xmake.lua, please refer [Define Xrepo package](https://xmake.io/#/package/remote_package?id=package-description).
+We can write a custom package in xmake.lua, please refer [Define Xrepo package](/guide/package-management/package-distribution.html#define-package-configuration).
 
 ## Options and variables for `xrepo.cmake`
 
@@ -232,7 +232,7 @@ the default one on system, platform must be set to "cross".
 In addition to installing packages from officially maintained repository,
 Xrepo can also install packages from third-party package managers such as vcpkg/conan/conda/pacman/homebrew/apt/dub/cargo.
 
-For the use of the command line, we can refer to the documentation: [Xrepo command usage](https://xrepo.xmake.io/#/getting_started?id=install-packages-from-third-party-package-manager)
+For the use of the command line, we can refer to the documentation: [Xrepo command usage](/guide/package-management/xrepo-cli).
 
 We can also use it directly in cmake to install packages from third-party repositories, just add the repository name as a namespace. e.g. `vcpkg::zlib`, `conan::pcre2`
 
@@ -288,7 +288,7 @@ The package names:
 ```
 
 It's already in Xrepo, so we can use it. If it's not in Xrepo, we can create it in
-[self-built repositories](https://xrepo.xmake.io/#/getting_started?id=suppory-distributed-repository).
+[self-built repositories](/guide/package-management/xrepo-cli.html#support-distributed-repository).
 
 Let's see what configs are available for the package before using it:
 

+ 1 - 1
docs/guide/package-management/xrepo-cli.md

@@ -34,7 +34,7 @@ We only need install xmake to use the xrepo command. About the installation of x
 * MinGW (i386, x86_64, arm, arm64)
 * Cross Toolchains
 
-## Suppory distributed repository
+## Support distributed repository
 
 In addition to directly retrieving the installation package from the official repository: [xmake-repo](https://github.com/xmake-io/xmake-repo).
 

+ 8 - 4
docs/zh/guide/package-management/package-distribution.md

@@ -1,6 +1,10 @@
+---
+outline: deep
+---
+
 # 分发包 {#package-distribution}
 
-## 定义包配置
+## 定义包配置 {#define-package-configuration}
 
 ### 仓库包结构
 
@@ -178,7 +182,7 @@ xmake l scripts/test.lua -v -D --shallow -p iphoneos -a arm64 zlib
 xmake l scripts/test.lua -v -D --shallow -p android --ndk=/xxxx zlib
 ```
 
-## 生成远程包
+## 生成远程包 {#generate-remote-package}
 
 除了本地包格式,`xmake package` 现在也支持生成远程包,便于用户将他们快速提交到远程仓库。
 
@@ -221,7 +225,7 @@ $ xmake package -f remote --url=https://xxxx/xxx.tar.gz --shasum=xxxxx --homepag
 
 xmake 也会从 target 的 `set_license` 和 `set_version` 等配置中读取相关配置信息。
 
-## 提交包到官方仓库
+## 提交包到官方仓库 {#submit-package-to-official-repository}
 
 目前这个特性刚完成不久,目前官方仓库的包还不是很多,有些包也许还不支持部分平台,不过这并不是太大问题,后期迭代几个版本后,我会不断扩充完善包仓库。
 
@@ -231,7 +235,7 @@ xmake 也会从 target 的 `set_license` 和 `set_version` 等配置中读取相
 
 关于如何制作自己的包,可以看下上文:[添加包到仓库](#添加包到仓库)。
 
-## 分发和使用自定义包规则
+## 分发和使用自定义包规则 {#custom-rule-distribution}
 
 2.7.2 版本之后,我们可以在包管理仓库中,添加自定义构架规则脚本,实现跟随包进行动态下发和安装。
 

+ 7 - 3
docs/zh/guide/package-management/using-official-packages.md

@@ -311,7 +311,7 @@ target("test")
     add_packages("libjpeg")
 ```
 
-关于如何编写自定义包描述规则,详情见:[添加包到仓库](#添加包到仓库)
+关于如何编写自定义包描述规则,详情见:[添加包到仓库](/zh/guide/package-management/package-distribution.html#submit-package-to-official-repository)
 
 ## 依赖包的锁定和升级
 
@@ -448,7 +448,9 @@ $ xmake g --help
                                        end
 ```
 
-!> 如果有proxy_hosts优先走hosts配置,没有的话才走pac配置。
+::: tip 注意
+如果有proxy_hosts优先走hosts配置,没有的话才走pac配置。
+:::
 
 pac的默认路径:~/.xmake/pac.lua,如果--proxy被设置,并且这个文件存在,就会自动走pac,如果不存在,也没hosts,那就全局生效代理。
 
@@ -472,7 +474,9 @@ end
 
 这块的具体详情见:https://github.com/xmake-io/xmake/issues/854
 
-!> 另外,除了依赖包下载,其他涉及网络下载的命令也都支持代理,比如:`xmake update`
+::: tip 注意
+另外,除了依赖包下载,其他涉及网络下载的命令也都支持代理,比如:`xmake update`
+:::
 
 #### 镜像代理
 

+ 2 - 2
docs/zh/guide/package-management/using-packages-in-cmake.md

@@ -162,14 +162,14 @@ package("myzlib")
     -- ...
 ```
 
-我们可以自定义一个包,具体定义方式,参考文档:[自定义 Xrepo 包](https://xmake.io/#/zh-cn/package/remote_package?id=package-description)。
+我们可以自定义一个包,具体定义方式,参考文档:[自定义 Xrepo 包](/zh/guide/package-management/package-distribution#define-package-configuration).
 
 
 ## 使用来自第三个存储库的包
 
 除了从官方维护的存储库安装软件包之外,Xrepo 还可以安装来自第三方包管理器的包,例如 vcpkg/conan/conda/pacman/homebrew/apt/dub/cargo。
 
-关于命令行的使用,我们可以参考文档:[Xrepo命令用法](https://xrepo.xmake.io/#/getting_started?id=install-packages-from-third-party-package-manager)
+关于命令行的使用,我们可以参考文档:[Xrepo命令用法](/zh/guide/package-management/xrepo-cli).
 
 我们也可以直接在 cmake 中使用它来安装来自第三方仓库的包,只需将仓库名称添加为命名空间即可。例如:`vcpkg::zlib`, `conan::pcre2`