-
Notifications
You must be signed in to change notification settings - Fork 51
General Features
This theme has support for either Hugo's lightning fast Chroma, or both server side and client side highlighting. See the Hugo docs for more.
[Params]
useHLJS = true
Client side highlighting does not require pygments to be installed. This will use highlight.min.css instead of syntax.css for highlighting (effectively disabling Chroma). Highlight.js has a wider range of support for languages and themes, and an alternative highlighting engine.
To add Google Analytics, simply sign up to Google Analytics to obtain your Google Tracking ID, and add this tracking ID to the googleAnalytics
parameter in config.toml
.
If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two site parameters commit
has to be defined in the config file config.toml
:
enableGitInfo = true
[Params]
commit = "https://github.com/<username>/<siterepo>/tree/"
To allow Lightbi Hugo to go multilingual, you need to define the languages you want to use inside the languages
parameter on hugo.toml
file, also
redefining the content directory for each one. Check the i18n/
folder to see all languages available.
If there are multiple languages, theme will show a language switcher in the menu.
DefaultContentLanguage = "en"
defaultContentLanguageInSubdir = true
[languages]
[languages.en]
LanguageCode = "en"
LanguageName = "English"
weight = 1
title = "English Site"
contentDir = "content/en"
[languages.ml]
LanguageCode = "ml"
LanguageName = "Malayalam"
weight = 2
title = "Malayalam Site"
contentDir = "content/ml"
Now you just need to create a subdir within the content/
folder for each
language and just put stuff inside page/
and post/
regular directories.
content/ content/
└── en/ └── ml/
├── page/ ├── page/
└── post/ └── post/
Multilingual Hugo Documentation
With default settings, visiting to a website using Lightbi connects also to remote services like google fonts or jsdelivr to embed fonts, js and other assets.
To avoid this, set the following param in config.toml:
[Params]
selfHosted = true