mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-22 23:37:53 +00:00
docs: crosslinking chapter 2 #567
This commit is contained in:
parent
21e80798f3
commit
dcaeb13860
9 changed files with 29 additions and 13 deletions
|
@ -67,7 +67,7 @@ You can override the default with `themeVariantAuto`:
|
||||||
|
|
||||||
The theme offers an advanced way to configure theme variants and all of the aspects above inside of a single configuration item. This comes with some features previously unsupported.
|
The theme offers an advanced way to configure theme variants and all of the aspects above inside of a single configuration item. This comes with some features previously unsupported.
|
||||||
|
|
||||||
Like with the [multiple variants](#multiple-variants) option, you are defining your theme variants in an array but now _not by simple strings_ **but in a table with suboptions**.
|
Like with the [multiple variants](#multiple-variants) option, you are defining your theme variants in an array but now in a table with suboptions.
|
||||||
|
|
||||||
Again, in this case, the first variant is the default chosen on first view and a variant selector will be shown in the menu footer if the array contains more than one entry.
|
Again, in this case, the first variant is the default chosen on first view and a variant selector will be shown in the menu footer if the array contains more than one entry.
|
||||||
|
|
||||||
|
@ -205,6 +205,8 @@ If you need to change this default behavior, create a new file `layouts/partials
|
||||||
|
|
||||||
## Change the Logo
|
## Change the Logo
|
||||||
|
|
||||||
|
By default, only your site title will be shown at the top of the menu. You can [configure this](configuration/sitemanagement/meta#menu-title), or override the logo partial.
|
||||||
|
|
||||||
Create a new file in `layouts/partials/logo.html` of your site. Then write any HTML you want. You could use an `img` HTML tag and reference an image, or you could paste an SVG definition!
|
Create a new file in `layouts/partials/logo.html` of your site. Then write any HTML you want. You could use an `img` HTML tag and reference an image, or you could paste an SVG definition!
|
||||||
|
|
||||||
The size of the logo will adapt automatically.
|
The size of the logo will adapt automatically.
|
||||||
|
|
|
@ -24,7 +24,7 @@ If not set or empty, any unresolved link is written as given into the resulting
|
||||||
|
|
||||||
Please note that this can not resolve files inside of your `static` directory. The file must be a resource of the page or the site.
|
Please note that this can not resolve files inside of your `static` directory. The file must be a resource of the page or the site.
|
||||||
|
|
||||||
This option also comes for the [include](shortcodes/include#enabling-link-warnings) and [openapi](shortcodes/openapi#enabling-link-warnings) shortcodes.
|
Link warnings are also available for the [include](shortcodes/include#enabling-link-warnings) and [openapi](shortcodes/openapi#enabling-link-warnings) shortcodes.
|
||||||
|
|
||||||
{{< multiconfig file=hugo >}}
|
{{< multiconfig file=hugo >}}
|
||||||
[params]
|
[params]
|
||||||
|
@ -36,7 +36,7 @@ This option also comes for the [include](shortcodes/include#enabling-link-warnin
|
||||||
|
|
||||||
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} While the usage of `relref` is obsolete and discouraged by Hugo for a while, existing installations may still use it.
|
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} While the usage of `relref` is obsolete and discouraged by Hugo for a while, existing installations may still use it.
|
||||||
|
|
||||||
In configurations using a baseURL **with** a subdirectory **and** having `relativeURLs=false` (the default) Hugo’s standard `relref` implementation was failing.
|
In configurations using a **baseURL** with a **subdirectory** and having **relativeURLs=false** (the default), Hugo’s standard `relref` implementation is failing.
|
||||||
|
|
||||||
To work around this, you can activate a patched version of the shortcode by setting `disableDefaultRelref=true`.
|
To work around this, you can activate a patched version of the shortcode by setting `disableDefaultRelref=true`.
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@ weight = 2
|
||||||
|
|
||||||
## Breadcrumbs
|
## Breadcrumbs
|
||||||
|
|
||||||
|
Learn how to turn off the breadcrumbs completely and further [configure the topbar](configuration/appearance/topbar).
|
||||||
|
|
||||||
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} Set `disableRootBreadcrumb=true` to remove the root breadcrumb which often feels redundant. This will also apply to the breadcrumbs of the search results and taxonomy pages.
|
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} Set `disableRootBreadcrumb=true` to remove the root breadcrumb which often feels redundant. This will also apply to the breadcrumbs of the search results and taxonomy pages.
|
||||||
|
|
||||||
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} You can override the default breadcrumb separator by using `breadcrumbSeparator='/'`. This separator will also be used in the breadcrumbs of the search results and taxonomy pages.
|
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} You can override the default breadcrumb separator by using `breadcrumbSeparator='/'`. This separator will also be used in the breadcrumbs of the search results and taxonomy pages.
|
||||||
|
|
|
@ -4,6 +4,10 @@ title = "Partials"
|
||||||
weight = 1
|
weight = 1
|
||||||
+++
|
+++
|
||||||
|
|
||||||
|
## Usable Partials
|
||||||
|
|
||||||
|
You can call other partials from `themes/hugo-relearn-themes/` besides those in `themes/hugo-relearn-themes/layouts/partials/_relearn`. However, using partials not mentioned as customizable below might make future updates more challenging.
|
||||||
|
|
||||||
## Customizable Partials
|
## Customizable Partials
|
||||||
|
|
||||||
The Relearn theme allows you to customize various parts of the theme by overriding partials. This makes the theme highly configurable.
|
The Relearn theme allows you to customize various parts of the theme by overriding partials. This makes the theme highly configurable.
|
||||||
|
@ -39,7 +43,3 @@ Here's a list of partials you can safely override:
|
||||||
- `layouts/partials/menu-footer.html`: The footer of the left menu.
|
- `layouts/partials/menu-footer.html`: The footer of the left menu.
|
||||||
|
|
||||||
You can override other partials from `themes/hugo-relearn-themes/`, but be careful as this might make future updates more difficult.
|
You can override other partials from `themes/hugo-relearn-themes/`, but be careful as this might make future updates more difficult.
|
||||||
|
|
||||||
## Usable Partials
|
|
||||||
|
|
||||||
You can call other partials from `themes/hugo-relearn-themes/` besides those in `themes/hugo-relearn-themes/layouts/partials/_relearn`. However, using partials not mentioned above might make future updates more challenging.
|
|
||||||
|
|
|
@ -21,10 +21,15 @@ weight = 3
|
||||||
|
|
||||||
The `title` will be used in meta information of your HTML.
|
The `title` will be used in meta information of your HTML.
|
||||||
|
|
||||||
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} It will also be used for the text at the top of the sidebar. If you want to show a different text in the sidebar, you can overwrite `linkTitle`.
|
|
||||||
|
|
||||||
{{< multiconfig file=hugo >}}
|
{{< multiconfig file=hugo >}}
|
||||||
title = 'Hugo Relearn Theme'
|
title = 'Hugo Relearn Theme'
|
||||||
|
{{< /multiconfig >}}
|
||||||
|
|
||||||
|
## Menu Title
|
||||||
|
|
||||||
|
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} With the [default partials](configuration/appearance/branding#change-the-logo) for the logo, The site title will also be used for the text at the top of the sidebar. If you want to show a different text in the sidebar, you can overwrite `linkTitle`.
|
||||||
|
|
||||||
|
{{< multiconfig file=hugo >}}
|
||||||
[params]
|
[params]
|
||||||
linkTitle = "Relearn"
|
linkTitle = "Relearn"
|
||||||
{{< /multiconfig >}}
|
{{< /multiconfig >}}
|
||||||
|
|
|
@ -46,14 +46,17 @@ Here's how to make your site multilingual using [translations by file name](http
|
||||||
|
|
||||||
[languages]
|
[languages]
|
||||||
[languages.en]
|
[languages.en]
|
||||||
title = "My Website"
|
|
||||||
weight = 1
|
weight = 1
|
||||||
languageName = "English"
|
languageName = "English"
|
||||||
|
languageCode = "en"
|
||||||
|
title = "My Website"
|
||||||
|
|
||||||
[languages.pir]
|
[languages.pir]
|
||||||
title = "Arrr, my Website"
|
|
||||||
weight = 2
|
weight = 2
|
||||||
languageName = "Pirrratish"
|
languageName = "Pirrratish"
|
||||||
|
languageCode = "art-x-pir"
|
||||||
|
languageDirection = "rtl"
|
||||||
|
title = "Arrr, my Website"
|
||||||
{{< /multiconfig >}}
|
{{< /multiconfig >}}
|
||||||
|
|
||||||
2. Duplicate your content files and add language codes to their file names:
|
2. Duplicate your content files and add language codes to their file names:
|
||||||
|
@ -83,7 +86,7 @@ The theme also support [translations by content directory](https://gohugo.io/con
|
||||||
|
|
||||||
## Search Settings
|
## Search Settings
|
||||||
|
|
||||||
Check the [search configuration](configuration/sidebar/search) for multilingual options.
|
Check the [search configuration](configuration/sidebar/search#mixed-language-support) for multilingual options.
|
||||||
|
|
||||||
## Turn Off Language Switching
|
## Turn Off Language Switching
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,8 @@ If not set or empty, any unresolved link is written as given into the resulting
|
||||||
|
|
||||||
Please note that this can not resolve files inside of your `static` directory. The file must be a resource of the page or the site.
|
Please note that this can not resolve files inside of your `static` directory. The file must be a resource of the page or the site.
|
||||||
|
|
||||||
|
Link warnings are also available for [images & links](configuration/content/linking#enabling-link-and-image-link-warnings) and the [openapi](shortcodes/openapi#enabling-link-warnings) shortcode.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Arbitrary Content
|
### Arbitrary Content
|
||||||
|
|
|
@ -50,6 +50,8 @@ If not set or empty, any unresolved link is written as given into the resulting
|
||||||
|
|
||||||
Please note that this can not resolve files inside of your `static` directory. The file must be a resource of the page or the site.
|
Please note that this can not resolve files inside of your `static` directory. The file must be a resource of the page or the site.
|
||||||
|
|
||||||
|
Link warnings are also available for [images & links](configuration/content/linking#enabling-link-and-image-link-warnings) and the [include](shortcodes/include#enabling-link-warnings) shortcode.
|
||||||
|
|
||||||
### Loading an External Version of the Swagger UI Library
|
### Loading an External Version of the Swagger UI Library
|
||||||
|
|
||||||
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} The theme uses the shipped Swagger UI library by default.
|
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} The theme uses the shipped Swagger UI library by default.
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
6.4.0+7e0a04d9aaef0021790e51535ebfcd96b902a0f0
|
6.4.0+21e80798f30a5a86c5b2cdccb1990c7ee9adaf97
|
Loading…
Reference in a new issue