[英]How to set up project pages as subpages of GitHub personal webpage?
My github personal webpage is davidrpugh.github.io
. 我的github个人网页是
davidrpugh.github.io
。 I have set up a subpage for my software projects at davidrpugh.github.io/software
and created stub subpages for each of my software projects. 我在
davidrpugh.github.io/software
为我的软件项目设置了一个子页面,并为我的每个软件项目创建了存根子页面。 Example would be davidrpugh.io/software/pypwt
. 例如
davidrpugh.io/software/pypwt
。
Question: How do I set up the project webpage, which would by default live at davidrpugh.io/pypwt
, so that it lives instead at davidrpugh.io/software/pypwt
? 问题:如何设置项目网页,默认情况下会在
davidrpugh.io/pypwt
,以便它生活在davidrpugh.io/software/pypwt
? I also want any updates to the project webpage to automatically render on my personal webpage as well. 我还希望项目网页的任何更新都能在我的个人网页上自动呈现。
I am guessing that this is a solved problem, and I am not using the correct set of search terms. 我猜这是一个已解决的问题,我没有使用正确的搜索词组。
I believe you're finding your current method difficult because you're using pages (http:// jekyllrb.com/docs/pages/) instead of posts (http:// jekyllrb.com/docs/posts/). 我相信您发现当前的方法很困难,因为您使用的是页面 (http:// jekyllrb.com/docs/pages/),而不是帖子 (http:// jekyllrb.com/docs/posts/)。
You have 2 solutions: 你有2个解决方案:
You can either continue to use pages, and simply write each new post at /software/<name of post>/index.md
您可以继续使用页面,只需在
/software/<name of post>/index.md
编写每个新帖子
You can use posts and write each new post in /_posts/<YEAR-MONTH-DAY-title>.md
and set the category in the Front Matter (http:// jekyllrb.com/docs/frontmatter/) to "software". 您可以使用帖子并在
/_posts/<YEAR-MONTH-DAY-title>.md
写下每个新帖子, /_posts/<YEAR-MONTH-DAY-title>.md
Front Matter中的类别(http:// jekyllrb.com/docs/frontmatter/)设置为“软件” 。
Based on your _config.yml
it will save these posts in /:categories/:title/
(in this case /software/pypwt.html
). 根据您的
_config.yml
它会将这些帖子保存在/:categories/:title/
(在本例中为/software/pypwt.html
)。
You can then link to these posts using ( https://stackoverflow.com/a/9195560/3158248 ) to ensure links don't get broken if you update your _config.yaml
然后,您可以使用( https://stackoverflow.com/a/9195560/3158248 )链接到这些帖子,以确保在更新
_config.yaml
链接不会中断
Concerning you project web site hosted at https://github.com/davidrpugh/penn-world-tables in gh-pages branch. 关于您在gh-pages分支中的https://github.com/davidrpugh/penn-world-tables上托管的项目网站。
#Jekyll config
url : http://davidrpugh.github.io
baseurl: /penn-world-tables
The complete site url will be http://davidrpugh.github.io/penn-world-tables . 完整的网站网址为http://davidrpugh.github.io/penn-world-tables 。 You will not be able to change this at all.
你根本无法改变这一点。 If you try to set a
permalink: software/pypwt/
on the index page it will give you http://davidrpugh.github.io/penn-world-tables/software/pypwt/ 如果您尝试在索引页面上设置
permalink: software/pypwt/
,它将为您提供http://davidrpugh.github.io/penn-world-tables/software/pypwt/
In order to get a http://davidrpugh.github.io/software/pypwt/ url you can 为了获得http://davidrpugh.github.io/software/pypwt/ url,你可以
Just use the same template over all you repositories, this will make user fills like it's the same site when navigating. 只需在所有存储库上使用相同的模板,这将使用户填充,就像导航时的同一站点一样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.