Skip to content

Commit

Permalink
Bump Theme to 5.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
russfeld committed Aug 9, 2023
1 parent bb1c78c commit 42b12a4
Show file tree
Hide file tree
Showing 38 changed files with 618 additions and 241 deletions.
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ theme = ["hugo-theme-relearn", "plausible-hugo"]
# SEARCH - Search index file for Lunr
# SEARCHPAGE - Dedicated Search Page
[outputs]
home = ["HTML", "RSS", "PRINT", "JSON", "SEARCH", "SEARCHPAGE"]
home = ["HTML", "RSS", "PRINT", "SEARCH", "SEARCHPAGE"]
section = ["HTML", "RSS", "PRINT", "TELE", "EMBED"]
page = ["HTML", "RSS", "PRINT", "TELE", "EMBED"]

Expand Down
7 changes: 2 additions & 5 deletions content/0-basic-content/0-0-subchapter/_index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
+++
title = "Section"
weight = 5
chapter = true
archetype = "chapter"
ordinal = "0"
pre = "<b>0. </b>"
+++

### Section 0

# Subsections

A subsection example.
7 changes: 2 additions & 5 deletions content/0-basic-content/_index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
+++
title = "Basic Content"
weight = 5
chapter = true
ordinal = "0"
archetype = "chapter"
pre = "<b>0. </b>"
+++

### Chapter 0

# Basic Content

The Basics of this Template
7 changes: 2 additions & 5 deletions content/1-structures/_index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
+++
title = "Advanced Structures"
weight = 15
chapter = true
archetype = "chapter"
ordinal = "1"
pre = "<b>1. </b>"
+++

### Chapter 1

# Advanced Hugo Structures

More Complex File Patterns
7 changes: 2 additions & 5 deletions content/2-patterns/_index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
+++
title = "Structural Patterns"
weight = 20
chapter = true
archetype = "chapter"
ordinal = "2"
pre = "<b>2. </b>"
+++

### Chapter 2

# Structural Patterns

Patterns we use for various things
1 change: 1 addition & 0 deletions content/3-markdown/01-frontmatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ These items are unique:

* **type**: this tells Hugo to render this page as a Reveal.js page, which will use a different template
* **hidden**: this will remove this item from the menu on the left. This can be added to any page.
* **ordinal**: this is used by the new [chapter](https://mcshelby.github.io/hugo-theme-relearn/cont/archetypes/) archetype to override the weight as the chapter's index.

There are many other items that can be added. See [Hugo Frontmatter](https://gohugo.io/content-management/front-matter/) for details.

Expand Down
7 changes: 2 additions & 5 deletions content/3-markdown/_index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
+++
title = "Basic Markdown"
weight = 25
chapter = true
archetype = "chapter"
ordinal = "3"
pre = "<b>3. </b>"
+++

### Chapter 3

# Basic Markdown

Basic Markdown Structures
3 changes: 3 additions & 0 deletions content/4-shortcodes/08-defaults/INCLUDE_ME.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ You can add standard markdown syntax:
- _emphasized_, **bold** and even **_bold emphasized_** text
- [links](https://example.com)
- etc.
- etc.[^etc]

[^etc]: Et Cetera (English: /ɛtˈsɛtərə/), abbreviated to etc., etc, et cet., is a Latin expression that is used in English to mean "and other similar things", or "and so forth"

```plaintext
...and even source code
Expand Down
1 change: 1 addition & 0 deletions content/4-shortcodes/08-defaults/_index.en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
+++
archetype = "chapter"
ordinal = "8"
title = "Theme Shortcodes"
weight = 90
pre = "8. "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,27 @@ The `attachments` shortcode displays a list of files attached to a page with adj

{{% attachments sort="asc" /%}}

{{% notice warning %}}
Since Hugo {{% badge color="fuchsia" icon="fab fa-hackerrank" title=" " %}}0.112.0{{% /badge %}} this only works for leaf bundles. Branch bundles and simple pages must be switched to leaf bundles or you are currently locked to a Hugo version < `0.112.0`.
{{% /notice %}}

## Usage

While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.

{{< tabs groupId="shortcode-parameter">}}
{{% tab name="shortcode" %}}
{{< tabs groupid="shortcode-parameter">}}
{{% tab title="shortcode" %}}

````go
{{%/* attachments sort="asc" /*/%}}
````

{{% /tab %}}
{{% tab name="partial" %}}
{{% tab title="partial" %}}

````go
{{ partial "shortcodes/attachments.html" (dict
"context" .
"page" .
"sort" "asc"
)}}
````
Expand All @@ -34,8 +38,8 @@ While the examples are using shortcodes with named parameter you are free to als
### Parameter

| Name | Default | Notes |
|:------------|:----------------|:------------|
| **style** | `transparent` | The style scheme used for the box.<br><br>- by severity: `info`, `note`, `tip`, `warning`<br>- by brand color: `primary`, `secondary`, `accent`<br>- by color: `blue`, `green`, `grey`, `orange`, `red`<br>- by special color: `default`, `transparent` |
|-------------|-----------------|-------------|
| **style** | `transparent` | The style scheme used for the box.<br><br>- by severity: `info`, `note`, `tip`, `warning`<br>- by brand color: `primary`, `secondary`, `accent`<br>- by color: `blue`, `green`, `grey`, `orange`, `red`<br>- by special color: `default`, `transparent`, `code` |
| **color** | see notes | The [CSS color value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) to be used. If not set, the chosen color depends on the **style**. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching color for the severity<br>- for all other styles: the corresponding color |
| **title** | see notes | Arbitrary text for the box title. Depending on the **style** there may be a default title. Any given value will overwrite the default.<br><br>- for severity styles: the matching title for the severity<br>- for all other styles: `Attachments`<br><br>If you want no title for a severity style, you have to set this parameter to `" "` (a non empty string filled with spaces) |
| **icon** | see notes | [Font Awesome icon name]({{%relref "4-shortcodes/08-defaults/icon#finding-an-icon" %}}) set to the left of the title. Depending on the **style** there may be a default icon. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching icon for the severity<br>- for all other styles: `paperclip`<br><br>If you want no icon, you have to set this parameter to `" "` (a non empty d with spaces) |
Expand All @@ -48,33 +52,35 @@ While the examples are using shortcodes with named parameter you are free to als

The shortcode lists files found in a specific folder. The name of the folder depends on your page type (either branch bundle, leaf bundle or page).

1. For simple pages, attachments must be placed in a folder named like your page and ending with `.files`.
1. If your page is a leaf bundle, attachments must be placed in a nested `index.files` folder, accordingly.

> * content
> * _index.md
> * **page.files**
> * attachment.pdf
> * page.md
> * page
> * _index.md
> * **_index.files**
> * attachment.pdf
2. If your page is a branch or leaf bundle, attachments must be placed in a nested `_index.files` or `index.files` folder, accordingly.
2. If your page is a branch bundle, attachments must be placed in a nested `_index.files` folder, accordingly.

For branch bundles:
{{% badge style="warning" title=" " %}}Warning{{% /badge %}} This is only available for Hugo < `0.112.0`

> * content
> * _index.md
> * page
> * index.md
> * **index.files**
> * attachment.pdf
> * index.md
> * **index.files**
> * attachment.pdf
For leaf bundles:
3. For simple pages, attachments must be placed in a folder named like your page and ending with `.files`.

{{% badge style="warning" title=" " %}}Warning{{% /badge %}} This is only available for Hugo < `0.112.0`

> * content
> * _index.md
> * page
> * _index.md
> * **_index.files**
> * attachment.pdf
> * **page.files**
> * attachment.pdf
> * page.md
### Multilingual

Expand All @@ -83,14 +89,15 @@ Be aware that if you use a multilingual website, you will need to have as many f
Eg. for a site in English and Piratish:

> * content
> * _index.en.md
> * _index.pir.md
> * **page.en.files**
> * attachment.pdf
> * **page.pir.files**
> * attachment.pdf
> * page.en.md
> * page.pir.md
> * index.en.md
> * index.pir.md
> * page
> * index.en.md
> * index.pir.md
> * **index.en.files**
> * attachment.pdf
> * **index.pir.files**
> * attachment.pdf
## Examples

Expand Down Expand Up @@ -120,4 +127,4 @@ Eg. for a site in English and Piratish:

### Style, Color, Title and Icons

For further examples for **style**, **color**, **title** and **icon**, see the [`notice` shortcode]({{% relref "4-shortcodes/08-defaults/notice" %}}) documentation. The parameter are working the same way for both shortcodes, besides having different defaults.
For further examples for **style**, **color**, **title** and **icon**, see the [`notice` shortcode]({{% relref "4-shortcodes/08-defaults/notice" %}}) documentation. The parameter are working the same way for both shortcodes, besides having different defaults.
20 changes: 10 additions & 10 deletions content/4-shortcodes/08-defaults/badge.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The `badge` shortcode displays little markers in your text with adjustable color

While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.

{{< tabs groupId="shortcode-parameter">}}
{{% tab name="shortcode" %}}
{{< tabs groupid="shortcode-parameter">}}
{{% tab title="shortcode" %}}

````go
{{%/* badge %}}Important{{% /badge */%}}
Expand All @@ -27,32 +27,32 @@ While the examples are using shortcodes with named parameter you are free to als
````

{{% /tab %}}
{{% tab name="partial" %}}
{{% tab title="partial" %}}

````go
{{ partial "shortcodes/badge.html" (dict
"context" .
"page" .
"content" "Important"
)}}
{{ partial "shortcodes/badge.html" (dict
"context" .
"page" .
"style" "primary"
"title" "Version"
"content" "6.6.6"
)}}
{{ partial "shortcodes/badge.html" (dict
"context" .
"page" .
"style" "red"
"icon" "angle-double-up"
"content" "Captain"
)}}
{{ partial "shortcodes/badge.html" (dict
"context" .
"page" .
"style" "info"
"content" "New"
)}}
{{ partial "shortcodes/badge.html" (dict
"context" .
"page" .
"color" "fuchsia"
"icon" "fab fa-hackerrank"
"content" "Awesome"
Expand All @@ -65,8 +65,8 @@ While the examples are using shortcodes with named parameter you are free to als
### Parameter

| Name | Default | Notes |
|:----------------------|:----------------|:------------|
| **style** | `default` | The style scheme used for the badge.<br><br>- by severity: `info`, `note`, `tip`, `warning`<br>- by brand color: `primary`, `secondary`, `accent`<br>- by color: `blue`, `green`, `grey`, `orange`, `red`<br>- by special color: `default`, `transparent` |
|-----------------------|-----------------|-------------|
| **style** | `default` | The style scheme used for the badge.<br><br>- by severity: `info`, `note`, `tip`, `warning`<br>- by brand color: `primary`, `secondary`, `accent`<br>- by color: `blue`, `green`, `grey`, `orange`, `red`<br>- by special color: `default`, `transparent`, `code` |
| **color** | see notes | The [CSS color value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) to be used. If not set, the chosen color depends on the **style**. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching color for the severity<br>- for all other styles: the corresponding color |
| **title** | see notes | Arbitrary text for the badge title. Depending on the **style** there may be a default title. Any given value will overwrite the default.<br><br>- for severity styles: the matching title for the severity<br>- for all other styles: _&lt;empty&gt;_<br><br>If you want no title for a severity style, you have to set this parameter to `" "` (a non empty string filled with spaces) |
| **icon** | see notes | [Font Awesome icon name]({{%relref "4-shortcodes/08-defaults/icon#finding-an-icon" %}}) set to the left of the title. Depending on the **style** there may be a default icon. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching icon for the severity<br>- for all other styles: _&lt;empty&gt;_<br><br>If you want no icon for a severity style, you have to set this parameter to `" "` (a non empty string filled with spaces) |
Expand Down
30 changes: 23 additions & 7 deletions content/4-shortcodes/08-defaults/button.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ The `button` shortcode displays a clickable button with adjustable color, title

While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.

{{< tabs groupId="shortcode-parameter">}}
{{% tab name="shortcode" %}}
{{< tabs groupid="shortcode-parameter">}}
{{% tab title="shortcode" %}}

````go
{{%/* button href="https://gohugo.io/" %}}Get Hugo{{% /button */%}}
{{%/* button href="https://gohugo.io/" style="warning" icon="dragon" %}}Get Hugo{{% /button */%}}
````

{{% /tab %}}
{{% tab name="partial" %}}
{{% tab title="partial" %}}

````go
{{ partial "shortcodes/button.html" (dict
"context" .
"page" .
"href" "https://gohugo.io/"
"content" "Get Hugo"
)}}
{{ partial "shortcodes/button.html" (dict
"context" .
"page" .
"href" "https://gohugo.io/"
"style" "warning"
"icon" "dragon"
Expand All @@ -46,9 +46,9 @@ Once the button is clicked, it opens another browser tab for the given URL.
### Parameter

| Name | Default | Notes |
|:----------------------|:----------------|:------------|
|-----------------------|-----------------|-------------|
| **href** | _&lt;empty&gt;_ | Either the destination URL for the button or JavaScript code to be executed on click. If this parameter is not set, the button will do nothing but is still displayed as clickable.<br><br>- if starting with `javascript:` all following text will be executed in your browser<br>- every other string will be interpreted as URL|
| **style** | `transparent` | The style scheme used for the button.<br><br>- by severity: `info`, `note`, `tip`, `warning`<br>- by brand color: `primary`, `secondary`, `accent`<br>- by color: `blue`, `green`, `grey`, `orange`, `red`<br>- by special color: `default`, `transparent` |
| **style** | `transparent` | The style scheme used for the button.<br><br>- by severity: `info`, `note`, `tip`, `warning`<br>- by brand color: `primary`, `secondary`, `accent`<br>- by color: `blue`, `green`, `grey`, `orange`, `red`<br>- by special color: `default`, `transparent`, `code` |
| **color** | see notes | The [CSS color value](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) to be used. If not set, the chosen color depends on the **style**. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching color for the severity<br>- for all other styles: the corresponding color |
| **icon** | see notes | [Font Awesome icon name]({{%relref "4-shortcodes/08-defaults/icon#finding-an-icon" %}}) set to the left of the title. Depending on the **style** there may be a default icon. Any given value will overwrite the default.<br><br>- for severity styles: a nice matching icon for the severity<br>- for all other styles: _&lt;empty&gt;_<br><br>If you want no icon for a severity style, you have to set this parameter to `" "` (a non empty string filled with spaces) |
| **iconposition** | `left` | Places the icon to the `left` or `right` of the title. |
Expand Down Expand Up @@ -115,6 +115,22 @@ Once the button is clicked, it opens another browser tab for the given URL.

### Icon

#### Empty

````go
{{%/* button href="https://gohugo.io/" icon=" " %}}{{% /button */%}}
````

{{% button href="https://gohugo.io/" icon=" " %}}{{% /button %}}

#### Only

````go
{{%/* button href="https://gohugo.io/" icon="download" %}}{{% /button */%}}
````

{{% button href="https://gohugo.io/" icon="download" %}}{{% /button %}}

#### To the Left

````go
Expand Down
10 changes: 5 additions & 5 deletions content/4-shortcodes/08-defaults/children/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ The `children` shortcode lists the child pages of the current page and its desce

While the examples are using shortcodes with named parameter you are free to also call this shortcode from your own partials.

{{< tabs groupId="shortcode-parameter">}}
{{% tab name="shortcode" %}}
{{< tabs groupid="shortcode-parameter">}}
{{% tab title="shortcode" %}}

````go
{{%/* children sort="weight" */%}}
````

{{% /tab %}}
{{% tab name="partial" %}}
{{% tab title="partial" %}}

````go
{{ partial "shortcodes/children.html" (dict
"context" .
"page" .
"sort" "weight"
)}}
````
Expand All @@ -34,7 +34,7 @@ While the examples are using shortcodes with named parameter you are free to als
### Parameter

| Name | Default | Notes |
|:-------------------|:------------------|:------------|
|--------------------|-------------------|-------------|
| **containerstyle** | `ul` | Choose the style used to group all children. It could be any HTML tag name. |
| **style** | `li` | Choose the style used to display each descendant. It could be any HTML tag name. |
| **showhidden** | `false` | When `true`, child pages hidden from the menu will be displayed as well. |
Expand Down

0 comments on commit 42b12a4

Please sign in to comment.