Add Lotusdocs theme
This commit is contained in:
28
themes/lotusdocs/exampleSite/.gitignore
vendored
Normal file
28
themes/lotusdocs/exampleSite/.gitignore
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
|
||||
/public
|
||||
/themes
|
||||
.DS_Store
|
||||
.hugo_build.lock
|
||||
20
themes/lotusdocs/exampleSite/LICENSE
Normal file
20
themes/lotusdocs/exampleSite/LICENSE
Normal file
@@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2023 Colin Wilson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
28
themes/lotusdocs/exampleSite/README.md
Normal file
28
themes/lotusdocs/exampleSite/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Lotus Docs Example Site
|
||||
|
||||
This repository offers a multilingual example site using the [Lotus Docs](https://github.com/colinwilson/lotusdocs) Hugo theme.
|
||||
|
||||
# Using
|
||||
|
||||
1. [Install Hugo](https://gohugo.io/overview/installing/)
|
||||
2. Clone this repository
|
||||
|
||||
```bash
|
||||
$ git clone --depth 1 https://github.com/colinwilson/lotusdocs lotusdocs
|
||||
$ cd lotusdocs/exampleSite
|
||||
```
|
||||
3. Run Hugo server.
|
||||
|
||||
```bash
|
||||
$ hugo server
|
||||
```
|
||||
## Notes:
|
||||
|
||||
The `exampleSite` functions by using the Hugo [`replace`](https://gohugo.io/hugo-modules/use-modules/#make-and-test-changes-in-a-module) directive (in [`go.mod`](go.mod#L10)) to point the default `lotusdocs` module path, `github.com/colinwilson/lotusdocs`, to the local directory above where the theme is cloned:
|
||||
|
||||
```go
|
||||
// go.mod
|
||||
...
|
||||
|
||||
replace github.com/colinwilson/lotusdocs => ../
|
||||
```
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
weight: 200
|
||||
title: "Beispielinhalt"
|
||||
description: "Beispielinhalt"
|
||||
icon: "edit"
|
||||
date: "2023-06-08T06:34:57+01:00"
|
||||
lastmod: "2023-06-08T06:34:57+01:00"
|
||||
draft: false
|
||||
---
|
||||
125
themes/lotusdocs/exampleSite/content/de/docs/quickstart.md
Normal file
125
themes/lotusdocs/exampleSite/content/de/docs/quickstart.md
Normal file
@@ -0,0 +1,125 @@
|
||||
---
|
||||
weight: 100
|
||||
date: "2023-05-03T22:37:22+01:00"
|
||||
draft: false
|
||||
author: "Colin Wilson"
|
||||
title: "Schnellstart"
|
||||
icon: "rocket_launch"
|
||||
toc: true
|
||||
description: "Ein QuickStart -Leitfaden zum Erstellen neuer Inhalte in Lotus -Dokumenten"
|
||||
publishdate: "2023-05-03T22:37:22+01:00"
|
||||
tags: ["Beginners"]
|
||||
---
|
||||
|
||||
## Neue Inhalte erstellen
|
||||
|
||||
Navigate to the root of your Hugo project and use the `hugo new` command to create a file in the `content/docs` directory:
|
||||
|
||||
```shell
|
||||
hugo new docs/example-page.md
|
||||
```
|
||||
|
||||
This will create a markdown file named `example-page.md` with the following default front matter:
|
||||
|
||||
```toml
|
||||
+++
|
||||
title = "Example Page"
|
||||
description = ""
|
||||
icon = "article"
|
||||
date = "2023-05-22T00:27:57+01:00"
|
||||
lastmod = "2023-05-22T00:27:57+01:00"
|
||||
draft = false
|
||||
toc = true
|
||||
weight = 999
|
||||
+++
|
||||
```
|
||||
|
||||
Modify the options to suit your needs.
|
||||
|
||||
The code below shows the front matter code used to create this page, along with some markdown in the body:
|
||||
|
||||
```md
|
||||
+++
|
||||
weight = 100
|
||||
date = "2023-05-03T22:37:22+01:00"
|
||||
draft = true
|
||||
author = "Colin Wilson"
|
||||
title = "Quickstart"
|
||||
icon = "rocket_launch"
|
||||
toc = true
|
||||
description = "A quickstart guide to creating new content in Lotus Docs"
|
||||
publishdate = "2023-05-03T22:37:22+01:00"
|
||||
tags = ["Beginners"]
|
||||
+++
|
||||
|
||||
## Create New Content
|
||||
|
||||
Navigate to the root of your Hugo project and use the `hugo new` command to create a file in the `content/docs` directory:
|
||||
|
||||
```shell
|
||||
hugo new docs/examplepage.md
|
||||
```
|
||||
...
|
||||
```
|
||||
|
||||
## Ordering Content
|
||||
|
||||
Lotus Docs uses a simple weighting method for ordering content and creating menus.
|
||||
|
||||
The front matter `weight` variable is used to order all content and auto-generate the menu structure (including the sidebar menu and page navigation buttons). Lower weight values take higher precedence. So content with lower weights come first and are so ordered in the menu.
|
||||
|
||||
## Auto-Generated Menu
|
||||
|
||||
As mentioned, Lotus Docs auto-generates menus and navigation links using the [front matter](https://gohugo.io/content-management/front-matter/#predefined) weight variable. For example, Navigate to the `content/docs` directory and create two content files, `doc-one.md` and `doc-two.md`, then edit the weight values to `100` and `200` respectively:
|
||||
|
||||
{{< alert text="It's good practice to increment the weight of your posts by a factor of <code>100</code>. This ensures plenty of room to insert new posts between existing items should you need to." />}}
|
||||
|
||||
Your directory structure should now look like this:
|
||||
|
||||
```treeview
|
||||
content/
|
||||
└── docs/
|
||||
├── doc-one.md
|
||||
└── doc-two.md
|
||||
```
|
||||
|
||||
Links to both posts are now visible in the sidebar menu where `doc-one.md` will come before and be placed above `doc-two.md`:
|
||||
|
||||

|
||||
|
||||
{{< alert context="info" text="The option to manually arrange content via a predefined menu structure in <code>hugo.toml</code> as opposed to auto-generated via content weights is on the Lotus Docs roadmap." />}}
|
||||
|
||||
## Second Level Menu Items
|
||||
|
||||
Second level menu items can be generated by first creating a **'parent'** directory containing an `_index.md` file, e.g.:
|
||||
|
||||
```shell
|
||||
hugo new docs/parent-directory/_index.md
|
||||
```
|
||||
|
||||
The above command creates a directory named `parent-directory` under `content/docs`:
|
||||
|
||||
```treeview
|
||||
content/
|
||||
└── docs/
|
||||
└── parent-directory/
|
||||
```
|
||||
|
||||
You can now create second level items inside the `parent-directory` as normal. Run the `hugo new` command again to create a post inside the newly created `parent-directory`:
|
||||
|
||||
```shell
|
||||
hugo new docs/parent-directory/doc-three.md
|
||||
```
|
||||
|
||||
Your directory/file structure should now look like this:
|
||||
|
||||
```treeview
|
||||
content/
|
||||
└── docs/
|
||||
└── parent-directory/
|
||||
└── doc-three.md
|
||||
```
|
||||
|
||||
This is reflected in the sidebar menu with `parent-directory` acting as a dropdown menu containing a link to the **Doc Three** post:
|
||||
|
||||

|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
weight: 200
|
||||
title: "Example Content"
|
||||
description: "Example content"
|
||||
icon: "edit"
|
||||
date: "2023-05-22T00:34:57+01:00"
|
||||
lastmod: "2023-05-22T00:34:57+01:00"
|
||||
draft: false
|
||||
---
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
title: "Code"
|
||||
description: ""
|
||||
icon: "code"
|
||||
date: "2023-05-22T00:44:31+01:00"
|
||||
lastmod: "2023-05-22T00:44:31+01:00"
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 210
|
||||
---
|
||||
|
||||
{{% alert context="warning" text="The front matter `description` value for this page has been intentionally left empty in order to demonstrate FlexSearch's suggested results fallback behaviour." /%}}
|
||||
|
||||
## Code Block Examples
|
||||
|
||||
Code block language examples
|
||||
|
||||
### Go
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("hello world")
|
||||
}
|
||||
```
|
||||
|
||||
### HTML
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<h1>My First Heading</h1>
|
||||
|
||||
<p>My first paragraph.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Markdown
|
||||
|
||||
```md
|
||||
# H1 heading
|
||||
|
||||
**Some bold text**
|
||||
|
||||
*Italic text example*
|
||||
```
|
||||
@@ -0,0 +1,177 @@
|
||||
---
|
||||
weight: 220
|
||||
title: "Mermaid"
|
||||
description: "Example Mermaid diagrams"
|
||||
icon: "function"
|
||||
date: "2023-09-08T05:12:51+01:00"
|
||||
lastmod: "2023-09-08T05:12:51+01:00"
|
||||
draft: false
|
||||
toc: true
|
||||
---
|
||||
|
||||
## Flowchart
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
|
||||
A[Hard] -->|Text| B(Round)
|
||||
B --> C{Decision}
|
||||
C -->|One| D[Result 1]
|
||||
C -->|Two| E[Result 2]
|
||||
```
|
||||
|
||||
## Sequence diagram
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
Alice->>John: Hello John, how are you?
|
||||
loop Healthcheck
|
||||
John->>John: Fight against hypochondria
|
||||
end
|
||||
Note right of John: Rational thoughts!
|
||||
John-->>Alice: Great!
|
||||
John->>Bob: How about you?
|
||||
Bob-->>John: Jolly good!
|
||||
```
|
||||
|
||||
## Gantt Chart
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
section Section
|
||||
Completed :done, des1, 2014-01-06,2014-01-08
|
||||
Active :active, des2, 2014-01-07, 3d
|
||||
Parallel 1 : des3, after des1, 1d
|
||||
Parallel 2 : des4, after des1, 1d
|
||||
Parallel 3 : des5, after des3, 1d
|
||||
Parallel 4 : des6, after des4, 1d
|
||||
```
|
||||
|
||||
## Class diagram
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
<<interface>> Class01
|
||||
Class09 --> C2 : Where am i?
|
||||
Class09 --* C3
|
||||
Class09 --|> Class07
|
||||
Class07 : equals()
|
||||
Class07 : Object[] elementData
|
||||
Class01 : size()
|
||||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
class Class10 {
|
||||
>>service>>
|
||||
int id
|
||||
size()
|
||||
}
|
||||
```
|
||||
|
||||
## State diagram
|
||||
|
||||
```mermaid
|
||||
stateDiagram-v2
|
||||
[*] --> Still
|
||||
Still --> [*]
|
||||
Still --> Moving
|
||||
Moving --> Still
|
||||
Moving --> Crash
|
||||
Crash --> [*]
|
||||
```
|
||||
|
||||
## Pie Chart
|
||||
|
||||
```mermaid
|
||||
pie
|
||||
"Dogs" : 386
|
||||
"Cats" : 85.9
|
||||
"Rats" : 15
|
||||
```
|
||||
|
||||
## Git Graph
|
||||
|
||||
```mermaid
|
||||
gitGraph
|
||||
commit
|
||||
commit
|
||||
branch develop
|
||||
checkout develop
|
||||
commit
|
||||
commit
|
||||
checkout main
|
||||
merge develop
|
||||
commit
|
||||
commit
|
||||
```
|
||||
|
||||
## Bar chart (using gantt chart)
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
title Git Issues - days since last update
|
||||
dateFormat X
|
||||
axisFormat %s
|
||||
|
||||
section Issue19062
|
||||
71 : 0, 71
|
||||
section Issue19401
|
||||
36 : 0, 36
|
||||
section Issue193
|
||||
34 : 0, 34
|
||||
section Issue7441
|
||||
9 : 0, 9
|
||||
section Issue1300
|
||||
5 : 0, 5
|
||||
```
|
||||
|
||||
## User Journey diagram
|
||||
|
||||
```mermaid
|
||||
journey
|
||||
title My working day
|
||||
section Go to work
|
||||
Make tea: 5: Me
|
||||
Go upstairs: 3: Me
|
||||
Do work: 1: Me, Cat
|
||||
section Go home
|
||||
Go downstairs: 5: Me
|
||||
Sit down: 3: Me
|
||||
```
|
||||
|
||||
## C4 diagram
|
||||
|
||||
```mermaid
|
||||
C4Context
|
||||
title System Context diagram for Internet Banking System
|
||||
|
||||
Person(customerA, "Banking Customer A", "A customer of the bank, with personal bank accounts.")
|
||||
Person(customerB, "Banking Customer B")
|
||||
Person_Ext(customerC, "Banking Customer C")
|
||||
System(SystemAA, "Internet Banking System", "Allows customers to view information about their bank accounts, and make payments.")
|
||||
|
||||
Person(customerD, "Banking Customer D", "A customer of the bank, <br/> with personal bank accounts.")
|
||||
|
||||
Enterprise_Boundary(b1, "BankBoundary") {
|
||||
|
||||
SystemDb_Ext(SystemE, "Mainframe Banking System", "Stores all of the core banking information about customers, accounts, transactions, etc.")
|
||||
|
||||
System_Boundary(b2, "BankBoundary2") {
|
||||
System(SystemA, "Banking System A")
|
||||
System(SystemB, "Banking System B", "A system of the bank, with personal bank accounts.")
|
||||
}
|
||||
|
||||
System_Ext(SystemC, "E-mail system", "The internal Microsoft Exchange e-mail system.")
|
||||
SystemDb(SystemD, "Banking System D Database", "A system of the bank, with personal bank accounts.")
|
||||
|
||||
Boundary(b3, "BankBoundary3", "boundary") {
|
||||
SystemQueue(SystemF, "Banking System F Queue", "A system of the bank, with personal bank accounts.")
|
||||
SystemQueue_Ext(SystemG, "Banking System G Queue", "A system of the bank, with personal bank accounts.")
|
||||
}
|
||||
}
|
||||
|
||||
BiRel(customerA, SystemAA, "Uses")
|
||||
BiRel(SystemAA, SystemE, "Uses")
|
||||
Rel(SystemAA, SystemC, "Sends e-mails", "SMTP")
|
||||
Rel(SystemC, customerA, "Sends e-mails to")
|
||||
```
|
||||
297
themes/lotusdocs/exampleSite/content/docs/quickstart.md
Normal file
297
themes/lotusdocs/exampleSite/content/docs/quickstart.md
Normal file
@@ -0,0 +1,297 @@
|
||||
---
|
||||
weight: 100
|
||||
date: "2023-05-03T22:37:22+01:00"
|
||||
draft: false
|
||||
author: "Colin Wilson"
|
||||
title: "Quickstart"
|
||||
icon: "rocket_launch"
|
||||
toc: true
|
||||
description: "A quickstart guide to creating new content in Lotus Docs"
|
||||
publishdate: "2023-05-03T22:37:22+01:00"
|
||||
tags: ["Beginners"]
|
||||
---
|
||||
|
||||
## Requirements
|
||||
|
||||
- **git**
|
||||
- **Go ≥ v1.19**
|
||||
- **Hugo ≥ v0.100.0** (Extended Version)
|
||||
|
||||
## Install Hugo
|
||||
|
||||
Install the [Hugo CLI](https://github.com/gohugoio/hugo/releases/latest), using the specific instructions for your operating system below:
|
||||
|
||||
{{< tabs tabTotal="4">}}
|
||||
{{% tab tabName="Linux" %}}
|
||||
|
||||
Your Linux distro’s package manager may include Hugo. If this is the case, install it directly using your distro’s package manager – for instance, in Ubuntu, run the following command. This will install the extended edition of Hugo:
|
||||
|
||||
```shell
|
||||
sudo apt install hugo
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab tabName="Homebrew (macOS)" %}}
|
||||
|
||||
If you use the package manager [Homebrew](https://brew.sh/), run the `brew install` command in your terminal to install Hugo:
|
||||
|
||||
```shell
|
||||
brew install hugo
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab tabName="Windows (Chocolatey)" %}}
|
||||
|
||||
If you use the package manager [Chocolatey](https://chocolatey.org/), run the `choco install` command in your terminal to install Hugo:
|
||||
|
||||
```shell
|
||||
choco install hugo --confirm
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab tabName="Windows (Scoop)" %}}
|
||||
|
||||
If you use the package manager [Scoop](https://scoop.sh/), run the `scoop install` command in your terminal to install Hugo:
|
||||
|
||||
```shell
|
||||
scoop install hugo
|
||||
```
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tabs >}}
|
||||
|
||||
### Manual Installation
|
||||
|
||||
The Hugo GitHub repository contains pre-built versions of the Hugo command-line tool for various operating systems, which can be found on the [Releases page](https://github.com/gohugoio/hugo/releases/latest)
|
||||
|
||||
For more instruction on installing these releases, refer to [Hugo’s documentation](https://gohugo.io/getting-started/installing/)
|
||||
|
||||
## Create a New Lotus Docs Site
|
||||
|
||||
With Hugo installed, create a new Hugo project using the `hugo new` command:
|
||||
|
||||
```shell
|
||||
hugo new site my-docs-site && cd my-docs-site
|
||||
```
|
||||
|
||||
Now initialize your project as a Hugo Module using the `hugo mod init` command:
|
||||
|
||||
```
|
||||
hugo mod init my-docs-site
|
||||
```
|
||||
|
||||
{{% alert context="info" text="**Note**: If your site already has a git repository, you can initialise your site using the path to your site's git repository e.g. `hugo mod init github.com/<user>/<my-docs-site>/`." /%}}
|
||||
|
||||
You can now choose your preferred method for adding the Lotus Docs theme to your new site from the options below:
|
||||
|
||||
{{< tabs tabTotal="3">}}
|
||||
{{% tab tabName="Add as a Hugo Module" %}}
|
||||
|
||||
Edit the `hugo.toml` configuration file to include the [Lotus Docs theme](https://github.com/colinwilson/lotusdocs) and the [Hugo Bootstrap module](https://github.com/gohugoio/hugo-mod-bootstrap-scss) (lines `5 to 11` below):
|
||||
|
||||
```toml {linenos=table,hl_lines=["5-11"]}
|
||||
baseURL = 'http://example.org/'
|
||||
languageCode = 'en-us'
|
||||
title = 'My New Hugo Site'
|
||||
|
||||
[module]
|
||||
[[module.imports]]
|
||||
path = "github.com/colinwilson/lotusdocs"
|
||||
disable = false
|
||||
[[module.imports]]
|
||||
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
|
||||
disable = false
|
||||
```
|
||||
{{% alert context="info" text="**Note**: Hugo ≥ v0.110.0 changed the name of the default config base filename to `hugo.toml`. If you're running an earlier version of Hugo, consider renaming your `config.toml` file to `hugo.toml`." /%}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab tabName="Add as a Git submodule" %}}
|
||||
|
||||
Initialize Git and clone the Lotus Docs theme repository as a submodule:
|
||||
|
||||
```shell
|
||||
git init
|
||||
git submodule add https://github.com/colinwilson/lotusdocs themes/lotusdocs
|
||||
```
|
||||
|
||||
Update your existing `hugo.toml` config file with the configuration below:
|
||||
|
||||
```toml {linenos=table,hl_lines=["5-11"]}
|
||||
baseURL = 'http://example.org/'
|
||||
languageCode = 'en-us'
|
||||
title = 'My New Hugo Site'
|
||||
|
||||
[module]
|
||||
[[module.imports]]
|
||||
path = "lotusdocs"
|
||||
disable = false
|
||||
[[module.imports]]
|
||||
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
|
||||
disable = false
|
||||
```
|
||||
|
||||
{{% alert context="info" text="**Note**: Hugo ≥ v0.110.0 changed the name of the default config base filename to `hugo.toml`. If you're running an earlier version of Hugo, consider renaming your `config.toml` file to `hugo.toml`." /%}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab tabName="Clone theme files" %}}
|
||||
|
||||
In cases where you prefer to customise and maintain the Lotus Docs theme yourself, you can clone the theme into your project’s `themes` subdirectory.
|
||||
|
||||
Run the following command from your project’s root directory to clone the Lotus Docs theme into your `themes` subdirectory:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/colinwilson/lotusdocs themes/lotusdocs
|
||||
```
|
||||
|
||||
Edit the `hugo.toml` configuration file to include the Lotus Docs theme and the Hugo Bootstrap module (lines `5 to 11` below):
|
||||
|
||||
```toml {linenos=table,hl_lines=["5-11"]}
|
||||
baseURL = 'http://example.org/'
|
||||
languageCode = 'en-us'
|
||||
title = 'My New Hugo Site'
|
||||
|
||||
[module]
|
||||
[[module.imports]]
|
||||
path = "lotusdocs"
|
||||
disable = false
|
||||
[[module.imports]]
|
||||
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
|
||||
disable = false
|
||||
```
|
||||
{{< alert context="info" text="**Note**: Hugo ≥ v0.110.0 changed the name of the default config base filename to `hugo.toml`. If you're running an earlier version of Hugo, consider renaming your `config.toml` file to `hugo.toml`." />}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tabs >}}
|
||||
|
||||
## Create New Content
|
||||
|
||||
Navigate to the root of your Hugo project and use the `hugo new` command to create a file in the `content/docs` directory:
|
||||
|
||||
```shell
|
||||
hugo new docs/example-page.md
|
||||
```
|
||||
|
||||
This will create a markdown file named `example-page.md` with the following default front matter:
|
||||
|
||||
```toml
|
||||
+++
|
||||
title = "Example Page"
|
||||
description = ""
|
||||
icon = "article"
|
||||
date = "2023-05-22T00:27:57+01:00"
|
||||
lastmod = "2023-05-22T00:27:57+01:00"
|
||||
draft = false
|
||||
toc = true
|
||||
weight = 999
|
||||
+++
|
||||
```
|
||||
|
||||
Modify the options to suit your needs.
|
||||
|
||||
The code below shows the front matter code used to create this page, along with a portion of markdown from the body:
|
||||
|
||||
{{< prism lang="md" >}}
|
||||
+++
|
||||
weight = 100
|
||||
date = "2023-05-03T22:37:22+01:00"
|
||||
draft = true
|
||||
author = "Colin Wilson"
|
||||
title = "Quickstart"
|
||||
icon = "rocket_launch"
|
||||
toc = true
|
||||
description = "A quickstart guide to creating new content in Lotus Docs"
|
||||
publishdate = "2023-05-03T22:37:22+01:00"
|
||||
tags = ["Beginners"]
|
||||
+++
|
||||
|
||||
## Create New Content
|
||||
|
||||
Navigate to the root of your Hugo project and use the `hugo new` command to create a file in the `content/docs` directory:
|
||||
|
||||
```shell
|
||||
hugo new docs/examplepage.md
|
||||
```
|
||||
...
|
||||
{{< /prism >}}
|
||||
|
||||
## Preview your Site
|
||||
|
||||
Now that you've created some sample content you can preview your new Lotus Docs site using the `huge server` command:
|
||||
|
||||
```shell
|
||||
hugo server -D
|
||||
```
|
||||
|
||||
Navigate to `localhost:1313/docs` and you should see a card link to the **Example Page** created earlier:
|
||||
|
||||

|
||||
|
||||
## Ordering Content
|
||||
|
||||
Lotus Docs uses a simple weighting method for ordering content and creating menus.
|
||||
|
||||
The front matter `weight` variable is used to order all content and auto-generate the menu structure (including the sidebar menu and page navigation buttons). Lower weight values take higher precedence. So content with lower weights come first and are so ordered in the menu.
|
||||
|
||||
## Auto-Generated Menu
|
||||
|
||||
As mentioned, Lotus Docs auto-generates menus and navigation links using the [front matter](https://gohugo.io/content-management/front-matter/#predefined) weight variable. For example, Navigate to the `content/docs` directory and create two content files, `doc-one.md` and `doc-two.md`, then edit the weight values to `100` and `200` respectively:
|
||||
|
||||
{{< alert text="It's good practice to increment the weight of your posts by a factor of <code>100</code>. This ensures plenty of room to insert new posts between existing items should you need to." />}}
|
||||
|
||||
Your directory structure should now look like this:
|
||||
|
||||
```treeview
|
||||
content/
|
||||
└── docs/
|
||||
├── doc-one.md
|
||||
└── doc-two.md
|
||||
```
|
||||
|
||||
Links to both posts are now visible in the sidebar menu where `doc-one.md` will come before and be placed above `doc-two.md`:
|
||||
|
||||

|
||||
|
||||
{{< alert context="info" text="The option to manually configure a predefined menu structure in <code>hugo.toml</code> as opposed to an auto-generated one is part of the Lotus Docs roadmap." />}}
|
||||
|
||||
## Second Level Menu Items
|
||||
|
||||
Second level menu items can be generated by first creating a **'parent'** directory containing an `_index.md` file, e.g.:
|
||||
|
||||
```shell
|
||||
hugo new docs/parent-directory/_index.md
|
||||
```
|
||||
|
||||
The above command creates an `_index.md` file inside a directory named `parent-directory` under `content/docs`:
|
||||
|
||||
```treeview
|
||||
content/
|
||||
└── docs/
|
||||
├── parent-directory/
|
||||
│ └── _index.md
|
||||
├── doc-one.md
|
||||
├── doc-two.md
|
||||
└── _index.md
|
||||
```
|
||||
|
||||
You can now create second level items inside the `parent-directory` as normal. Run the `hugo new` command again to create a post inside the newly created `parent-directory`:
|
||||
|
||||
```shell
|
||||
hugo new docs/parent-directory/doc-three.md
|
||||
```
|
||||
|
||||
Your directory/file structure should now look like this:
|
||||
|
||||
```treeview
|
||||
content/
|
||||
└── docs/
|
||||
├── parent-directory/
|
||||
│ ├── _index.md
|
||||
│ └── doc-three.md
|
||||
├── doc-one.md
|
||||
├── doc-two.md
|
||||
└── _index.md
|
||||
```
|
||||
|
||||
This is reflected in the sidebar menu with `parent-directory` functioning as a dropdown menu containing a link to the **Doc Three** post:
|
||||
|
||||

|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
weight: 300
|
||||
title: "Section Folder"
|
||||
description: "Example of a folder at the root of the content tree (under `/docs`)"
|
||||
icon: "folder"
|
||||
date: "2023-05-22T00:34:57+01:00"
|
||||
lastmod: "2023-05-22T00:34:57+01:00"
|
||||
draft: false
|
||||
---
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
weight: 310
|
||||
title: "Section Subfolder"
|
||||
description: "Subfolder nested inside a root section folder"
|
||||
icon: "folder"
|
||||
date: "2023-05-22T00:34:57+01:00"
|
||||
lastmod: "2023-05-22T00:34:57+01:00"
|
||||
draft: false
|
||||
---
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
weight: 320
|
||||
title: "Second Section Subfolder"
|
||||
description: "Subfolder nested inside a section subfolder"
|
||||
icon: "folder"
|
||||
date: "2023-05-22T00:34:57+01:00"
|
||||
lastmod: "2023-05-22T00:34:57+01:00"
|
||||
draft: false
|
||||
---
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
weight: 310
|
||||
title: "Third Section Subfolder"
|
||||
description: "Subfolder nested inside a section subfolder"
|
||||
icon: "folder"
|
||||
date: "2023-05-22T00:34:57+01:00"
|
||||
lastmod: "2023-05-22T00:34:57+01:00"
|
||||
draft: false
|
||||
---
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
weight: 330
|
||||
title: "Example Doc"
|
||||
date: "2023-05-03T22:37:22+01:00"
|
||||
draft: false
|
||||
author: "Colin Wilson"
|
||||
toc: true
|
||||
description: "Example document nested inside multiple subfolders"
|
||||
publishdate: "2023-05-03T22:37:22+01:00"
|
||||
tags: ["Beginners"]
|
||||
---
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
weight: 200
|
||||
title: "Exemple de Contenu"
|
||||
description: "Exemple de Contenu"
|
||||
icon: "edit"
|
||||
date: "2023-05-22T00:34:57+01:00"
|
||||
lastmod: "2023-05-22T00:34:57+01:00"
|
||||
draft: false
|
||||
---
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
title: "Code"
|
||||
description: "Code block examples in different coding languages"
|
||||
icon: "code"
|
||||
date: "2023-05-22T00:44:31+01:00"
|
||||
lastmod: "2023-05-22T00:44:31+01:00"
|
||||
draft: false
|
||||
toc: true
|
||||
weight: 210
|
||||
---
|
||||
|
||||
## Code Block Examples
|
||||
|
||||
Code block language examples
|
||||
|
||||
### Go
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("hello world")
|
||||
}
|
||||
```
|
||||
|
||||
### HTML
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<h1>My First Heading</h1>
|
||||
|
||||
<p>My first paragraph.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Markdown
|
||||
|
||||
```md
|
||||
# H1 heading
|
||||
|
||||
**Some bold text**
|
||||
|
||||
*Italic text example*
|
||||
```
|
||||
125
themes/lotusdocs/exampleSite/content/fr/docs/quickstart.md
Normal file
125
themes/lotusdocs/exampleSite/content/fr/docs/quickstart.md
Normal file
@@ -0,0 +1,125 @@
|
||||
---
|
||||
weight: 100
|
||||
date: "2023-05-03T22:37:22+01:00"
|
||||
draft: false
|
||||
author: "Colin Wilson"
|
||||
title: "Démarrage rapide"
|
||||
icon: "rocket_launch"
|
||||
toc: true
|
||||
description: "Un guide qui rapide pour créer un nouveau contenu dans Lotus Docs"
|
||||
publishdate: "2023-05-03T22:37:22+01:00"
|
||||
tags: ["Beginners"]
|
||||
---
|
||||
|
||||
## Créer un nouveau contenu
|
||||
|
||||
Navigate to the root of your Hugo project and use the `hugo new` command to create a file in the `content/docs` directory:
|
||||
|
||||
```shell
|
||||
hugo new docs/example-page.md
|
||||
```
|
||||
|
||||
This will create a markdown file named `example-page.md` with the following default front matter:
|
||||
|
||||
```toml
|
||||
+++
|
||||
title = "Example Page"
|
||||
description = ""
|
||||
icon = "article"
|
||||
date = "2023-05-22T00:27:57+01:00"
|
||||
lastmod = "2023-05-22T00:27:57+01:00"
|
||||
draft = false
|
||||
toc = true
|
||||
weight = 999
|
||||
+++
|
||||
```
|
||||
|
||||
Modify the options to suit your needs.
|
||||
|
||||
The code below shows the front matter code used to create this page, along with some markdown in the body:
|
||||
|
||||
```md
|
||||
+++
|
||||
weight = 100
|
||||
date = "2023-05-03T22:37:22+01:00"
|
||||
draft = true
|
||||
author = "Colin Wilson"
|
||||
title = "Quickstart"
|
||||
icon = "rocket_launch"
|
||||
toc = true
|
||||
description = "A quickstart guide to creating new content in Lotus Docs"
|
||||
publishdate = "2023-05-03T22:37:22+01:00"
|
||||
tags = ["Beginners"]
|
||||
+++
|
||||
|
||||
## Create New Content
|
||||
|
||||
Navigate to the root of your Hugo project and use the `hugo new` command to create a file in the `content/docs` directory:
|
||||
|
||||
```shell
|
||||
hugo new docs/examplepage.md
|
||||
```
|
||||
...
|
||||
```
|
||||
|
||||
## Ordering Content
|
||||
|
||||
Lotus Docs uses a simple weighting method for ordering content and creating menus.
|
||||
|
||||
The front matter `weight` variable is used to order all content and auto-generate the menu structure (including the sidebar menu and page navigation buttons). Lower weight values take higher precedence. So content with lower weights come first and are so ordered in the menu.
|
||||
|
||||
## Auto-Generated Menu
|
||||
|
||||
As mentioned, Lotus Docs auto-generates menus and navigation links using the [front matter](https://gohugo.io/content-management/front-matter/#predefined) weight variable. For example, Navigate to the `content/docs` directory and create two content files, `doc-one.md` and `doc-two.md`, then edit the weight values to `100` and `200` respectively:
|
||||
|
||||
{{< alert text="It's good practice to increment the weight of your posts by a factor of <code>100</code>. This ensures plenty of room to insert new posts between existing items should you need to." />}}
|
||||
|
||||
Your directory structure should now look like this:
|
||||
|
||||
```treeview
|
||||
content/
|
||||
└── docs/
|
||||
├── doc-one.md
|
||||
└── doc-two.md
|
||||
```
|
||||
|
||||
Links to both posts are now visible in the sidebar menu where `doc-one.md` will come before and be placed above `doc-two.md`:
|
||||
|
||||

|
||||
|
||||
{{< alert context="info" text="The option to manually arrange content via a predefined menu structure in <code>hugo.toml</code> as opposed to auto-generated via content weights is on the Lotus Docs roadmap." />}}
|
||||
|
||||
## Second Level Menu Items
|
||||
|
||||
Second level menu items can be generated by first creating a **'parent'** directory containing an `_index.md` file, e.g.:
|
||||
|
||||
```shell
|
||||
hugo new docs/parent-directory/_index.md
|
||||
```
|
||||
|
||||
The above command creates a directory named `parent-directory` under `content/docs`:
|
||||
|
||||
```treeview
|
||||
content/
|
||||
└── docs/
|
||||
└── parent-directory/
|
||||
```
|
||||
|
||||
You can now create second level items inside the `parent-directory` as normal. Run the `hugo new` command again to create a post inside the newly created `parent-directory`:
|
||||
|
||||
```shell
|
||||
hugo new docs/parent-directory/doc-three.md
|
||||
```
|
||||
|
||||
Your directory/file structure should now look like this:
|
||||
|
||||
```treeview
|
||||
content/
|
||||
└── docs/
|
||||
└── parent-directory/
|
||||
└── doc-three.md
|
||||
```
|
||||
|
||||
This is reflected in the sidebar menu with `parent-directory` acting as a dropdown menu containing a link to the **Doc Three** post:
|
||||
|
||||

|
||||
209
themes/lotusdocs/exampleSite/data/landing.yaml
Normal file
209
themes/lotusdocs/exampleSite/data/landing.yaml
Normal file
@@ -0,0 +1,209 @@
|
||||
# Note: Template blocks require a 'weight' parameter so they're correctly ordered on the landing page
|
||||
|
||||
# Hero
|
||||
hero:
|
||||
enable: true
|
||||
weight: 10
|
||||
template: hero
|
||||
|
||||
backgroundImage:
|
||||
path: "images/templates/hero"
|
||||
filename:
|
||||
desktop: "gradient-desktop.webp"
|
||||
mobile: "gradient-mobile.webp"
|
||||
|
||||
badge:
|
||||
text: v0.1.0
|
||||
color: primary # primary, secondary, success, danger, warning, info, light, dark
|
||||
pill: false # boolean
|
||||
soft: true # boolean
|
||||
|
||||
# titleLogo:
|
||||
# path: "images/logos"
|
||||
# filename: "title_logo.png"
|
||||
# alt: "Lotus Docs Logo"
|
||||
# height: 80px
|
||||
|
||||
title: "Lotus Docs"
|
||||
subtitle: A lightweight, **modern documentation** theme for Hugo. Easily customised for building **fast**, **secure**, and **SEO-friendly** documentation sites.
|
||||
|
||||
image:
|
||||
path: "images" # path to image under configured assets directory. default 'images'
|
||||
filename: "lotus_docs_screenshot.png" # filename of your hero image (including file extension)
|
||||
alt: "Lotus Docs Screenshot" # Optional but recommended
|
||||
boxShadow: true # default 'false' (excludes .svg images)
|
||||
rounded: true # round the image corners? default 'false' (excludes .svg images)
|
||||
|
||||
ctaButton:
|
||||
icon: rocket_launch
|
||||
btnText: "Get Started"
|
||||
url: "/docs/quickstart/#create-a-new-lotus-docs-site"
|
||||
cta2Button:
|
||||
icon: construction
|
||||
btnText: "In Development"
|
||||
url: "https://github.com/colinwilson/lotusdocs"
|
||||
|
||||
info: "**Open Source** MIT Licensed."
|
||||
|
||||
# Feature Grid
|
||||
featureGrid:
|
||||
enable: true
|
||||
weight: 20
|
||||
template: feature grid
|
||||
|
||||
title: Why choose Lotus Docs?
|
||||
subtitle: Lotus Docs is a highly configurable Hugo documentation theme. Yet, with the default configuration you can deploy and publish your documentation site in a matter of minutes. Check out some core features below.
|
||||
|
||||
items:
|
||||
- title: Fast
|
||||
icon: speed
|
||||
description: 4 x 100's score on Google Lighthouse by default. Lotus Docs removes unused CSS, prefetches asset links, and lazy loads content images.
|
||||
ctaLink:
|
||||
text: learn more
|
||||
url: /docs/
|
||||
|
||||
- title: SEO Friendly
|
||||
icon: trending_up
|
||||
description: Data is automatically structured to be SEO friendly. Includes Meta tags, Opengraph, and Twitter cards. Choose the settings that best suit you.
|
||||
ctaLink:
|
||||
text: learn more
|
||||
url: /docs/
|
||||
|
||||
- title: Secure by default
|
||||
icon: lock
|
||||
description: Lotus Docs' default configuration scores A+ on Mozilla Observatory. You can update the default Security Headers to suit your requirements.
|
||||
ctaLink:
|
||||
text: learn more
|
||||
url: /docs/
|
||||
|
||||
- title: Optional Features
|
||||
icon: settings
|
||||
description: Many Lotus Docs features are configurable via optional parameters. Require DocSearch for your site? Then enable it via a single setting.
|
||||
ctaLink:
|
||||
text: learn more
|
||||
url: /docs/
|
||||
|
||||
- title: Deploy to Vercel
|
||||
icon: change_history
|
||||
description: Deploy to Vercel in seconds. Vercel Functions, Vercel Redirects/Rewrites, and Vercel Headers are all configurable for an enriched experience.
|
||||
ctaLink:
|
||||
text: learn more
|
||||
url: /docs/
|
||||
|
||||
- title: Dark Mode
|
||||
icon: dark_mode
|
||||
description: Prefer not to be blasted by the sun while reading? Switch to a low-light UI with the click of a button. Modify colour variables to match your branding.
|
||||
ctaLink:
|
||||
text: learn more
|
||||
url: /docs/
|
||||
|
||||
- title: Search by DocSearch
|
||||
icon: search
|
||||
description: Search your docs with DocSearch. A powerful, efficient and accessible search solution built on Algolia Crawler & Autocomplete. TBC.
|
||||
ctaLink:
|
||||
text: learn more
|
||||
url: /docs/
|
||||
|
||||
- title: Multilingual Support
|
||||
icon: translate
|
||||
description: Lotus Docs supports Hugo's Multilingual Mode. Create documentation in multiple languages side by side with i18n support.
|
||||
ctaLink:
|
||||
text: learn more
|
||||
url: /docs/
|
||||
|
||||
- title: Bootstrap v5
|
||||
icon: palette
|
||||
description: Built on Bootstrap 5, Lotus Docs allows for a familiar, flexible, and intuitive developer experience. Easily customise your site via SCSS variables and files.
|
||||
ctaLink:
|
||||
text: learn more
|
||||
url: /docs/
|
||||
|
||||
imageText:
|
||||
enable: true
|
||||
weight: 25
|
||||
template: image text
|
||||
|
||||
title: Built with performance and accessability in mind. Top scores on Google's Lighthouse
|
||||
subtitle: A default Lotus Docs deployment is capable of achieving 4 x 100 scores on Google's Lighthouse performance analysis tool.
|
||||
|
||||
list:
|
||||
- text: Blazing fast page loads
|
||||
icon: speed
|
||||
|
||||
- text: Sensible default SEO friendly settings
|
||||
icon: area_chart
|
||||
|
||||
- text: Designed to be accessible
|
||||
icon: accessibility
|
||||
|
||||
image:
|
||||
path: "images/templates/single"
|
||||
filename: "google_lighthouse_circle_v1.0.svg"
|
||||
alt: "Google LightHouse 100% Illustration" # Optional but recommended
|
||||
|
||||
imgOrder:
|
||||
desktop: 2
|
||||
mobile: 1
|
||||
|
||||
ctaButton:
|
||||
text: Learn more
|
||||
url: "/docs/"
|
||||
|
||||
# Image compare
|
||||
imageCompare:
|
||||
enable: true
|
||||
weight: 30
|
||||
template: image compare
|
||||
|
||||
title: Customise The Lotus Docs Appearance
|
||||
subtitle: Much of Lotus Docs' appearance can be customised. Dark mode is optional (enabled by default) and you can choose a Google font that suites you via the config parameters.
|
||||
|
||||
items:
|
||||
- title: Dark Mode
|
||||
config: {
|
||||
startingPoint: 50,
|
||||
addCircle: true,
|
||||
addCircleBlur: false,
|
||||
showLabels: true,
|
||||
labelOptions: {
|
||||
before: 'Dark',
|
||||
after: 'Light',
|
||||
onHover: false
|
||||
}
|
||||
}
|
||||
imagePath: "images/screenshots"
|
||||
imageBefore: "lotusdocs_dark_v0.8.webp"
|
||||
imageAfter: "lotusdocs_light_v0.8.webp"
|
||||
|
||||
- title: Custom Fonts
|
||||
config: {
|
||||
controlColor: "#3C4257",
|
||||
startingPoint: 25,
|
||||
addCircle: true,
|
||||
addCircleBlur: false,
|
||||
showLabels: true,
|
||||
labelOptions: {
|
||||
before: 'Inter',
|
||||
after: 'Life Saver',
|
||||
onHover: false
|
||||
}
|
||||
}
|
||||
imagePath: "images/screenshots"
|
||||
imageBefore: "lotusdocs_google_font_demo_inter_screenshot.webp"
|
||||
imageAfter: "lotusdocs_google_font_demo_lifesavers_screenshot.webp"
|
||||
|
||||
- title: Accent Color
|
||||
config: {
|
||||
startingPoint: 25,
|
||||
addCircle: true,
|
||||
addCircleBlur: true,
|
||||
showLabels: true,
|
||||
labelOptions: {
|
||||
before: 'Blue',
|
||||
after: 'Cardinal',
|
||||
onHover: false
|
||||
}
|
||||
}
|
||||
imagePath: "images/screenshots"
|
||||
imageBefore: "lotusdocs_blue_theme_colour.webp"
|
||||
imageAfter: "lotusdocs_cardinal_theme_colour.webp"
|
||||
10
themes/lotusdocs/exampleSite/go.mod
Normal file
10
themes/lotusdocs/exampleSite/go.mod
Normal file
@@ -0,0 +1,10 @@
|
||||
module github.com/colinwilson/lotusdocs/exampleSite
|
||||
|
||||
go 1.21
|
||||
|
||||
require (
|
||||
github.com/colinwilson/lotusdocs v0.0.0-20230915145608-8bab2d130c1e // indirect
|
||||
github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20200 // indirect
|
||||
)
|
||||
|
||||
replace github.com/colinwilson/lotusdocs => ../
|
||||
5
themes/lotusdocs/exampleSite/go.sum
Normal file
5
themes/lotusdocs/exampleSite/go.sum
Normal file
@@ -0,0 +1,5 @@
|
||||
github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20200 h1:SmpwwN3DNzJWbV+IT8gaFu07ENUFpCvKou5BHYUKuVs=
|
||||
github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20200/go.mod h1:kx8MBj9T7SFR8ZClWvKZPmmUxBaltkoXvnWlZZcSnYA=
|
||||
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000 h1:GZxx4Hc+yb0/t3/rau1j8XlAxLE4CyXns2fqQbyqWfs=
|
||||
github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2 v2.21100.20000/go.mod h1:mFberT6ZtcchrsDtfvJM7aAH2bDKLdOnruUHl0hlapI=
|
||||
github.com/twbs/bootstrap v5.3.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
|
||||
176
themes/lotusdocs/exampleSite/hugo.toml
Normal file
176
themes/lotusdocs/exampleSite/hugo.toml
Normal file
@@ -0,0 +1,176 @@
|
||||
baseURL = "/"
|
||||
languageCode = "en-GB"
|
||||
contentDir = "content"
|
||||
enableEmoji = true
|
||||
enableGitInfo = true # N.B. .GitInfo does not currently function with git submodule content directories
|
||||
|
||||
defaultContentLanguage = 'en'
|
||||
[languages]
|
||||
[languages.en]
|
||||
title = "Lotus Docs Example Site"
|
||||
languageName = "English"
|
||||
weight = 10
|
||||
[languages.fr]
|
||||
title = "Lotus Docs Exemple de Site"
|
||||
languageName = "Français"
|
||||
contentDir = "content/fr"
|
||||
weight = 20
|
||||
[languages.de]
|
||||
title = "Lotus Docs Beispiel Site"
|
||||
languageName = "Deutsch"
|
||||
contentDir = "content/de"
|
||||
weight = 30
|
||||
|
||||
[module]
|
||||
[module.hugoVersion]
|
||||
extended = true
|
||||
min = "0.100.0"
|
||||
[[module.imports]]
|
||||
path = "github.com/colinwilson/lotusdocs"
|
||||
disable = false
|
||||
[[module.imports]]
|
||||
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
|
||||
disable = false
|
||||
|
||||
[markup]
|
||||
defaultMarkdownHandler = "goldmark"
|
||||
[markup.tableOfContents]
|
||||
endLevel = 3
|
||||
startLevel = 1
|
||||
[markup.goldmark]
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true # https://jdhao.github.io/2019/12/29/hugo_html_not_shown/
|
||||
# [markup.highlight]
|
||||
# codeFences = false # disables Hugo's default syntax highlighting
|
||||
# [markup.goldmark.parser]
|
||||
# [markup.goldmark.parser.attribute]
|
||||
# block = true
|
||||
# title = true
|
||||
|
||||
[params]
|
||||
|
||||
google_fonts = [
|
||||
["Inter", "300, 400, 600, 700"],
|
||||
["Fira Code", "500, 700"]
|
||||
]
|
||||
|
||||
sans_serif_font = "Inter" # Default is System font
|
||||
secondary_font = "Inter" # Default is System font
|
||||
mono_font = "Fira Code" # Default is System font
|
||||
|
||||
[params.footer]
|
||||
copyright = "© :YEAR: Lotus Labs. Built with [**Lotus Docs**](https://github.com/colinwilson/lotusdocs)"
|
||||
# version = true # includes git commit info
|
||||
|
||||
[params.social]
|
||||
github = "" # YOUR_GITHUB_ID or YOUR_GITHUB_URL
|
||||
twitter = "" # YOUR_TWITTER_ID
|
||||
# instagram = "colinwilson" # YOUR_INSTAGRAM_ID
|
||||
# rss = true # show rss icon with link
|
||||
|
||||
[params.docs] # Parameters for the /docs 'template'
|
||||
title = "Lotus Docs Example Site" # default html title for documentation pages/sections
|
||||
|
||||
# pathName = "docs" # path name for documentation site | default "docs"
|
||||
|
||||
# themeColor = "cyan" # (optional) - Set theme accent colour. Options include: blue (default), green, red, yellow, emerald, cardinal, magenta, cyan
|
||||
|
||||
darkMode = true # enable dark mode option? default false
|
||||
|
||||
prism = true # enable syntax highlighting via Prism
|
||||
|
||||
prismTheme = "solarized-light" # (optional) - Set theme for PrismJS. Options include: lotusdocs (default), solarized-light, twilight, lucario
|
||||
|
||||
# gitinfo
|
||||
repoURL = "https://github.com/colinwilson/lotusdocs.dev" # Git repository URL for your site [support for GitHub, GitLab, and BitBucket]
|
||||
repoBranch = "release"
|
||||
editPage = true # enable 'Edit this page' feature - default false
|
||||
lastMod = true # enable 'Last modified' date on pages - default false
|
||||
lastModRelative = true # format 'Last modified' time as relative - default true
|
||||
|
||||
sidebarIcons = true # enable sidebar icons? default false
|
||||
breadcrumbs = true # default is true
|
||||
backToTop = true # enable back-to-top button? default true
|
||||
|
||||
# ToC
|
||||
toc = true # enable table of contents? default is true
|
||||
tocMobile = true # enable table of contents in mobile view? default is true
|
||||
scrollSpy = true # enable scrollspy on ToC? default is true
|
||||
|
||||
# front matter
|
||||
descriptions = true # enable front matter descriptions under content title?
|
||||
titleIcon = true # enable front matter icon title prefix? default is false
|
||||
|
||||
# content navigation
|
||||
navDesc = true # include front matter descriptions in Prev/Next navigation cards
|
||||
navDescTrunc = 30 # Number of characters by which to truncate the Prev/Next descriptions
|
||||
|
||||
listDescTrunc = 100 # Number of characters by which to truncate the list card description
|
||||
|
||||
# Link behaviour
|
||||
intLinkTooltip = true # Enable a tooltip for internal links that displays info about the destination? default false
|
||||
# extLinkNewTab = false # Open external links in a new Tab? default true
|
||||
# logoLinkURL = "" # Set a custom URL destination for the top header logo link.
|
||||
|
||||
[params.flexsearch] # Parameters for FlexSearch
|
||||
enabled = true
|
||||
# tokenize = "full"
|
||||
# optimize = true
|
||||
# cache = 100
|
||||
# minQueryChar = 3 # default is 0 (disabled)
|
||||
# maxResult = 5 # default is 5
|
||||
# searchSectionsIndex = []
|
||||
|
||||
[params.docsearch] # Parameters for DocSearch
|
||||
# appID = "" # Algolia Application ID
|
||||
# apiKey = "" # Algolia Search-Only API (Public) Key
|
||||
# indexName = "" # Index Name to perform search on (or set env variable HUGO_PARAM_DOCSEARCH_indexName)
|
||||
|
||||
[params.analytics] # Parameters for Analytics (Google, Plausible)
|
||||
# plausibleURL = "/docs/s" # (or set via env variable HUGO_PARAM_ANALYTICS_plausibleURL)
|
||||
# plausibleAPI = "/docs/s" # optional - (or set via env variable HUGO_PARAM_ANALYTICS_plausibleAPI)
|
||||
# plausibleDomain = "" # (or set via env variable HUGO_PARAM_ANALYTICS_plausibleDomain)
|
||||
|
||||
# [params.feedback]
|
||||
# enabled = true
|
||||
# emoticonTpl = true
|
||||
# eventDest = ["plausible","google"]
|
||||
# emoticonEventName = "Feedback"
|
||||
# positiveEventName = "Positive Feedback"
|
||||
# negativeEventName = "Negative Feedback"
|
||||
# positiveFormTitle = "What did you like?"
|
||||
# negativeFormTitle = "What went wrong?"
|
||||
# successMsg = "Thank you for helping to improve Lotus Docs' documentation!"
|
||||
# errorMsg = "Sorry! There was an error while attempting to submit your feedback!"
|
||||
# positiveForm = [
|
||||
# ["Accurate", "Accurately describes the feature or option."],
|
||||
# ["Solved my problem", "Helped me resolve an issue."],
|
||||
# ["Easy to understand", "Easy to follow and comprehend."],
|
||||
# ["Something else"]
|
||||
# ]
|
||||
# negativeForm = [
|
||||
# ["Inaccurate", "Doesn't accurately describe the feature or option."],
|
||||
# ["Couldn't find what I was looking for", "Missing important information."],
|
||||
# ["Hard to understand", "Too complicated or unclear."],
|
||||
# ["Code sample errors", "One or more code samples are incorrect."],
|
||||
# ["Something else"]
|
||||
# ]
|
||||
|
||||
[menu]
|
||||
[[menu.primary]]
|
||||
name = "Docs"
|
||||
url = "docs/"
|
||||
identifier = "docs"
|
||||
weight = 10
|
||||
|
||||
# [[menu.primary]]
|
||||
# name = "Showcase"
|
||||
# url = "/showcase"
|
||||
# identifier = "showcase"
|
||||
# weight = 20
|
||||
|
||||
# [[menu.primary]]
|
||||
# name = "Community"
|
||||
# url = "https://github.com/colinwilson/lotusdocs/discussions"
|
||||
# identifier = "community"
|
||||
# weight = 30
|
||||
Reference in New Issue
Block a user