├── .editorconfig ├── .gitignore ├── .vscode └── settings.json ├── 404.html ├── Gemfile ├── LICENSE ├── Makefile ├── README.md ├── _config.yml ├── _includes ├── collections-overview.html └── github-corner.html ├── _languages ├── html.md ├── liquid.md └── markdown.md ├── _layouts └── default.html ├── _posts ├── 2018-12-18-welcome-to-jekyll.md └── 2018-12-22-first-post.md ├── _tools ├── github-pages.md ├── jekyll.md └── ruby.md ├── about.md ├── assets └── main.scss ├── docs ├── README.md ├── installation.md ├── template-notes │ ├── README.md │ ├── about.md │ ├── background.md │ ├── customization.md │ ├── jekyll-4.md │ ├── plugins.md │ └── related-projects.md └── usage.md ├── index.md ├── languages.md ├── sample.png └── tools.md /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | 7 | [*.{md,html}] 8 | indent_size = 4 9 | 10 | [Makefile] 11 | indent_style = tab 12 | indent_size = 4 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .jekyll-cache/ 2 | .sass-cache/ 3 | .jekyll-metadata 4 | 5 | .bundle/ 6 | vendor/ 7 | 8 | _site/ 9 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "*.md": "liquid", 4 | "*.html": "liquid" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: 3 | layout: default 4 | permalink: /404.html 5 | --- 6 | 7 | 22 | 23 |
24 |

404

25 | 26 |

Page not found :(

27 |

The requested page could not be found.

28 |
29 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "jekyll", "~> 3.9" 4 | gem "kramdown-parser-gfm", "~> 1.1" # Required for Jekyll 3.9 (not 3.8 or 4) 5 | gem "webrick", "~> 1.7" # Ruby 3 support 6 | 7 | gem "minima", "~> 2.5.1" 8 | 9 | group :jekyll_plugins do 10 | gem "jekyll-sitemap", "~> 1.4" 11 | end 12 | 13 | # Windows 14 | 15 | # The zoneinfo files are missing, so bundle the tzinfo-data gem and associated 16 | # library. 17 | install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do 18 | gem "tzinfo", "~> 1.2" 19 | gem "tzinfo-data" 20 | end 21 | 22 | # Performance-booster for watching directories and fix for livereload. 23 | gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform? 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 - 2021 MichaelCurrin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | default: install 2 | 3 | all: install build 4 | 5 | 6 | h help: 7 | @grep '^[a-z]' Makefile 8 | 9 | 10 | install: 11 | bundle config set --local path vendor/bundle 12 | bundle install 13 | 14 | upgrade: 15 | bundle update 16 | 17 | 18 | s serve: 19 | bundle exec jekyll serve --trace --livereload 20 | 21 | build: 22 | JEKYLL_ENV=production bundle exec jekyll build --trace 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jekyll Blog Demo 🧪 📝 🚀 2 | > Starter for a static website or blog - built with Jekyll, a minimal theme and GH Pages 3 | 4 | 5 | 6 | [![GitHub tag](https://img.shields.io/github/tag/MichaelCurrin/jekyll-blog-demo?include_prereleases&sort=semver)](https://GitHub.com/MichaelCurrin/jekyll-blog-demo/tags/) 7 | [![License](https://img.shields.io/badge/License-MIT-blue)](#license) 8 | 9 | [![Made with Ruby](https://img.shields.io/badge/Ruby->=2.6-blue?logo=ruby&logoColor=white)](https://ruby-lang.org) 10 | [![Jekyll](https://img.shields.io/badge/Jekyll-3.9-blue?logo=jekyll&logoColor=white)](https://jekyllrb.com) 11 | [![Made with Minima](https://img.shields.io/badge/minima-2.5-blue?logo=ruby)](https://github.com/jekyll/minima) 12 | 13 | [![Hosted with - GitHub Pages](https://img.shields.io/badge/Hosted_with-GitHub_Pages-blue?logo=github&logoColor=white)](https://pages.github.com/) 14 | 15 | 16 | ## Preview 17 | 18 |
19 | 20 | Sample screenshot 21 | 22 |
23 | 24 |
25 | 26 | [![Site link](https://img.shields.io/badge/View_site-Jekyll_Blog_Demo-blue?style=for-the-badge)](https://michaelcurrin.github.io/jekyll-blog-demo/ "Go to demo site") 27 | 28 | Complete with machine-readable pages: 29 | 30 | - [/sitemap.xml](https://michaelcurrin.github.io/jekyll-blog-demo/sitemap.xml) from `jekyll-sitemap`. 31 | - [/robots.txt](https://michaelcurrin.github.io/jekyll-blog-demo/robots.txt) from `jekyll-sitemap`. 32 | - [/feed.xml](https://michaelcurrin.github.io/jekyll-blog-demo/feed.xml) Atom feed from `jekyll-feed`. 33 | 34 | 35 | ## How to use this project 36 | 37 |
38 | 39 | [![Use this template](https://img.shields.io/badge/Generate-Use_this_Template-2ea44f?style=for-the-badge)](https://github.com/MichaelCurrin/jekyll-blog-demo/generate "Use this template") 40 | 41 |
42 | 43 | Then customize the config with your own `url` and `baseurl` values. And follow docs below to install and run. 44 | 45 | 46 | ## Documentation 47 | 48 |
49 | 50 | [![view - Documentation](https://img.shields.io/badge/view-Project_docs-blue?style=for-the-badge)](/docs/ "Go to docs") 51 | 52 |
53 | 54 | 55 | ## License 56 | 57 | Released under [MIT](/LICENSE) by [@MichaelCurrin](https://github.com/MichaelCurrin). 58 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | ### Site metadata 2 | 3 | # Don't make the title longer than this, otherwise it gets covered in mobile view. 4 | title: Jekyll Blog Demo 5 | description: Starter for a static website or blog - built with Jekyll, a minimal theme and GH Pages 6 | 7 | email: 8 | twitter_username: 9 | github_username: MichaelCurrin 10 | rss: RSS 11 | 12 | ### Build settings 13 | 14 | url: https://michaelcurrin.github.io 15 | baseurl: /jekyll-blog-demo 16 | 17 | permalink: pretty 18 | 19 | theme: minima 20 | 21 | plugins: 22 | - jekyll-feed 23 | - jekyll-sitemap 24 | 25 | collections: 26 | tools: 27 | output: true 28 | languages: 29 | output: true 30 | 31 | defaults: 32 | - scope: 33 | path: "" 34 | values: 35 | layout: page 36 | 37 | exclude: 38 | - docs/ 39 | - vendor/ 40 | - Gemfile # Gemfile.lock is implied because of how matching works. 41 | - LICENSE 42 | - Makefile 43 | - README.md 44 | - sample*.png 45 | 46 | liquid: 47 | error_mode: strict 48 | 49 | strict_front_matter: true 50 | -------------------------------------------------------------------------------- /_includes/collections-overview.html: -------------------------------------------------------------------------------- 1 | 26 | -------------------------------------------------------------------------------- /_includes/github-corner.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /_languages/html.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: HTML 3 | --- 4 | 5 | Files written with `.html` extension. No Markdown allowed. 6 | 7 | Read more about HTML in my [resources](https://michaelcurrin.github.io/dev-resources/resources/web/html/). 8 | 9 | If you add frontmatter, then you can use Liquid syntax in your HTML files. 10 | -------------------------------------------------------------------------------- /_languages/liquid.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Liquid 3 | description: | 4 | Liquid is an open-source template language created by Shopify and written in Ruby. It is the backbone of Shopify themes and is used to load dynamic content on storefronts. 5 | 6 | Liquid has been in production use at Shopify since 2006 and is now used by many other hosted web applications. 7 | --- 8 | 9 | See [Liquid](https://shopify.github.io/liquid/) homepage on Shopify docs. 10 | 11 | Liquid has been implemented in many languages like Python and JavaScript. For the Jekyll guide, see [Liquid](https://jekyllrb.com/docs/liquid/) in the Jekyll docs or my [Liquid cheatsheet](https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/jekyll/liquid/). 12 | -------------------------------------------------------------------------------- /_languages/markdown.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Markdown 3 | description: Adding styling to your website, without verbose HTML 4 | --- 5 | 6 | The Markdown name plays on the "markup" part of the HTML acronym. 7 | 8 | From the [Markdown homepage](https://daringfireball.net/projects/markdown/) 9 | 10 | > Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML). 11 | 12 | You need a markdown converter to turn markdown into HTML. Many IDEs, static site generators and websites (like GitHub) support writing in markdown. There are other stands too like Asciidoc and RST. 13 | 14 | Learn more on the [Markdown guide](https://www.markdownguide.org/) site. 15 | 16 | > The Markdown Guide is a free and open-source reference guide that explains how to use Markdown, the simple and easy-to-use markup language you can use to format virtually any document. 17 | 18 | Or read more on [Wikipedia](https://en.m.wikipedia.org/wiki/Markdown). 19 | 20 | > Markdown is a lightweight markup language for creating formatted text using a plain-text editor. 21 | 22 | I also have [Markdown cheatsheets](https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/markdown/) if you need to brush up on the syntax or want to learn something new. 23 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | {%- comment -%} Based on layout in minima theme {%- endcomment -%} 2 | 3 | 4 | 5 | {%- include head.html -%} 6 | 7 | 8 | {%- include header.html -%} 9 | 10 |
11 |
12 | 13 | {{ content }} 14 | 15 |
16 | 17 |
18 | 19 | {%- include footer.html -%} 20 | {% include github-corner.html %} 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /_posts/2018-12-18-welcome-to-jekyll.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Welcome to Jekyll!" 3 | # Optional - date will be used from filename if not set here. 4 | date: 2018-12-18 18:24:52 +0200 5 | categories: jekyll update 6 | layout: post 7 | --- 8 | 9 | You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. 10 | 11 | To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. 12 | 13 | Jekyll also offers powerful support for code snippets. 14 | 15 | Using backticks. 16 | 17 | ```ruby 18 | def print_hi(name) 19 | puts "Hi, #{name}" 20 | end 21 | print_hi('Tom') 22 | #=> prints 'Hi, Tom' to STDOUT. 23 | ``` 24 | 25 | Using `highlight`. 26 | 27 | {% highlight ruby %} 28 | def print_hi(name) 29 | puts "Hi, #{name}" 30 | end 31 | print_hi('Tom') 32 | #=> prints 'Hi, Tom' to STDOUT. 33 | {% endhighlight %} 34 | 35 | Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. 36 | 37 | [jekyll-docs]: https://jekyllrb.com/docs/home 38 | [jekyll-gh]: https://github.com/jekyll/jekyll 39 | [jekyll-talk]: https://talk.jekyllrb.com/ 40 | -------------------------------------------------------------------------------- /_posts/2018-12-22-first-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "First post!" 3 | layout: post 4 | --- 5 | This is my first post after the one created as part of the blog template. 6 | -------------------------------------------------------------------------------- /_tools/github-pages.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: GitHub Pages 3 | description: |+ 4 | Websites for you and your projects. 5 | 6 | Hosted directly from your GitHub repository. Just edit, push, and your changes are live. 7 | --- 8 | 9 | See the [pages.github.com](https://pages.github.com/) home to learn more. 10 | 11 | With the standard flow, you don't need to run any CI steps yourself, locally or on GitHub. Just setup a repo that matches the minimum structure like this - [MichaelCurrin/simplest-jekyll](https://github.com/MichaelCurrin/simplest-jekyll). 12 | 13 | Then whenever you commit on GitHub or push to GitHub from your machine, then GitHub will build and deploy your site. 14 | 15 | 16 | ## Limitations 17 | 18 | Note the limitation that only certain Ruby gems are allowed and with locked versions. This limits the themes and plugins you can use. But there are plenty to use and a typical blog this be fine. 19 | 20 | See [GitHub Pages Versions](https://pages.github.com/versions/) 21 | 22 | When it comes to using themes, you can also use the Remote Themes plugin to pull in any theme from a GitHub URL, even if it is not on the standard gems list. 23 | 24 | 25 | ## Extending your build flow 26 | 27 | If you end up wanting more complex build flows with your own build and CI steps or custom gems, then consider using GitHub Actions for your GH Pages site. Or [Netlify](https://netlify.com/) - which is a separate platform that integrates well with a GitHub repo and has a config of just a few lines. Unlike GitHub Pages which needs longer setup. 28 | -------------------------------------------------------------------------------- /_tools/jekyll.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Jekyll 3 | description: Transform your plain text into static websites and blogs. 4 | --- 5 | 6 | A fun and easy static-site generator. 7 | 8 | Read more on the [jekyllrb.com](https://jekyllrb.com/) homepage. 9 | -------------------------------------------------------------------------------- /_tools/ruby.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Ruby 3 | description: | 4 | A dynamic, open source programming language with a focus on simplicity 5 | and productivity. It has an elegant syntax that is natural to read and easy to write. 6 | --- 7 | 8 | Read more on the [ruby-lang.org](https://www.ruby-lang.org/en/) homepage. 9 | 10 | Recommended - using Ruby 2.6 and Ruby 2.7 for a Jekyll site. Ruby 3 has been released but is not compatible yet. 11 | -------------------------------------------------------------------------------- /about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | layout: page 4 | permalink: /about/ 5 | --- 6 | 7 | This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/) 8 | 9 | Source code: 10 | 11 | [![jekyll - jekyll](https://img.shields.io/static/v1?label=jekyll&message=jekyll&color=blue&logo=github)](https://github.com/jekyll/jekyll) 12 | 13 | [![jekyll - minima](https://img.shields.io/static/v1?label=jekyll&message=minima&color=blue&logo=github)](https://github.com/jekyll/minima) 14 | -------------------------------------------------------------------------------- /assets/main.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "minima"; 5 | 6 | @media screen and (max-width: 900px) { 7 | .site-nav { 8 | position: absolute; 9 | right: 90px; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Jekyll Blog Demo documentation 2 | 3 | - [Installation](installation.md) 4 | - [Usage](usage.md) 5 | - [Template notes](template-notes/) 6 | 7 | -------------------------------------------------------------------------------- /docs/installation.md: -------------------------------------------------------------------------------- 1 | # Installation 2 | 3 | Set up this project to run locally. On Linux, macOS or Windows. 4 | 5 | 6 | ## Requirements 7 | 8 | - _Ruby_ - To install the project-scoped gems, including Jekyll. 9 | - _Bundler_ - Used to manage Ruby gem dependencies in an isolated directory, to preserve your global gems. 10 | - _Make_ - The docs here use the _make_ command, which comes standard on macOS or Linux machine, but on Windows you need to download and install Make. Or, if you go to [Makefile](/Makefile), you can look up the appropriate shell commands to run without `make`. 11 | 12 | 13 | ## Clone 14 | 15 | Optionally add this to your own repos - either fork this repo or click _Use this Template_. 16 | 17 | Then clone your repo or this one. 18 | 19 | Navigate to the repo root directory locally. 20 | 21 | You can view the commands available in the [Makefile](/Makefile) or skip to the next step. Note that `make` only works in macOS or Linux. Thought, it is optional, as you can run commands directly 22 | 23 | ```sh 24 | $ make help 25 | ``` 26 | 27 | 28 | ## Install system dependencies 29 | 30 | Install Ruby and Bundler globally - follow this [gist](https://gist.github.com/fb758aea4d35e03b9ed093afddf4e7ec). 31 | 32 | 33 | ## Install project dependencies 34 | 35 | Install local gems. 36 | 37 | ```sh 38 | $ make install 39 | ``` 40 | 41 | 42 | ## Upgrade 43 | 44 | Run this command if needed upgrade to the latest gems. 45 | 46 | ```sh 47 | $ make upgrade 48 | ``` 49 | 50 | When you upgrade, the `Gemfile.lock` file will be updated, if there are any changes. You can commit this to your own repo. This file is optional for _GitHub Pages_. 51 | -------------------------------------------------------------------------------- /docs/template-notes/README.md: -------------------------------------------------------------------------------- 1 | # Template notes 2 | 3 | 4 | 5 | This project was generated using the Jekyll CLI for a starting point. 6 | 7 | Now it also includes a demo of Jekyll _Collections_ too. See the _Languages_ section on the site, the `languages.md` file and the `_languages` directory. 8 | -------------------------------------------------------------------------------- /docs/template-notes/about.md: -------------------------------------------------------------------------------- 1 | # About 2 | 3 | 4 | ## Purpose 5 | 6 | This project serves as a starting point or a reference for building a statically-generated website using [Jekyll](https://jekyllrb.com/) and includes enough content and styling to demonstrate what a themed multi-page blog looks like, while the structure is easy to understand by keeping the number of files and lines of code low. 7 | 8 | Run this project as a local web server or remotely such as on [GitHub Pages](https://pages.github.com/) or Netlify. 9 | 10 | Only a simple repo configuration change is needed after you use this template - see the [GitHub Pages tutorial](https://help.github.com/en/github/working-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site) in GitHub's docs. 11 | 12 | _Note: This project's are instructions intended for a Linux or macOS environment._ 13 | 14 | Beginner tip for [Gemfile](/Gemfile) - this Gemfile is only used when running Jekyll locally i.e. it is **ignored** by GitHub Pages. It is useful when doing a GH Actions or Netlify build though. 15 | 16 | Versions should match GH Pages versions - [pages.github.com/versions/](https://pages.github.com/versions/). 17 | 18 | 19 | ## Demo site 20 | 21 | Through setting GitHub Pages section of the Github repo's settings, this site is available at: 22 | 23 | - [michaelcurrin.github.io/jekyll-blog-demo](https://michaelcurrin.github.io/jekyll-blog-demo/) 24 | 25 | Since this is a _project_ site and note a _user_ site, the subpath of `jekyll-blog-demo` is automatically set using the repo's name. In order to keep navigation and asset URLs in line with this and prevent errors, the `baseurl` in the [config](/_config.yml) file is also set to that subpath. 26 | 27 | 28 | # Project structure 29 | 30 | This project follows the typical structure of a Jekyll-based site. 31 | 32 | - The main content pages are markdown and HTML files at the top-level directory. See [index.md](/index.md) and [about.md](./about.md). Blog posts are in the [_posts](/_posts) directory. 33 | - The pages use "layout" fields to point to template files for styling and structure. There are no layouts in this project as the theme's layouts are referenced though. 34 | - The [minima](https://github.com/jekyll/minima) Jekyll theme is used for styling. This means that little or HTML is need in the content files from the first point above. 35 | - Jekyll builds to a `_site` directory both locally and on Github Pages. That directory contains public content that is served from the site's root URL. Certain files are not copied there based on Jekyll's rules and you can also added to the `excludes` field in the config. This prevents templates, the license and other private files from being served on the site. 36 | - This tutorial on Jekyll docs covers a few pages and posts. I've extended to include a collection too. 37 | -------------------------------------------------------------------------------- /docs/template-notes/background.md: -------------------------------------------------------------------------------- 1 | # Background 2 | 3 | 4 | ## About static sites and Jekyll 5 | 6 | The Github Page service lets you build and serve a statically generated site. 7 | 8 | The most basic way is to serve some flat HTML files (and other assets) without any logic. This is great for a one-page site with custom styling (rather than using a theme). 9 | 10 | This project is more advanced and runs with Jekyll. This is done by adding a [\_config.yml](/_config.yml) file. This lets you use templating and themes, which makes it easier to avoid code duplication and lets you change out a theme in your config rather than your content files. Read more in this [config guide](https://github.com/MichaelCurrin/code-cookbook/blob/master/recipes/jekyll/project-files/config.md). 11 | 12 | Note that the [Gemfile](/Gemfile) is used for local development and not used by Github Pages. 13 | 14 | 15 | ## Simple site 16 | 17 | A basic Jekyll site with theme can be made using files as follows: 18 | 19 | - **index.md** - The website homepage, including which layout to use and some body content. 20 | ```markdown 21 | --- 22 | layout: home 23 | --- 24 | 25 | Hello, world! 26 | 27 | More content goes here. Markdown is valid here. Make sure it is not indented otherwise at 4 spaces it becomes a codeblock. 28 | 29 | HTML is valid in a `.md` file too. 30 | 31 | - Markdown 32 | - after 33 | - the 34 | - HTML works fine. 35 | ``` 36 | - **\_config.yml** - Tell Github Pages to use a certain theme. 37 | ```yaml 38 | theme: minima 39 | ``` 40 | 41 | We use the the `home` layout above, though this could be `page` or `default` depending on the look we want and what the theme supports. Not all themes will have `home` as a layout. 42 | 43 | The `minima` theme we use is supported by Github Pages and it comes with a `home` layout. You do not need a layouts folder, but you can choose to override or create layout files. 44 | 45 | As an alternative to setting the theme by hand, you can set this theme by choosing a theme on Github Pages section of your repo's Settings. That view also lets you preview a theme before saving it (which then creates/updates the config for you). 46 | 47 | 48 | ## This project's origin 49 | 50 | This repo is based on an example provided by Jekyll, available as the [jekyll/example](https://github.com/jekyll/example) repo. One way to get that example is to run the command from a [Jekyll](https://jekyllrb.com/) tutorial: 51 | 52 | ```sh 53 | $ jekyll new jekyll-blog-demo 54 | ``` 55 | -------------------------------------------------------------------------------- /docs/template-notes/customization.md: -------------------------------------------------------------------------------- 1 | 2 | ### Customization 3 | 4 | Create a project from this template or fork it. Then update it to suit your own needs. 5 | 6 | - Replace the `baseurl` value in the [config](/_config.yml) with your own project's name. 7 | - To change the theme, set one in both the [config](/_config.yml) and [Gemfile](/Gemfile). Both are needed for a local builds, while only the config needs to be set for Github Pages builds, at least for the builtin themes on Github Pages. 8 | 9 | You can remove these and add more content pages or blog posts. If you don't need markdown you can convert files from `.md` to `.html` and change the content. 10 | 11 | Update the values in the config file to match your project. Such as `url`. 12 | 13 | If you want Google Analytics tracking, this is already supported by the Minima theme used here. So just set the ID in the config file. 14 | 15 | Example: 16 | 17 | - `_config.yml` 18 | ```yaml 19 | google_analytics: UA-123467-78 20 | ``` 21 | 22 | Note on [.gitignore](/.gitignore) - `.jekyll-metadata` is a file that should be ignored. It is created when running `jekyll new PATH` or more commonly when serving in incremental mode. 23 | 24 | 25 | ### Gems 26 | 27 | This project uses the following gems, which came with the sample blog: 28 | 29 | - [jekyll](https://github.com/jekyll/jekyll) 30 | - This builds the site locally or in the cloud. Installed in the project gems rather than globally. 31 | - > "Jekyll is a blog-aware static site generator in Ruby" 32 | - [minima](https://github.com/jekyll/minima) 33 | - This is a theme to add styling to built pages. 34 | - > "Minima is a one-size-fits-all Jekyll theme for writers." 35 | - [jekyll-feed](https://github.com/jekyll/jekyll-feed) 36 | - Add Atom feed around blog posts. 37 | - [jekyll-sitemap](https://github.com/jekyll/jekyll-sitemap) 38 | - Add `robots.txt` and `sitemap.xml` files. 39 | - [jekyll-seo-tag](https://github.com/jekyll/jekyll-seo-tag) 40 | - Add SEO metadata tags to the page. 41 | - This used by the theme and its template so does not have to be covered directly in this blog's config, unlike the two covered above. 42 | 43 | If you are running on Windows, you might want to add these to `Gemfile`, as they came with the quickstart. 44 | 45 | ```ruby 46 | # Windows does not include zoneinfo files, so bundle the tzinfo-data gem 47 | gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby] 48 | 49 | # Performance-booster for watching directories on Windows 50 | gem "wdm", "~> 0.1.0" if Gem.win_platform? 51 | ``` 52 | -------------------------------------------------------------------------------- /docs/template-notes/jekyll-4.md: -------------------------------------------------------------------------------- 1 | # Jekyll 2 | 3 | 4 | Most sites will probably be okay with Jekyll 3 and the GitHub Pages default environment, as used in this demo. 5 | 6 | But, for more customization such as Jekyll 4 and GitHub Actions, see this template: 7 | 8 | - [MichaelCurrin/jekyll-gh-actions-quickstart](https://github.com/MichaelCurrin/jekyll-gh-actions-quickstart) 9 | -------------------------------------------------------------------------------- /docs/template-notes/plugins.md: -------------------------------------------------------------------------------- 1 | # Plugins 2 | 3 | See [Plugins](https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/jekyll/plugins/) sections of Dev Cheatsheets. In particular, how to _enable_ plugins. 4 | -------------------------------------------------------------------------------- /docs/template-notes/related-projects.md: -------------------------------------------------------------------------------- 1 | # Related projects 2 | 3 | - [Simplest Jekyll](https://github.com/MichaelCurrin/simplest-jekyll) 4 | - [GH Pages Site No Jekyll](https://github.com/MichaelCurrin/gh-pages-no-jekyll) 5 | -------------------------------------------------------------------------------- /docs/usage.md: -------------------------------------------------------------------------------- 1 | # Usage 2 | 3 | ## Start dev server 4 | 5 | ```sh 6 | $ make serve 7 | ``` 8 | 9 | Open the browser at: 10 | 11 | - http://localhost:4000/jekyll-blog-demo/ 12 | 13 | 14 | ## Build 15 | 16 | ```sh 17 | $ make build 18 | ``` 19 | 20 | View the output in `_site` directory, which can then be served as a static site. 21 | -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 3 | layout: home 4 | --- 5 | 6 | 7 | 8 | Welcome to my **Jekyll Blog Demo**. 9 | 10 | [![MichaelCurrin - jekyll-blog-demo](https://img.shields.io/static/v1?label=MichaelCurrin&message=jekyll-blog-demo&color=blue&logo=github)](https://github.com/MichaelCurrin/jekyll-blog-demo) 11 | [![stars - jekyll-blog-demo](https://img.shields.io/github/stars/MichaelCurrin/jekyll-blog-demo?style=social)](https://github.com/MichaelCurrin/jekyll-blog-demo) 12 | [![forks - jekyll-blog-demo](https://img.shields.io/github/forks/MichaelCurrin/jekyll-blog-demo?style=social)](https://github.com/MichaelCurrin/jekyll-blog-demo) 13 | 14 | Create a new Jekyll blog based on this demo. 15 | 16 |
17 | 18 | Use this template 20 | 21 |
22 | 23 | 24 | ## Table of contents 25 | 26 | For Jekyll developers - this is a list of all collections and the pages under each. 27 | 28 | {% include collections-overview.html %} 29 | -------------------------------------------------------------------------------- /languages.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Languages 3 | description: | 4 | This section covers languages will you need to be familar with to build a Jekyll static site 5 | --- 6 | 7 | 23 | -------------------------------------------------------------------------------- /sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MichaelCurrin/jekyll-blog-demo/af52ce6e43023067302d0d048a4c1981daadec0d/sample.png -------------------------------------------------------------------------------- /tools.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tools 3 | description: What you need to make a static site that runs locally and on GitHub Pages 4 | --- 5 | 6 | This page showcases how to list items in a specific collection. 7 | 8 | 24 | --------------------------------------------------------------------------------