问题
I am trying GitHub Pages for my developer blog post, unfortunately I am having a hard time deleting the header part after choosing a theme.
Even though I already edited the Readme.md
, the header is still there and I can't even remove or edit it. Do you have any idea on how to remove or edit it? There are only 2 files on my repositories: Readme.md
and _config.yml
回答1:
I found you can customize your site CSS to hide the header by creating the file:
/assets/css/style.scss
---
---
@import "{{ site.theme }}";
header {
display: none;
}
This is a closed issue on Github.
That said, you may want to override the HTML layout, so your site doesn't unexpectedly break.
回答2:
I encountered the same issue with the default Jekyll theme (primer). I found this closed issue very helpful.
My steps to resolve with the default GitHub pages theme, based on the post linked above:
- Add _config.yml in the root of the GitHub Pages repo
- Add the following lines to _config.yml:
name: luaphacim's site
title: null
Another workaround for this theme would be to give your page the same title as the title you specify in _config.yml.
来源:https://stackoverflow.com/questions/46375765/how-do-you-remove-header-on-github-pages