Skip to content

Instantly share code, notes, and snippets.

@ScottKirvan
Created May 18, 2023 19:22
Show Gist options
  • Save ScottKirvan/50678c06083a78a82e56afac67943dec to your computer and use it in GitHub Desktop.
Save ScottKirvan/50678c06083a78a82e56afac67943dec to your computer and use it in GitHub Desktop.
bare-bones, minimal Jekyll setup for Github Pages
  1. Create a new repository on GitHub with the name .github.io, where is your GitHub username.

  2. Clone the repository to your local machine using Git.

  3. Create a new file called index.md in the repository's root directory. This will serve as the homepage for your GitHub Pages site.

  4. Add the necessary Jekyll front matter to the index.md file. At a minimum, it should include the following YAML code:

---
layout: default
---

This front matter specifies the layout file to be used for rendering the content.

  1. Create a new file called _layouts/default.html in the repository's root directory. This file will define the default layout for your site. Add the following code to it:
<!DOCTYPE html>
<html>
<head>
  <title>{{ page.title }}</title>
</head>
<body>
  {{ content }}
</body>
</html>
  1. Commit and push the changes to your GitHub repository.

After pushing the changes, GitHub Pages will automatically build your Jekyll site and make it available at .github.io. You can further customize your Jekyll site by adding additional Markdown files, layouts, stylesheets, and other assets as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment