- Notifications
You must be signed in to change notification settings - Fork9
A content-first minimalist Jekyll theme for blogs
License
vfvong/jekyll-theme-tao
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Tao is a content-first minimalist Jekyll theme for blogs.
Check thedemo.
- Support the CSS resetsNormalize
- SupportFont Awesome
- SupportMathJax
- SupportDisqus
- SupportGoogle Analytics 4
- Light and dark mode, via
prefers-color-scheme
- Archive pages implemented in pureLiquid
Add this line to your Jekyll site'sGemfile
:
gem"jekyll-theme-tao"
And add this line to your Jekyll site's_config.yml
:
theme:jekyll-theme-tao
And then execute:
$ bundle
Or install it yourself as:
$ gem install jekyll-theme-tao
If your website is hosted on GitHub Pages, you can install this theme viajekyll-remote-theme
.
Add the following to yourGemfile
:
gem"jekyll-remote-theme"
And add this line to your Jekyll site's_config.yml
:
plugins: -jekyll-remote-theme
Add the following to your site's_config.yml
:
remote_theme:vfvong/jekyll-theme-tao
You can refer to the_config.yml
of the demo to set some basic configuration of your site.
You can specify the language on each page by setting thelang
property. If the property is not set, thesite.lang
would be referred. If thesite.lang
is not set, the default valueen
would be applied.
If you want to put more data into the<head>
, you don't need to copy the whole_includes/head.html
file from this repo and overwrite it in your repo. You just need to create a_includes/custom-head.html
file in your repo, and put some data into there. These data will be automatically imported into the<head>
.
The navigation in Tao is very easy to configure, just specify the titles and URLs in the_data/navigation.yml
file, for example,
-title:Homeurl:/-title:Abouturl:/about.html-title:Archiveurl:/archive.html
The social links in Tao is also very easy to connfigure. You don't need to import any large SVG file to render the icons because Tao supports theFont Awesome. Specify the titles, URLs, and icons in the_data/social.yml
file, for example,
-title:Emailurl:mailto:vfvong@gmail.comicon:fas fa-envelope-title:Twitterurl:https://twitter.com/vfvongicon:fab fa-twitter-title:GitHuburl:https://github.com/vfvongicon:fab fa-github
Tao provides a templatearchive
to archive posts by years, categories, or tags.
If you want to show an archive page of years, just create a file and put these front matter in it:
---layout:archivetype:yearstitle:Archive by Years---
Similarly, if you want to show an archive page of categories, just create a file and put these front matter in it:
---layout:archivetype:categoriestitle:Archive by Categories---
Besides, if you want the categories and tags displayed in the post to link to the archive pages, you need to configure the paths to the category and tag archive pages in the_config.yml
file, for example:
categories_path:/categories/tags_path:/tags/
Tao relies on theMathJax to render math. The MathJax is disabled by default. You need to setmath: true
on the page where you want to enable the MathJax.
To enableDisqus, just set theDisqus shortname in the_config.yml
, for example,
disqus:<your disqus shortname>
Tao support theGoogle Analytics 4. To enable it, just set the Measurement ID in the_config.yml
, for example,
google_analytics:G-XXXXXXXXXX
You can easily modify some styles of this theme, such as colors and fonts. You don't have to copy a lot of CSS into your repository, just copy_sass/tao/_variables.scss
and change the variable value.
Bug reports and pull requests are welcome on GitHub athttps://github.com/vfvong/jekyll-theme-tao. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to theContributor Covenant code of conduct.
To set up your environment to develop this theme, runbundle install
.
Your theme is setup just like a normal Jekyll site! To test your theme, runbundle exec jekyll serve
and open your browser athttp://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
andassets
tracked with Git will be bundled.To add a custom directory to your theme-gem, please edit the regexp injekyll-theme-tao.gemspec
accordingly.
The theme is available as open source under the terms of theMIT License.
About
A content-first minimalist Jekyll theme for blogs