mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
code highlighter: avoid unstyled blocks for indention in docs #32
This commit is contained in:
parent
b29f1ce055
commit
0d66a97284
5 changed files with 168 additions and 144 deletions
|
@ -12,6 +12,7 @@ Edit the website configuration `config.toml` and add a `[[menu.shortcuts]]` entr
|
|||
|
||||
Example from the current website:
|
||||
|
||||
````toml
|
||||
[[menu.shortcuts]]
|
||||
name = "<i class='fab fa-github'></i> Github repo"
|
||||
identifier = "ds"
|
||||
|
@ -33,14 +34,17 @@ Example from the current website:
|
|||
name = "<i class='fas fa-bullhorn'></i> Credits"
|
||||
url = "/credits"
|
||||
weight = 30
|
||||
````
|
||||
|
||||
By default, shortcuts are preceded by a title. This title can be disabled by setting `disableShortcutsTitle=true`.
|
||||
However, if you want to keep the title but change its value, it can be overriden by changing your local i18n translation string configuration.
|
||||
|
||||
For example, in your local `i18n/en.toml` file, add the following content
|
||||
|
||||
````toml
|
||||
[Shortcuts-Title]
|
||||
other = "<Your value>"
|
||||
````
|
||||
|
||||
Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo i18n translation strings](https://gohugo.io/content-management/multilingual/#translation-of-strings)
|
||||
|
||||
|
@ -48,9 +52,9 @@ Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo i18n tran
|
|||
|
||||
When using a multilingual website, you can set different menus for each language. In the `config.toml` file, prefix your menu configuration by `Languages.<language-id>`.
|
||||
|
||||
|
||||
Example from the current website:
|
||||
|
||||
````toml
|
||||
[Languages]
|
||||
[Languages.en]
|
||||
title = "Documentation for Hugo Relearn Theme"
|
||||
|
@ -105,5 +109,6 @@ Example from the current website:
|
|||
name = "<i class='fas fa-bullhorn'></i> Crédits"
|
||||
url = "/credits"
|
||||
weight = 30
|
||||
````
|
||||
|
||||
Read more about [hugo menu](https://gohugo.io/extras/menus/) and [hugo multilingual menus](https://gohugo.io/content-management/multilingual/#menus)
|
|
@ -10,6 +10,7 @@ In **Hugo**, pages are the core of your site. Once it is configured, pages are d
|
|||
|
||||
Organize your site like [any other Hugo project](https://gohugo.io/content/organization/). Typically, you will have a *content* folder with all your pages.
|
||||
|
||||
````plaintext
|
||||
content
|
||||
├── level-one
|
||||
│ ├── level-two
|
||||
|
@ -33,6 +34,7 @@ Organize your site like [any other Hugo project](https://gohugo.io/content/organ
|
|||
│ └── page-1-c.md <-- /level-one/page-1-c
|
||||
├── _index.md <-- /
|
||||
└── page-top.md <-- /page-top
|
||||
````
|
||||
|
||||
{{% notice note %}}
|
||||
`_index.md` is required in each folder, it’s your “folder home page”
|
||||
|
|
|
@ -51,7 +51,9 @@ For example:
|
|||
|
||||
#### List of attachments ending in pdf or mp4
|
||||
|
||||
````go
|
||||
{{%/*attachments title="Related files" pattern=".*(pdf|mp4)"/*/%}}
|
||||
````
|
||||
|
||||
renders as
|
||||
|
||||
|
@ -59,26 +61,33 @@ renders as
|
|||
|
||||
#### Colored styled box
|
||||
|
||||
````go
|
||||
{{%/*attachments style="orange" /*/%}}
|
||||
````
|
||||
|
||||
renders as
|
||||
|
||||
{{% attachments style="orange" /%}}
|
||||
|
||||
|
||||
````go
|
||||
{{%/*attachments style="grey" /*/%}}
|
||||
````
|
||||
|
||||
renders as
|
||||
|
||||
{{% attachments style="grey" /%}}
|
||||
|
||||
````go
|
||||
{{%/*attachments style="blue" /*/%}}
|
||||
````
|
||||
|
||||
renders as
|
||||
|
||||
{{% attachments style="blue" /%}}
|
||||
|
||||
````go
|
||||
{{%/*attachments style="green" /*/%}}
|
||||
````
|
||||
|
||||
renders as
|
||||
|
||||
|
|
|
@ -18,28 +18,32 @@ Use the children shortcode to list the child pages of a page and the further des
|
|||
|
||||
## Demo
|
||||
|
||||
````go
|
||||
{{%/* children */%}}
|
||||
````
|
||||
|
||||
{{% children %}}
|
||||
|
||||
````go
|
||||
{{%/* children description="true" */%}}
|
||||
````
|
||||
|
||||
{{%children description="true" %}}
|
||||
|
||||
````go
|
||||
{{%/* children depth="3" showhidden="true" */%}}
|
||||
````
|
||||
|
||||
{{% children depth="3" showhidden="true" %}}
|
||||
|
||||
````go
|
||||
{{%/* children style="h2" depth="3" description="true" */%}}
|
||||
````
|
||||
|
||||
{{% children style="h2" depth="3" description="true" %}}
|
||||
|
||||
````go
|
||||
{{%/* children style="div" depth="999" */%}}
|
||||
````
|
||||
|
||||
{{% children style="div" depth="999" %}}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ snippets for multiple languages or providing configuration in different formats.
|
|||
|
||||
## Code example
|
||||
|
||||
````go
|
||||
{{</* tabs */>}}
|
||||
{{%/* tab name="python" */%}}
|
||||
```python
|
||||
|
@ -25,6 +26,7 @@ snippets for multiple languages or providing configuration in different formats.
|
|||
```
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tabs */>}}
|
||||
````
|
||||
|
||||
Renders as:
|
||||
|
||||
|
@ -68,6 +70,7 @@ echo "Hello World!"
|
|||
|
||||
## Config example
|
||||
|
||||
````go
|
||||
{{</* tabs groupId="config" */>}}
|
||||
{{%/* tab name="json" */%}}
|
||||
```json
|
||||
|
@ -87,6 +90,7 @@ echo "Hello World!"
|
|||
```
|
||||
{{%/* /tab */%}}
|
||||
{{</* /tabs */>}}
|
||||
````
|
||||
|
||||
Renders as:
|
||||
|
||||
|
@ -104,7 +108,7 @@ Renders as:
|
|||
```
|
||||
{{% /tab %}}
|
||||
{{% tab name="properties" %}}
|
||||
```properties
|
||||
```ini
|
||||
Hello = World
|
||||
```
|
||||
{{% /tab %}}
|
||||
|
|
Loading…
Reference in a new issue