Editing the footer in GitHub pages jekyll's default minima theme
Asked Answered
H

4

10

I've followed this tutorial and the following ones to create a Github Pages website with Jekyll. Now I have the minima theme, but it seems to be a different version from the official repo, as the parameters in the repo's _config.yml don't work on mine (e.g. for the Twitter link I have a twitter_username parameter while the repo's twitter under social_links doesn't work).

What is weird is that in the footer I have the title parameter repeated twice, as it renders in both the footer-heading and p-name elements in the index.html. Is there any way to change what is rendered to those elements in the html?

Harding answered 14/2, 2020 at 17:48 Comment(0)
O
9

When github advise you to copy master files to override minima gem's files "hidden files deep inside somewhere on you file system" by copying master files, they commit a mistake because breaking changes can append.

The best way to override files on a jekyll theme (for now) is to copy gem's file to your working folder.

cd /you/working/jekyll
cp -R `echo "$(bundle info minima --path)/_*/"` .
cp -R "$(bundle info minima --path)/assets/" .

You then have everything needed to override minima in your working folder (_includes, _layouts, _sass and assets folders).

If you have a github page, you just have to commit and push to you publication branch.

Orozco answered 14/2, 2020 at 18:47 Comment(4)
Do I have to create a Jekyll folder or can I execute those commands in the working directory?Harding
Executing those commands in your existing directory will allow you to override all current 2.5.1 minima files. Everything will be in the same place easy to work with.Orozco
Is this all that's needed for a Github Pages site? Do you have to rebuild anything, or can you just push your changes to main?Contentment
@ddejohn, just commit and push, everything will be build on github.Orozco
N
4

The footer uses site.author. So if you add author: <your name> to your _config.yml, you will see <your name> in the footer.

Neighborly answered 27/7, 2020 at 18:22 Comment(0)
I
1

To customize the footer block of your page, you can override the default one from the theme. Copy the original file footer.html to the _includes folder of your repository and customize it as you wish.


See also: How do you remove header on Github Pages?

Interfaith answered 12/10, 2021 at 0:52 Comment(0)
K
0

If you are really minimal and just editing .md files without adding theme files (i.e. relying on the default Jekyll theme GitHub Pages adds), add this to your .md file and it will remove the footer.

<style>
  .footer {
    display: none;
  }
</style>
Kraut answered 10/7, 2021 at 21:8 Comment(2)
to which .md file?Picturesque
@Picturesque default entry point is index.mdAlfaro

© 2022 - 2024 — McMap. All rights reserved.