Skip to content
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

Merged
merged 4 commits into from
Mar 13, 2019
Merged

docs: update docs on links #1440

merged 4 commits into from
Mar 13, 2019

Conversation

shigma
Copy link
Collaborator

@shigma shigma commented Mar 13, 2019

Summary

Updated obsolete documents with new features of links.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

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:

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`。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的 clean-urls 建议加上你插件的 github 地址

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上一段中已经有链接了,所以认为这里不需要了。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

恩恩~

@shigma shigma requested a review from ulivz March 13, 2019 16:54
@@ -41,11 +28,19 @@
``` md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

假设你现在在 foo/one.md

上面的这句话建议移到这个的前面,我作为阅读者找了一会儿才看到这个前提。

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修改~

@ulivz ulivz merged commit 94e5838 into master Mar 13, 2019
@shigma shigma deleted the docs/link branch March 13, 2019 17:16
@xyx650
Copy link

xyx650 commented Jan 4, 2023

@ulivz 你好,在官方网站的说明中找到上面引用的一段。在项目中类似这样写:[foo](path/to/foo),dev模式下可以正常跳转foo.html,打包后跳转到path/to/foo,不会自动加.html,页面显示Cannot GET /path/to/foo。markdown的配置均使用默认值,vuepress为1.9.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants