How do you remove header on Github Pages?

拟墨画扇 提交于 2019-11-30 03:21:26

问题


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:

  1. Add _config.yml in the root of the GitHub Pages repo
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!