loikein / hugo-lithium-loikein

Lithium - A simple responsive Hugo theme

Home Page:https://notes.loikein.one/post/2018/01/rmd-template/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hugo Lithium

A simple responsive blog theme for Hugo forked from https://github.com/jrutheiser/hugo-lithium-theme with modifications to make it work better with blogdown.

The easiest way to get started is to create a new (empty) RStudio project, then

devtools::install_github('rstudio/blogdown')  # install blogdown
blogdown::new_site(theme = 'loikein/hugo-lithium')

Then you should be able to see an example website launched in the RStudio Viewer.

For the full documentation, please see this section in the blogdown book: https://bookdown.org/yihui/blogdown/themes.html

Features

  • Blog
  • Responsive
  • Disqus
  • Google web fonts (Merriweather and Lato)
  • MathJax
  • highlight.js

Changes by loikein

  • Better accessibility
    • Every link is focus-able
    • Skip to main button
    • Accessibility statement
    • Search (powered by Duckduckgo site syntax)
    • 404 page
  • Better looking
    • Dark mode
    • Floating table of content
    • Better table styles
    • Home page template (/layouts/index.html)
    • Google fonts for multiple languages
    • Responsive navigation links
    • apple-touch-icon
  • Faster
    • Migrate to KaTeX
  • Fix link bugs introduced by Hugo 0.55
    • .RelPermalink
    • RSS link

Changes by Yihui

The main changes I made to the original hugo-lithium-theme are:

  1. Added support for MathJax (for rendering LaTeX math expressions) and highlight.js (for syntax highlighting).

    • For both libraries, you can specify the CDN host (e.g., CloudFlare, BootCDN, ...).

    • For highlight.js, you can specify additional languages (e.g., r, yaml, tex, ...).

  2. Added Google web fonts (embedded in the theme so that visitors from countries where Google is banned can still see the typefaces).

  3. Improved Hugo's built-in Disqus template, so that you can actually view the comments even when you are previewing the website locally.

  4. Replaced the variable .Permalink with .RelPermalink, and function absURL with relURL where necessary. It is a bad idea to use full absolute links (with the protocol and domain) in general. For example, .Permalink and absURL may generate URLs of the form http://www.example.com/foo/bar.html, but /foo/bar.html is more portable.

License

The original hugo-lithium-theme was released by Jonathan Rutheiser under the MIT License. The modified version in this repository is also released under MIT.

About

Lithium - A simple responsive Hugo theme

https://notes.loikein.one/post/2018/01/rmd-template/

License:MIT License


Languages

Language:CSS 49.6%Language:HTML 43.0%Language:JavaScript 7.4%