Chungking is a modern, elegant Jekyll theme with a focus on clear yet stylish content delivery. If you're looking to do some heavy blogging or article writing, Chungking is for you.
Show off the best posts on your site via an image carousel on the main page. Any post with the featured: true
property set in the front matter will automatically be added to the carousel.
For long posts with multiple sections, generate a table of contents corresponding to the markdown headers in your text. To add a table of contents, set the field toc
in your front matter, with the headers to be included as the values. For example, toc: h2, h3,h4
will set h2 headers as main section headings, and h3 and h4 as subsection headings in the table of contents.
The table of contents feature utilizes scrollnav.js.
Chungking's responsive design ensures smooth scaling across devices with different screen sizes.
Possible front matter configuration for posts:
---
layout: post
title: My Post
blurb: A short description of the post. Truncates at 25 words.
image: /path/to/post/cover/image.jpg
# images typically go in the assets/images folder
featured: true
# Adds this post to the featured carousel on the home page
toc: true
# Generates a table of contents for the current post, based on the markdown header # tags in the text
---
My text...
New pages added in the _pages
directory are automatically added to the header nav menu.
Page front matter configuration is similar to Post front matter, excluding the blurb
and featured
properties.
Add this line to your Jekyll site's Gemfile
:
gem "chungking"
And add this line to your Jekyll site's _config.yml
:
theme: chungking
And then execute:
$ bundle
Or install it yourself as:
$ gem install chungking
Bug reports and pull requests are welcome on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
To set up your environment to develop this theme, run bundle install
.
Your theme is setup just like a normal Jekyll site! To test your theme, run bundle exec jekyll serve
and open your browser at http://localhost:4000
. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
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 chungking.gemspec
accordingly.
The theme is available as open source under the terms of the MIT License.