jekyll-theme-apollo

Port hexo-theme-apollo to Jekyll.

Installation

# Node.js + Pug
# https://nodejs.org/en/download/
npm install -g pug

# Jekyll
jekyll new blog && cd blog
echo gem \"jekyll-theme-apollo\", \"~\> 0.1.2\" >> Gemfile # add theme in `Gemfile`
sed -i "s/minima/jekyll-theme-apollo/g" _config.yml # chage theme in `_config.yml`
bundle install # :coffee:

Customization

In _config.yml:

... # default settings generated by jekyll
# settings listed below are all optional

# general settings
lang: zh-cn # language, [en, zh-cn]
copyright: <code>MIT License</code> # copyright info, as HTML
startyear: "2018" # affect footer if `copyright` unset, currently MUST using string
favicon_url: /assets/favicon.png # favicon, default value is `/favicon.ico`
logo_url: /assets/favicon.png # logo

# navigator
menu:
  - title: one
    url: /one
  - title: two
    url: http://two
  ...

# post settings
excerpt_separator: <!--more--> # excerpt indicator

# valine.js comment
valine:
  app_id: your-id
  app_key: your-key

# google analytics
google_analytics: ua-xxxxxxx

# site feed
plugins:
  - jekyll-feed
feed:
  path: atom.xml

... # continue default settings

Comments

  • Comment system is powered by valine.js
  • Ensure that you have the right valine.app_id and valine.app_key set in _config.yml
  • Comment is enabled by default, you can add comment: false to the front matter to disable it

MathJax

MathJax is disabled by default, add mathjax: true to the front matter if you want to enable it

Tip in post

You can use the block IAL to make a tip. Just add {:.tip} before/after a paragraph, like:

{:.tip}
Big Brother is watching you.

This is no longer a tip.

Translated article

If your article is translated from another source, then you can specify from: http://orginal-post in the front matter, it will make a link refer to the http://orignal-post.

Archive

Create a file such as archive.md, in anywhere you like, and make the front matter like:

---
layout: archive
---

See also

  1. hexo-theme-apollo/doc
  2. jekyll-theme-apollo/_doc