-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update docs on links #1440
Conversation
VuePress 支持重定向到干净链接。如果一个链接 `/foo` 找不到,VuePress 会自行寻找一个可用的 `/foo/` 或 `/foo.html`。反过来,当 `/foo/` 或 `/foo.html` 中的一个找不到时,VuePress 也会尝试寻找另一个。借助这种特性,我们可以通过官方插件 [@vuepress/plugin-clean-urls](../plugin/official/plugin-clean-urls.md) 定制你的网站路径。 | ||
|
||
::: tip 注意 | ||
无论是否使用了 permalink 和 clean-urls 插件,你的相对路径都应该依赖于当前的文件结构来定义。在上面的例子中,即使你将 `/foo/one.md` 的路径设为了 `/foo/one/`,你依然应该通过 `./two.md` 来访问 `/foo/two.md`。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 clean-urls 建议加上你插件的 github 地址
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
上一段中已经有链接了,所以认为这里不需要了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
恩恩~
@@ -41,11 +28,19 @@ | |||
``` md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
假设你现在在
foo/one.md
中
上面的这句话建议移到这个的前面,我作为阅读者找了一会儿才看到这个前提。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改~
@ulivz 你好,在官方网站的说明中找到上面引用的一段。在项目中类似这样写:[foo](path/to/foo),dev模式下可以正常跳转foo.html,打包后跳转到path/to/foo,不会自动加.html,页面显示Cannot GET /path/to/foo。markdown的配置均使用默认值,vuepress为1.9.7 |
Summary
Updated obsolete documents with new features of links.
What kind of change does this PR introduce? (check at least one)
If changing the UI of default theme, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix #xxx[,#xxx]
, where "xxx" is the issue number)You have tested in the following browsers: (Providing a detailed version will be better.)
If adding a new feature, the PR's description includes:
To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.
Other information: