Features
- Localized Layout
- Dark/Light Theme Mode
- Pinned Posts
- Hierarchical Categories
- Last Modified Date for Posts
- Table of Contents
- Auto-Generated Related Posts
- Syntax Highlighting
- Mathematical Expressions
- Disqus/Utterances/Giscus/Gitment Comments
- Site Search
- Atom Feeds
- Google Analytics
- SEO & Performance Optimisation
Introduction
If you want to use the theme just as it is on your own website, you have two options:
Installation
Add this line to your Jekyll site's Gemfile
:
gem "redeyed-jekyll-theme"
And add this line to your Jekyll site's _config.yml
:
theme: redeyed-jekyll-theme
And then execute:
$ bundle
Or install it yourself as:
$ gem install redeyed-jekyll-theme
📚 Developer's Quick Start
Before you start, please ensure that you've followed the instructions in the Jekyll Docs to complete the installation of Ruby
, RubyGems
, Jekyll
, and Bundler
. You also need to have the following packages installed:
- Git
- Node.js & npm (I recommend NVM regardless of your platform)
📘 1. Fork the Project
The first step you have already hopefully completed before getting to this part of the instructions - you need to fork the project from Github using your favourite tools or the Github website itself.
📘 2. Rename & Modify the Gemspec
The next thing you'll want to do is rename the redeyed-jekyll-theme.gemspec
file to reflect the name of your own project. Then, open that file and take care of the following details:
- spec.name
- spec.version
- spec.authors
- spec.email
- spec.summary
- spec.homepage
- spec.license
- spec.metadata
📘 3. Install standard-version
(Yes, I know it's deprecated - I'll change this as soon as I find a suitable replacement)
Install standard-version
as a global bin
:
$ npm i -g standard-version
📘 4. Install Commitlint & Husky
If you don't need to do things your own way, Commitlint and Husky can be installed using the script I've included with this package:
$ bash bin/install-commitlint
Otherwise, follow each step below and make your changes as necessary
Install commitlint
& husky
$ npm i --save-dev --location=global @commitlint/cli @commitlint/config-conventional husky
Configure commitlint
to use conventional config:
$ echo "module.exports = {extends: ['@commitlint/config-conventional']}" > ..commitlintrc.js
And then enable husky
:
$ husky install
Add a husky commit hook:
cat <<EEE > .husky/commit-msg
#!/usr/bin/env bash
. "\$(dirname "\$0")/_/husky.sh"
npx --no -- commitlint --edit "\${1}"
EEE
Make the hook executable:
$ chmod a+x .husky/commit-msg
Make sure you check out the Contributor's Guide - Appendices for tips on how to use commitlint, why it's useful, and examples of how to structure your own commit messages to make the best use of the package.
📘 5. Install Dependencies
Install Jekyll dependencies:
$ bundle install
📘 6. Start Local Server
Then, start your local server in watch mode:
$ bundle exex jekyll serve --watch
Now, open your browser to http://localhost:4000 and make your changes
When your theme is released, only the files in _layouts
, _includes
, _sass
and assets
tracked with Git will be bundled.
To add a custom directory to your theme-gem, please edit the regexp in redeyed-jekyll-theme.gemspec
accordingly.
📋 License
The theme is available as open source under the terms of the MIT License.