From dcaeb1386051e27116d0a4039e26d832d9985c9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Sat, 12 Oct 2024 10:52:54 +0200 Subject: [PATCH] docs: crosslinking chapter 2 #567 --- .../configuration/appearance/branding/_index.en.md | 4 +++- .../content/configuration/content/linking/index.en.md | 4 ++-- .../content/configuration/content/titles/index.en.md | 2 ++ .../configuration/customization/partials/index.en.md | 8 ++++---- .../configuration/sitemanagement/meta/_index.en.md | 9 +++++++-- .../sitemanagement/multilingual/_index.en.md | 9 ++++++--- exampleSite/content/shortcodes/include/index.en.md | 2 ++ exampleSite/content/shortcodes/openapi/_index.en.md | 2 ++ layouts/partials/version.txt | 2 +- 9 files changed, 29 insertions(+), 13 deletions(-) diff --git a/exampleSite/content/configuration/appearance/branding/_index.en.md b/exampleSite/content/configuration/appearance/branding/_index.en.md index cb2b3601f5..ad4cb0dd27 100644 --- a/exampleSite/content/configuration/appearance/branding/_index.en.md +++ b/exampleSite/content/configuration/appearance/branding/_index.en.md @@ -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. -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. @@ -205,6 +205,8 @@ If you need to change this default behavior, create a new file `layouts/partials ## 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! The size of the logo will adapt automatically. diff --git a/exampleSite/content/configuration/content/linking/index.en.md b/exampleSite/content/configuration/content/linking/index.en.md index 8289bceeed..3baa34978b 100644 --- a/exampleSite/content/configuration/content/linking/index.en.md +++ b/exampleSite/content/configuration/content/linking/index.en.md @@ -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. -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 >}} [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. -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`. diff --git a/exampleSite/content/configuration/content/titles/index.en.md b/exampleSite/content/configuration/content/titles/index.en.md index 2810ad4f3d..19cbe57623 100644 --- a/exampleSite/content/configuration/content/titles/index.en.md +++ b/exampleSite/content/configuration/content/titles/index.en.md @@ -7,6 +7,8 @@ weight = 2 ## 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 %}} 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. diff --git a/exampleSite/content/configuration/customization/partials/index.en.md b/exampleSite/content/configuration/customization/partials/index.en.md index 355f5f9712..fec8049cc7 100644 --- a/exampleSite/content/configuration/customization/partials/index.en.md +++ b/exampleSite/content/configuration/customization/partials/index.en.md @@ -4,6 +4,10 @@ title = "Partials" 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 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. 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. diff --git a/exampleSite/content/configuration/sitemanagement/meta/_index.en.md b/exampleSite/content/configuration/sitemanagement/meta/_index.en.md index 90ac81d896..813a9b83d3 100644 --- a/exampleSite/content/configuration/sitemanagement/meta/_index.en.md +++ b/exampleSite/content/configuration/sitemanagement/meta/_index.en.md @@ -21,10 +21,15 @@ weight = 3 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 >}} 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] linkTitle = "Relearn" {{< /multiconfig >}} diff --git a/exampleSite/content/configuration/sitemanagement/multilingual/_index.en.md b/exampleSite/content/configuration/sitemanagement/multilingual/_index.en.md index 088577b0d5..92788db87f 100644 --- a/exampleSite/content/configuration/sitemanagement/multilingual/_index.en.md +++ b/exampleSite/content/configuration/sitemanagement/multilingual/_index.en.md @@ -46,14 +46,17 @@ Here's how to make your site multilingual using [translations by file name](http [languages] [languages.en] - title = "My Website" weight = 1 languageName = "English" + languageCode = "en" + title = "My Website" [languages.pir] - title = "Arrr, my Website" weight = 2 languageName = "Pirrratish" + languageCode = "art-x-pir" + languageDirection = "rtl" + title = "Arrr, my Website" {{< /multiconfig >}} 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 -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 diff --git a/exampleSite/content/shortcodes/include/index.en.md b/exampleSite/content/shortcodes/include/index.en.md index b97dfa89dc..bc9cea1a32 100644 --- a/exampleSite/content/shortcodes/include/index.en.md +++ b/exampleSite/content/shortcodes/include/index.en.md @@ -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. +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 ### Arbitrary Content diff --git a/exampleSite/content/shortcodes/openapi/_index.en.md b/exampleSite/content/shortcodes/openapi/_index.en.md index 62a42e492f..5365db9abf 100644 --- a/exampleSite/content/shortcodes/openapi/_index.en.md +++ b/exampleSite/content/shortcodes/openapi/_index.en.md @@ -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. +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 {{% 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. diff --git a/layouts/partials/version.txt b/layouts/partials/version.txt index b28c9e2837..61550d2a4c 100644 --- a/layouts/partials/version.txt +++ b/layouts/partials/version.txt @@ -1 +1 @@ -6.4.0+7e0a04d9aaef0021790e51535ebfcd96b902a0f0 \ No newline at end of file +6.4.0+21e80798f30a5a86c5b2cdccb1990c7ee9adaf97 \ No newline at end of file