GitHub Pages – How to Customize Pages and Override Default Layout

github-pages

I want to customize the "This site is open source. Improve this page." footer and add a header and footer of my own.

I've found Customizing CSS and HTML in your Jekyll theme and
could make the CSS part work using a /assets/css/style.css file.

But I can't make the /_layouts/ & default.html part work, I think it may be because I have not chosen a "theme" (actually I think themes will spoil my minimalist design).

Best Answer

It works without choosing a theme. Add this to /_layouts/default.html

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width">
    <title>The title</title>
    <link rel="stylesheet" href="assets/css/style.css">
    <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,700" media="all">
  </head>
  <body>
<h1><a href="/">Title & link to home</a></h1>
    <div class="content">
      {{ content }}
    </div>
    <footer>
      <div class="container">
        my footer
      </div>
    </footer>
  </body>
</html>
Related Topic