Please describe the changes made in the pull request here.
This PR aims to add useful features, include
Version dropdown menu
This implementation redirects user to any URL user specific, for example https://v0-2.lotusdocs.dev/, and user is responsible to add new DNS and hosting a site for out-of-date docs.
Version warning banner
Multilingual mode & dropdown menu
Custom JS/CSS
Version dropdown menu
Multilingual mode
Banner for archived doc
Banner for unreleased doc
To enable these features, following config must be add to hugo.toml
defaultContentLanguage = 'en'
defaultContentLanguageInSubdir = true
[languages]
[languages.en]
contentDir = 'content/en'
disabled = false
languageCode = 'en-US'
languageDirection = 'ltr'
languageName = 'English'
title = 'Project Documentation'
weight = 2
[languages.en.params]
subtitle = 'Reference, Tutorials, and Explanations'
[languages.zh-hant]
contentDir = 'content/zh-hant'
disabled = false
languageCode = 'zh-Hant'
languageDirection = 'ltr'
languageName = '正體中文'
title = 'Project Documentation'
weight = 2
[languages.zh-hant.params]
subtitle = 'Reference, Tutorials, and Explanations'
[params]
# CSS/JS for home page
customCss = []
customJs = []
# CSS/JS for doc pages
docCustomCss = ["css/custom.css"]
docCustomJs = []
[params.versionInfo]
dropdownMenuText = "Releases"
archived = false # indicate this is an archived doc set branch and display warning banner - default false
unreleased = true # indicate this is an unreleased doc set branch and display warning banner - default false
[[params.versions]]
version = "Nightly"
url = "https://nightly.lotusdocs.dev/"
[[params.versions]]
version = "v0.1.0"
current = true # display as current branch version
[[params.versions]]
version = "v0.0.0"
url = "https://v0-1.lotusdocs.dev/"
For Multilingual, language specific documentation must be placed in the content/<lang>/docs, like the following
To add custom CSS/JS, you must place files under static/css & static/js. For example, I add custom.css and the hugo.toml I've used is
Changes
Please describe the changes made in the pull request here.
This PR aims to add useful features, include
https://v0-2.lotusdocs.dev/
, and user is responsible to add new DNS and hosting a site for out-of-date docs.Version dropdown menu
Multilingual mode
Banner for archived doc
Banner for unreleased doc
To enable these features, following config must be add to
hugo.toml
For
Multilingual
, language specific documentation must be placed in thecontent/<lang>/docs
, like the followingTo add custom CSS/JS, you must place files under
static/css
&static/js
. For example, I addcustom.css
and thehugo.toml
I've used isBelow you'll find a checklist. For each item on the list, check one option and delete the other.
Dark mode