How do you remove header on Github Pages?

First, to customize the Jekyll SEO Tag, you can set the name of the site as an empty string and nullify the title itself, so that it does not appear to the right of the title of each page — create this file in the root of your repository:

_config.yml

name: ""
title: null

Then, to completely remove the header block from your page, you can override the default layout. Copy the original file default.html to the _layouts folder of your repository and remove this block:

<header>
  <!-- TL;DR -->
</header>

By default GitHub uses the Primer theme — it can also be customized in the same way as other themes.


See also: Editing the footer in GitHub pages jekyll's default minima theme


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.


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.