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 = 'yihui/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
- Google Analytics
- Google web fonts (Merriweather and Lato)
The main changes I made to the original hugo-lithium-theme are:
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.,
Added Google web fonts (embedded in the theme so that visitors from countries where Google is banned can still see the typefaces).
Improved Hugo's built-in Disqus template, so that you can actually the comments even when you are previewing the website locally.
Replaced the variable
.RelPermalink, and function
relURLwhere necessary. It is a bad idea to use full absolute links (with the protocol and domain) in general. For example,
absURLmay generate URLs of the form
/foo/bar.htmlis more portable.
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.