如何将 GitHub Wiki 转换为 GitHub 页面?
How to convert GitHub Wiki into GitHub pages?
我希望将我现有的 GitHub Wiki 作为 GitHub 页提供。
我尝试将所有 .md
文件复制到 /docs
和 setting that as the source for pages - 但它会破坏所有内部链接。
所以我看到的是 Read the [[documentation]] or [[Help|get help]].
而不是链接。
在 GitHub 个页面上托管我的 wiki 的最简单方法是什么?
您需要为每个页面创建手动 Markdown 链接。
[[documentation]]
和 [[Help|get help]]
样式链接为 wikilinks and generally only used in wikis. They are not part of the standard Markdown syntax and not supported by Jekyll (which GitHub Pages uses under the hood). Note that GitHub Wiki supports both styles,因此您可以根据需要在导入前编辑链接。
无论是哪种,您都需要编辑链接以手动指向适当的页面:
Read the [documentation](path/to/documentation/) or [Help](path/to/get_help.html]
当然,您需要调整上述路径以指向正确的位置。作为替代方案,您可以使用 Jekyll permalinks,它可以为您提供一个快捷方式来识别特定页面,而无需指定完整路径。
刚从 GitHub 直接收到这个。
There is no easy answer I am afraid. You will need to script or manually change the wiki format URLs to proper markdown format.
We did just add relative links to GitHub Pages though:
https://github.com/blog/2290-relative-links-for-github-pages
Which should make things easier at least, as you won't need to fully qualify all the URLs.
So you can change:
Read the [[documentation]] or [[Help|get help]].
to
Read the [documentation](documentation.md) or [Help](get%20help.md).
Alternatively, you may be able to use pandoc and the script below to do the conversion for you:
https://github.com/philipashlock/mediawiki-to-markdown
But I haven't tested it myself so I can't guarantee it will work.
This could be useful feature though, so I will share it with the team in the hope of an easy converter in the future
有工具可以自动完成。看看 github-wikito-converter.
Generate HTML & PDF documentation from Github wiki or any other markdown-based wiki.
我希望将我现有的 GitHub Wiki 作为 GitHub 页提供。
我尝试将所有 .md
文件复制到 /docs
和 setting that as the source for pages - 但它会破坏所有内部链接。
所以我看到的是 Read the [[documentation]] or [[Help|get help]].
而不是链接。
在 GitHub 个页面上托管我的 wiki 的最简单方法是什么?
您需要为每个页面创建手动 Markdown 链接。
[[documentation]]
和 [[Help|get help]]
样式链接为 wikilinks and generally only used in wikis. They are not part of the standard Markdown syntax and not supported by Jekyll (which GitHub Pages uses under the hood). Note that GitHub Wiki supports both styles,因此您可以根据需要在导入前编辑链接。
无论是哪种,您都需要编辑链接以手动指向适当的页面:
Read the [documentation](path/to/documentation/) or [Help](path/to/get_help.html]
当然,您需要调整上述路径以指向正确的位置。作为替代方案,您可以使用 Jekyll permalinks,它可以为您提供一个快捷方式来识别特定页面,而无需指定完整路径。
刚从 GitHub 直接收到这个。
There is no easy answer I am afraid. You will need to script or manually change the wiki format URLs to proper markdown format.
We did just add relative links to GitHub Pages though:
https://github.com/blog/2290-relative-links-for-github-pages
Which should make things easier at least, as you won't need to fully qualify all the URLs.
So you can change:
Read the [[documentation]] or [[Help|get help]].
to
Read the [documentation](documentation.md) or [Help](get%20help.md).
Alternatively, you may be able to use pandoc and the script below to do the conversion for you:
https://github.com/philipashlock/mediawiki-to-markdown
But I haven't tested it myself so I can't guarantee it will work.
This could be useful feature though, so I will share it with the team in the hope of an easy converter in the future
有工具可以自动完成。看看 github-wikito-converter.
Generate HTML & PDF documentation from Github wiki or any other markdown-based wiki.