Skip to content

Commit

Permalink
docs: move pages around #567
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Sep 21, 2024
1 parent 0b2a474 commit 32bd56c
Show file tree
Hide file tree
Showing 94 changed files with 171 additions and 157 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,40 @@ A theme for [Hugo](https://gohugo.io/) designed for documentation.

## Motivation

The Relearn theme is a fork of the great [Learn theme](https://github.com/matcornic/hugo-theme-learn) with the aim of fixing long outstanding bugs and adapting to latest Hugo features. As far as possible this theme tries to be a drop-in replacement for the Learn theme.
The Relearn theme is a fork of the great [Learn theme](https://github.com/matcornic/hugo-theme-learn) with the aim of fixing long unresolved bugs and adapting to latest Hugo features. As far as possible this theme tries to be a drop-in replacement for the Learn theme.

## Features

- **Wide set of usage scenarios**
- Responsive design for mobile usage
- Looks nice on paper (if it has to)
- Usable offline, no external dependencies
- [Usable from your local file system via `file://` protocol](https://mcshelby.github.io/hugo-theme-relearn/basics/customization#file-system)
- [Usable from your local file system via `file://` protocol](https://mcshelby.github.io/hugo-theme-relearn/configuration/customization#file-system)
- Support for the [VSCode Front Matter extension](https://github.com/estruyf/vscode-front-matter) for on-premise CMS capabilities
- [Support for Open Graph, Schema and Twitter Cards](https://mcshelby.github.io/hugo-theme-relearn/basics/customization#social-media-meta-tags)
- [Support for Open Graph, Schema and Twitter Cards](https://mcshelby.github.io/hugo-theme-relearn/configuration/customization#social-media-meta-tags)
- **Configurable theming and visuals**
- [Configurable brand images](https://mcshelby.github.io/hugo-theme-relearn/basics/branding#change-the-logo)
- [Automatic switch for light/dark variant depending on your OS settings](https://mcshelby.github.io/hugo-theme-relearn/basics/branding#adjust-to-os-settings)
- [Configurable brand images](https://mcshelby.github.io/hugo-theme-relearn/configuration/branding#change-the-logo)
- [Automatic switch for light/dark variant depending on your OS settings](https://mcshelby.github.io/hugo-theme-relearn/configuration/branding#adjust-to-os-settings)
- Predefined light, dark and color variants
- [User selectable variants](https://mcshelby.github.io/hugo-theme-relearn/basics/branding#multiple-variants)
- [Stylesheet generator](https://mcshelby.github.io/hugo-theme-relearn/basics/generator)
- [User selectable variants](https://mcshelby.github.io/hugo-theme-relearn/configuration/branding#multiple-variants)
- [Stylesheet generator](https://mcshelby.github.io/hugo-theme-relearn/configuration/generator)
- [Configurable syntax highlighting](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/highlight)
- **Unique theme features**
- [Print whole chapters or even the complete site](https://mcshelby.github.io/hugo-theme-relearn/basics/customization#activate-print-support)
- [In-page search, search popup and dedicated search page](https://mcshelby.github.io/hugo-theme-relearn/basics/customization#configure-search)
- [Taxonomy support](https://mcshelby.github.io/hugo-theme-relearn/cont/taxonomy)
- [Configurable topbar buttons](https://mcshelby.github.io/hugo-theme-relearn/basics/topbar)
- [Unlimited nested menu items](https://mcshelby.github.io/hugo-theme-relearn/cont/pages)
- [Configurable shortcut links](https://mcshelby.github.io/hugo-theme-relearn/cont/menushortcuts)
- [Print whole chapters or even the complete site](https://mcshelby.github.io/hugo-theme-relearn/configuration/customization#activate-print-support)
- [In-page search, search popup and dedicated search page](https://mcshelby.github.io/hugo-theme-relearn/configuration/customization#configure-search)
- [Taxonomy support](https://mcshelby.github.io/hugo-theme-relearn/content/taxonomy)
- [Configurable topbar buttons](https://mcshelby.github.io/hugo-theme-relearn/configuration/topbar)
- [Unlimited nested menu items](https://mcshelby.github.io/hugo-theme-relearn/content/organization)
- [Configurable shortcut links](https://mcshelby.github.io/hugo-theme-relearn/configuration/menushortcuts)
- Hidden pages
- **Multi language support**
- [Full support for languages written right to left](https://mcshelby.github.io/hugo-theme-relearn/cont/i18n)
- [Available languages](https://mcshelby.github.io/hugo-theme-relearn/cont/i18n#basic-configuration): Arabic, Simplified Chinese, Traditional Chinese, Czech, Dutch, English, Finnish, French, German, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Turkish, Vietnamese
- [Search support for mixed language content](https://mcshelby.github.io/hugo-theme-relearn/cont/i18n#search)
- [Full support for languages written right to left](https://mcshelby.github.io/hugo-theme-relearn/configuration/i18n)
- [Available languages](https://mcshelby.github.io/hugo-theme-relearn/configuration/i18n#basic-configuration): Arabic, Simplified Chinese, Traditional Chinese, Czech, Dutch, English, Finnish, French, German, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Romanian, Russian, Spanish, Swahili, Turkish, Vietnamese
- [Search support for mixed language content](https://mcshelby.github.io/hugo-theme-relearn/configuration/i18n#search)
- **Additional Markdown features**
- [Support for GFM (GitHub Flavored Markdown)](https://mcshelby.github.io/hugo-theme-relearn/cont/markdown)
- [Image effects like sizing, shadow, border and alignment](https://mcshelby.github.io/hugo-theme-relearn/cont/markdown#image-effects)
- [Image lightbox](https://mcshelby.github.io/hugo-theme-relearn/cont/markdown#lightbox)
- [Support for GFM (GitHub Flavored Markdown)](https://mcshelby.github.io/hugo-theme-relearn/content/markdown)
- [Image effects like sizing, shadow, border and alignment](https://mcshelby.github.io/hugo-theme-relearn/content/markdown#image-effects)
- [Image lightbox](https://mcshelby.github.io/hugo-theme-relearn/content/markdown#lightbox)
- **Shortcodes galore**
- [Display resources contained in a page bundle](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/resources)
- [Marker badges](https://mcshelby.github.io/hugo-theme-relearn/shortcodes/badge)
Expand Down
1 change: 1 addition & 0 deletions exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ disableNextPrev = false
# in the pages frontmatter. This is useful if you want to give the opportunity
# for people to create merge request for your content.
editURL = "https://github.com/McShelby/hugo-theme-relearn/edit/main/exampleSite/content/${FilePath}"

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Search
# These options modify various aspects of the search functionality.
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/basics/changelog/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ alwaysopen = false
disableToc = false
title = "Changelog"
type = "changelog"
weight = 30
weight = 4
+++

{{% pages showdivider="true" showhidden="true" hidevisible="true" showtitle="true" %}}
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/basics/changelog/_index.pir.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ alwaysopen = false
disableToc = false
title = "Changelog"
type = "changelog"
weight = 30
weight = 4
+++
{{< piratify >}}
2 changes: 1 addition & 1 deletion exampleSite/content/basics/installation/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
+++
tags = ["documentation"]
title = "Installation"
weight = 15
weight = 2
+++

The following steps are here to help you initialize your new website. If you don't know Hugo at all, we strongly suggest you learn more about it by following this [great documentation for beginners](https://gohugo.io/overview/quickstart/).
Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/basics/installation/_index.pir.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
tags = ["documentat'n"]
title = "Installat'n"
weight = 15
weight = 2
+++
{{< piratify >}}
4 changes: 2 additions & 2 deletions exampleSite/content/basics/releasenotes/2/0.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ weight = -0

### New

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can define the expansion state of your menus in the frontmatter. Please see further [documentation](cont/frontmatter#override-expand-state-rules-for-menu-entries) for possible values and default behavior.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can define the expansion state of your menus in the frontmatter. Please see further [documentation](content/frontmatter#override-expand-state-rules-for-menu-entries) for possible values and default behavior.

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} New partials for defining pre/post content for menu items and the content. See [documentation](basics/customization#partials) for further reading.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} New partials for defining pre/post content for menu items and the content. See [documentation](configuration/customization#partials) for further reading.

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Shortcode [`children`](shortcodes/children) with new parameter `containerstyle`.

Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/basics/releasenotes/2/4.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ weight = -4

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Hidden pages are displayed by default in their according tags page. You can now turn off this behavior by setting `disableTagHiddenPages=true` in your `hugo.toml`.

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can define the expansion state of your menus for the whole site by setting the `alwaysopen` option in your `hugo.toml`. Please see further [documentation](cont/frontmatter#override-expand-state-rules-for-menu-entries) for possible values and default behavior.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can define the expansion state of your menus for the whole site by setting the `alwaysopen` option in your `hugo.toml`. Please see further [documentation](content/frontmatter#override-expand-state-rules-for-menu-entries) for possible values and default behavior.

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} New frontmatter `ordersectionsby` option to change immediate children sorting in menu and `children` shortcode. Possible values are `title` or `weight`.

Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/basics/releasenotes/2/6.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ weight = -6

### New

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Your site can now be served from a subfolder if you set `baseURL` in your `hugo.toml`. See the [documentation](basics/customization#public-web-server-from-subdirectory) for a detailed example.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Your site can now be served from a subfolder if you set `baseURL` in your `hugo.toml`. See the [documentation](configuration/customization#public-web-server-from-subdirectory) for a detailed example.
4 changes: 2 additions & 2 deletions exampleSite/content/basics/releasenotes/2/8.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ weight = -8

### New

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The theme now supports favicons served from `static/images/` named as `favicon` or `logo` in SVG, PNG or ICO format [out of the box](basics/branding#change-the-favicon). An overridden partial `layouts/partials/favicon.html` may not be necessary anymore in most cases.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The theme now supports favicons served from `static/images/` named as `favicon` or `logo` in SVG, PNG or ICO format [out of the box](configuration/branding#change-the-favicon). An overridden partial `layouts/partials/favicon.html` may not be necessary anymore in most cases.

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can hide the table of contents menu for the whole site by setting the `disableToc` option in your `hugo.toml`. For an example see [the example configuration](basics/configuration).
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can hide the table of contents menu for the whole site by setting the `disableToc` option in your `hugo.toml`. For an example see [the example configuration](configuration/options).
8 changes: 4 additions & 4 deletions exampleSite/content/basics/releasenotes/2/9.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ weight = -9

| Type | Non-Standard | Standard |
|---------------|----------------------------------|------------------------|
| Branch bundle | `basics/configuration/_index.md` | `basics/configuration` |
| Leaf bundle | `basics/configuration/index.md` | `basics/configuration` |
| Page | `basics/configuration.md` | `basics/configuration` |
| Branch bundle | `configuration/options/_index.md` | `configuration/options` |
| Leaf bundle | `configuration/options/index.md` | `configuration/options` |
| Page | `configuration/options.md` | `configuration/options` |

If you've linked from a page of one language to a page of another language, conversion is a bit more difficult but [Hugo got you covered](https://gohugo.io/content-management/cross-references/#link-to-another-language-version) as well.

Expand All @@ -29,7 +29,7 @@ weight = -9
You may see errors on the console after the update in the form:

````shell
ERROR 2021/11/19 22:29:10 [en] REF_NOT_FOUND: Ref "basics/configuration/_index.md": "hugo-theme-relearn\exampleSite\content\_index.en.md:19:22": page not found
ERROR 2021/11/19 22:29:10 [en] REF_NOT_FOUND: Ref "configuration/options/_index.md": "hugo-theme-relearn\exampleSite\content\_index.en.md:19:22": page not found
````

In this case, you must apply one of two options:
Expand Down
10 changes: 5 additions & 5 deletions exampleSite/content/basics/releasenotes/3/0.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ weight = -0

### Breaking

- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} We made changes to the menu footer. If you have your `menu-footer.html` [partial overridden](basics/customization#partials), you may have to review the styling (eg. margins/paddings) in your partial. For a reference take a look into the `menu-footer.html` partial that is coming with the exampleSite.
- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} We made changes to the menu footer. If you have your `menu-footer.html` [partial overridden](configuration/customization#partials), you may have to review the styling (eg. margins/paddings) in your partial. For a reference take a look into the `menu-footer.html` partial that is coming with the exampleSite.

This change was made to allow your own menu footer to be placed right after the so called prefooter that comes with the theme (containing the language switch and _Clear history_ functionality).

- {{% badge style="warning" title=" " %}}Breaking{{% /badge %}} We have changed the default colors from the original Learn theme (the purple menu header) to the Relearn defaults (the light green menu header) as used in the official documentation.

This change will only affect your installation if you've not set the `themeVariant` parameter in your `hugo.toml`. [If you still want to use the Learn color variant](basics/branding#theme-variant), you have to explicitly set `themeVariant="learn"` in your `hugo.toml`.
This change will only affect your installation if you've not set the `themeVariant` parameter in your `hugo.toml`. [If you still want to use the Learn color variant](configuration/branding#theme-variant), you have to explicitly set `themeVariant="learn"` in your `hugo.toml`.

Note, that this will also affect your site if viewed with Internet Explorer 11 but in this case it can not be reconfigured as Internet Explorer does not support CSS variables.

Expand All @@ -30,12 +30,12 @@ weight = -0

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} With this release you are now capable to define your own _dark mode_ variants.

To make this possible, we have introduced a lot more color variables you can use in [your color variants](basics/branding#theme-variant). Your old variants will still work and don't need to be changed as appropriate fallback values are used by the theme. Nevertheless, the new colors allow for much more customization.
To make this possible, we have introduced a lot more color variables you can use in [your color variants](configuration/branding#theme-variant). Your old variants will still work and don't need to be changed as appropriate fallback values are used by the theme. Nevertheless, the new colors allow for much more customization.

To see what's now possible, see the new variants `relearn-dark` and `neon` that are coming with this release.

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} To make the creation of new variants easier for you, we've added a new interactive [theme variant generator](basics/generator). This feature will not work with Internet Explorer 11.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} To make the creation of new variants easier for you, we've added a new interactive [theme variant generator](configuration/generator). This feature will not work with Internet Explorer 11.

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can now configure multiple color variants in your `hugo.toml`. In this case, the first variant is the default chosen on first view and a variant selector will be shown in the menu footer. See the [documentation](basics/branding#multiple-variants) for configuration.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} You can now configure multiple color variants in your `hugo.toml`. In this case, the first variant is the default chosen on first view and a variant selector will be shown in the menu footer. See the [documentation](configuration/branding#multiple-variants) for configuration.

Note, that the new variant selector will not work with Internet Explorer 11 as it does not support CSS variables. Therefore, the variant selector will not be displayed with Internet Explorer 11.
2 changes: 1 addition & 1 deletion exampleSite/content/basics/releasenotes/3/2.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ weight = -2

- {{% badge style="note" title=" " %}}Change{{% /badge %}} In this release the Mermaid JavaScript library will only be loaded on demand if the page contains a Mermaid shortcode or is using Markdown codefences. This changes the behavior of `disableMermaid` config option as follows: If a Mermaid shortcode or Markdown codefence is found, the option will be ignored and Mermaid will be loaded regardlessly.

The option is still useful in case you are using scripting to set up your graph. In this case no shortcode or Markdown codefence is involved and the library is not loaded by default. In this case you can set `disableMermaid=false` in your frontmatter to force the library to be loaded. See the [theme variant generator](basics/generator) of the exampleSite for an example.
The option is still useful in case you are using scripting to set up your graph. In this case no shortcode or Markdown codefence is involved and the library is not loaded by default. In this case you can set `disableMermaid=false` in your frontmatter to force the library to be loaded. See the [theme variant generator](configuration/generator) of the exampleSite for an example.

### New

Expand Down
2 changes: 1 addition & 1 deletion exampleSite/content/basics/releasenotes/3/3.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ weight = -3

### New

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Introduction of new CSS variables to set the font. The theme distinguishes between `--MAIN-font` for all content text and `--CODE-font` for inline or block code. There are additional overrides for all headings. See the [theme variant generator](basics/generator) of the exampleSite for all available variables.
- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} Introduction of new CSS variables to set the font. The theme distinguishes between `--MAIN-font` for all content text and `--CODE-font` for inline or block code. There are additional overrides for all headings. See the [theme variant generator](configuration/generator) of the exampleSite for all available variables.

- {{% badge style="info" icon="plus-circle" title=" " %}}New{{% /badge %}} The new shortcode `swagger` is available to include a UI for REST OpenAPI specifications. See the [documentation](shortcodes/openapi) for available features. This feature will not work with Internet Explorer 11.
Loading

0 comments on commit 32bd56c

Please sign in to comment.