Respect baseurl for fork repos; Simplify page header - #9
Conversation
This makes it easier for contributors to deploy their fork on Github Pages by setting `baseurl: /asterinas.github.io` in `_config.yml`.
|
With the idea of #10 , you can preview the latest development link1 by clicking the "View deployment" button in os-checker#1
Footnotes
|
baseurl to fix deployment links for fork reposbaseurl for fork repos; Simplify page header
| <a class="tab" href="https://asterinas.github.io/book">Docs</a> | ||
| </div> | ||
| </div> | ||
| {% include site-nav.html active="blog" %} |
There was a problem hiding this comment.
Asterinas homepage doesn't have a contributors tab, but the url path https://asterinas.github.io/contributors.html is accessible with Blog tag highlighted.
So active="blog" just follows the behavior.
| <a class="tab" href="https://asterinas.github.io/book">Docs</a> | ||
| </div> | ||
| </div> | ||
| {% include site-nav.html active="blog" %} |
There was a problem hiding this comment.
https://asterinas.github.io/post.html is 404. Maybe we should just remove this page?
There was a problem hiding this comment.
Thanks for pointing this out. But this is a separate problem. Could you fix it in another PR?
This looks a fragile solution to me. When one forks a project, she can choose to name the forked repo differently than the parent repo. Could you think of a more robust solution? And the developer of a forked website still needs to change the URL manually. This is another problem. So overall, the solution is not ideal. Think harder? |
|
An ideal sulution is #10 , contributors just submit a PR, vercel bot builds and notifies a unique preview link when a commit is pushed. You have to login vercel and set up this repo in vercel. The vercel service is free. Just some clicks. |



Contributors usually fork
asterinas.github.iorepo to their own ascontributor/asterinas.github.io.When they deploy a branch of fork to Github Pages, all local paths start from
https://contributor.github.iorather thanhttps://contributor.github.io/asterinas.github.io.If a PR reviewer needs to check the website interactively, the contributor has to handle the link problem, as the deployed webpage is fully broken like this.
With this PR, a contributor only needs to set
baseurl: "/asterinas.github.io"in_config.ymlto make these project links and assets valid.This PR also simplifies header for different pages by