docs: move exampleSite to docs

This commit is contained in:
Sören Weber 2025-01-29 23:30:53 +01:00
parent df03dac58f
commit db9ca5d295
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
827 changed files with 656 additions and 652 deletions

View file

@ -0,0 +1,11 @@
+++
categories = ["reference"]
menuPre = "<i class='fa-fw fab fa-markdown'></i> "
title = "Authoring"
type = "chapter"
weight = 3
+++
Learn how to create and organize your content pages.
{{% children containerstyle="div" style="h2" description=true %}}

View file

@ -0,0 +1,8 @@
+++
categories = ["reference"]
menuPre = "<i class='fa-fw fab fa-markdown'></i> "
title = "Rambl'n"
type = "chapter"
weight = 3
+++
{{< piratify >}}

View file

@ -0,0 +1,9 @@
+++
alwaysopen = false
categories = ["reference"]
description = "All things front matter"
title = "Front Matter"
weight = 2
+++
{{% children containerstyle="div" style="h2" description=true %}}

View file

@ -0,0 +1,8 @@
+++
alwaysopen = false
categories = ["reference"]
description = "All things front matter"
title = "Front Matter"
weight = 2
+++
{{< piratify >}}

View file

@ -0,0 +1,81 @@
+++
categories = ["howto"]
description = "How to vary layouts by using page designs"
title = "Page Designs"
weight = 1
+++
Page designs are used to provide different layouts for your pages.
A page is displayed by exactly one page design and is represented by [Hugo's reserved `type` front matter](https://gohugo.io/content-management/front-matter/#type).
The Relearn theme ships with the page designs `home`, `chapter`, and `default` for the HTML output format but you can [define further custom page designs](configuration/customization/designs).
## Using a Page Design
Regardless of shipped or custom page design, you are using them in the same way.
- If you have an [archetype file](https://gohugo.io/content-management/archetypes/), you can just do
````shell
hugo new --kind chapter chapter1/_index.md
````
- If you are creating your Markdown files manually, you can achieve the same by just setting `type='chapter'` in the front matter to make your page displayed with the `chapter` page design.
````toml {title="_index.md"}
+++
title = "Chapter 1"
type = "chapter"
+++
````
If no `type` is set in your front matter or the page design doesn't exist for a given output format, the page is treated as if `type='default'` was set.
## Predefined Designs for the HTML Output Format
### Home {#archetypes-home}
A **Home** page is the starting page of your project. It's best to have only one page of this kind in your project.
To create a home page, run the following command
````shell
hugo new --kind home _index.md
````
![Home page](pages-home.png?width=60pc)
### Chapter {#archetypes-chapter}
A **Chapter** displays a page meant to be used as introduction for a set of child pages.
Commonly, it contains a title front matter and a short description in the content.
To create a chapter page, run the following command
````shell
hugo new --kind chapter chapter1/_index.md
````
If a numerical `weight` front matter is set, it will be used to generate the subtitle of the chapter page. Set the number to a consecutive value starting at 1 for each new chapter on the same directory level.
![Chapter page](pages-chapter.png?width=60pc)
### Default {#archetypes-default}
A **Default** page is any other content page.
To create a default page, run either one of the following commands
````shell
hugo new chapter1/page1/_index.md
````
or
````shell
hugo new chapter1/page1.md
````
![Default page](pages-default.png?width=60pc)

View file

@ -0,0 +1,7 @@
+++
categories = ["howto"]
description = "How to vary layouts by using page designs"
title = "Page Designs"
weight = 1
+++
{{< piratify >}}

Binary file not shown.

After

(image error) Size: 43 KiB

Binary file not shown.

After

(image error) Size: 124 KiB

Binary file not shown.

After

(image error) Size: 84 KiB

View file

@ -0,0 +1,41 @@
+++
categories = ["howto"]
description = "What options are available for links and images"
frontmatter = ["errorignore", "externalLinkTarget", "image.errorlevel", "link.errorlevel"]
options = ["errorignore", "externalLinkTarget", "image.errorlevel", "link.errorlevel"]
title = "Linking"
weight = 3
+++
## Opening Links
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} By default, external links open in a new tab. To change this, use the `externalLinkTarget` setting with a proper [link target](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).
For example, this will open links in the same tab
{{< multiconfig >}}
externalLinkTarget = '_self'
{{< /multiconfig >}}
## Enabling Link and Image Link Warnings
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} You can use `link.errorlevel` and `image.errorlevel` to control what should happen if a local link can not be resolved to a page and/or a resource.
If not set or empty, any unresolved link is written as given into the resulting output. If set to `warning` the same happens and an additional warning is printed in the built console. If set to `error` an error message is printed and the build is aborted.
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 the [include](shortcodes/include#enabling-link-warnings) and [openapi](shortcodes/openapi#enabling-link-warnings) shortcodes.
{{< multiconfig >}}
link.errorlevel = 'warning'
image.errorlevel = 'warning'
{{< /multiconfig >}}
### Ignoring False Negatives
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} In case you want to use link warnings but are bothered by false negatives, you can configure an ignore list of regular expressions. The referenced address will be checked against all regexes of this list. If the address matches at least one regex, no output will be written to the console. The check uses [Hugo's `findRE` function](https://gohugo.io/functions/strings/findre/).
{{< multiconfig >}}
errorignore = [ '^/authoring/', '^/configuration/' ]
{{< /multiconfig >}}

View file

@ -0,0 +1,9 @@
+++
categories = ["howto"]
description = "What options are available for links and images"
frontmatter = ["errorignore", "externalLinkTarget", "image.errorlevel", "link.errorlevel"]
options = ["errorignore", "externalLinkTarget", "image.errorlevel", "link.errorlevel"]
title = "Linking"
weight = 3
+++
{{< piratify >}}

View file

@ -0,0 +1,6 @@
+++
description = "Setting the behavior of the menus"
title = "Menus"
weight = 2
menuPageRef = '/configuration/sidebar/menus'
+++

View file

@ -0,0 +1,6 @@
+++
description = "Setting the behavior of the menus"
title = "Menus"
weight = 2
menuPageRef = '/configuration/sidebar/menus'
+++

View file

@ -0,0 +1,38 @@
+++
categories = ["reference"]
description = "All front matter for the Relearn theme"
linkTitle = "Reference"
title = "Front Matter Reference"
weight = 5
+++
Every Hugo page must have front matter.
In addition to [Hugo's standard front matter](https://gohugo.io/content-management/front-matter/#fields), the Relearn theme offers extras settings listed here.
Throughout the documentation, theme-specific front matter is marked with a {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} badge.
Add theme front matter directly to the root of your page's front matter. For example:
{{< multiconfig fm=true >}}
math = true
{{< /multiconfig >}}
## Index
{{% taxonomy "frontmatter" "h3" %}}
## All Front Matter
Here's a list of all available front matter with example values. Default values are described in the [annotated example](#annotated-front-matter) below or in each front matter's documentation.
{{< multiconfig fm=true >}}
{{% include "frontmatter.toml" %}}
{{< /multiconfig >}}
## Annotated Front Matter
````toml {title="toml"}
+++
{{% include "frontmatter.toml" %}}+++
````

View file

@ -0,0 +1,8 @@
+++
categories = ["reference"]
description = "All front matter for the Relearn theme"
linkTitle = "Reference"
title = "Front Matter Reference"
weight = 5
+++
{{< piratify >}}

View file

@ -0,0 +1,408 @@
# If an option value is said to be not set, you can achieve the same behavior
# by giving it an empty string value.
###############################################################################
# Hugo
# These options usually apply to other themes as well.
# The social media image of your page.
# Default: not set
# This is used for generating social media meta information for the opengraph
# protocol and twitter cards.
# If not set, the set value of your site's hugo.toml is used.
images = [ 'images/hero.png' ]
# The title of your page.
# Default: not set
# A page without a title is treated as a hidden page.
title = 'Example Page'
# The description of your page.
# Default: not set
# This is used for generating HTML meta tags, social media meta information
# for the opengraph protocol and twitter cards.
# If not set, the set value of your site's hugo.toml is used for the html
# meta tag, social media meta information for the opengraph protocol and
# twitter cards.
description = ''
# The page design to be used
# Default: not set
# This decides the layout of your page. The theme ships 'home', 'chapter' and
# 'default'. If not set, 'default' is taken.
type = ''
###############################################################################
# Relearn Theme
# These options are specific to the Relearn theme.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# General
# These options are defining general, non visual behavior.
# Conditionally ignore errorlevel settings
# Default: []
# The theme supports checking referenced address (e.g. with
# link.errorlevel, image.errorlevel, etc. see below). Sometimes checks lead
# to console output due to false negatives. You can turn off the checks
# for individual referenced addresses by defining regular expressions here.
# The referenced address will be checked against all regexes of this array.
# If it matches at least one, no output will be written to the console.
# This array can be expanded globally in your site's hugo.toml.
errorignore = []
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Topbar
# These options modify the topbar appearance.
# Hide the table of contents button.
# Default: false
# If the TOC button is hidden, also the keyboard shortcut is disabled.
# If not set, the set value of your site's hugo.toml is used.
disableToc = false
# Hide the breadcrumbs.
# Default: false
# If the breadcrumbs are hidden, the title of the displayed page will still be
# shown in the topbar.
disableBreadcrumb = false
# Hide the Markdown button.
# Default: false
# This hides the Markdown button if you activated the Markdown output format.
# If not set, the set value of your site's hugo.toml is used.
disableMarkdownButton = false
# Hide the Source button.
# Default: false
# This hides the Source button if you activated the Source output format.
# If not set, the set value of your site's hugo.toml is used.
disableSourceButton = false
# Hide the Print button.
# Default: false
# This hides the print button if you activated the print output format.
# If not set, the set value of your site's hugo.toml is used.
disablePrintButton = false
# Hide Next and Previous navigation buttons.
# Default: false
# If the navigation buttons are hidden, also the keyboard shortcuts are
# disabled.
disableNextPrev = false
# The URL prefix to edit a page.
# Default: not set
# If set, an edit button will be shown in the topbar. If the button is hidden,
# also the keyboard shortcuts are disabled. The value can contain the macro
# `${FilePath}` which will be replaced by the file path of your displayed page.
# If not set, the set value of your site's hugo.toml is used. If the global
# parameter is given but you want to hide the button for the displayed page,
# you can set the value to an empty string. If instead of hiding you want to have
# an disabled button, you can set the value to a string containing just spaces.
# This is useful if you want to give the opportunity for people to create merge
# request for your content.
editURL = ''
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Menu
# These options modify the menu appearance.
# Menu specific title
# Default: not set
# The title displayed in the menu. If not set the `title` front matter will
# be used.
linkTitle = ''
# Prefix for the title in navigation menu.
# Default: not set
# The title of the page in the menu will be prefixed by this HTML content.
menuPre = ''
# Suffix for the title in navigation menu.
# Default: not set
# The title of the page in the menu will be suffixed by this HTML content.
menuPost = ''
# Link the menu entry to a different internal page instead.
# Default: not set
# This will effectivly hide the page and its content from the viewer by
# linking to the given URL instead.
menuPageRef = ''
# Link the menu entry to an external URL instead of a page.
# Default: not set
# This will effectivly hide the page and its content from the viewer by
# linking to the given URL instead.
menuUrl = ''
# The order of navigation menu submenus.
# Default: 'weight'
# Submenus can be ordered by 'weight', 'title', 'linktitle', 'modifieddate',
# 'expirydate', 'publishdate', 'date', 'length' or 'default' (adhering to
# Hugo's default sort order).
# If not set, the value of the parent menu entry is used.
ordersectionsby = 'weight'
# The initial expand state of submenus.
# Default: not set
# This controls whether submenus will be expanded (true), or collapsed (false)
# in the menu. If not set, the first menu level is set to false, all others
# levels are set to true. If not set, the value of the parent menu entry is used.
# If the displayed page has submenus, they will always been displayed expanded
# regardless of this option.
alwaysopen = ''
# Shows expander for submenus.
# Default: false
# If set to true, a submenu in the sidebar will be displayed in a collapsible
# tree view and a clickable expander is set in front of the entry.
# If not set, the set value of your site's hugo.toml is used.
collapsibleMenu = true
# Define your own sidebar menus.
# Default: the value used below
# The sidebar menus are built from this parameter. If not set, the set value
# of your site's hugo.toml is used and contains the below default.
# Menus are written from the sidebar's top to buttom in the order given in
# this array.
# Each entry can contain the following keys:
# - `type` is mandatory. Either `page` in case it should generate a tre from
# the page structure or `menu` in case it should generate a tree from a
# defined menu.
# - `identifier` is mandatory. In case of `type=page`, anything can be used,
# in case of `type=menu` the `identifier` key must be identical to the
# key of the menu definition.
# - `main`, boolean. If `true`, the first tree level is spaced more generous
# and the text is emphasized. Default: `true` for `type=page` and `false`
# for `type=menu`
# - `disableTitle`, boolean. If `true`, there is no title above the tree.
# Default: `true` for `type=page` and `false` for `type=menu`. If a title
# should be used, in case of `type=page` it will be taken from the page's
# `menuTitle` front matter and if not set, from the translation files, using
# the menu `identifier` as key. In case of `type=menu` it will be taken
# from the menu `title` according to Hugo's documentation and if not set
# from the menu `name` and if this is not set form the page's `linkTitle`.
# - `pageRef`, optional. In case of `type=page` this is the starting page's
# path. If not set, the home page will be used.
sidebarmenus = [
{ type = 'page', identifier = 'home', main = true, disableTitle = true, pageRef = '' },
{ type = 'menu', identifier = 'shortcuts', main = false, disableTitle = false },
]
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Hidden pages
# These options configure how hidden pages are treated.
# A page flagged as hidden, is only removed from the navigation menu if you are
# currently not on this page or the hidden page is not part of current page's
# ancestors. For all other functionality in Hugo a hidden page behaves like any
# other page if not otherwise configured.
# Hide a page's menu entry.
# Default: false
# If this value is true, the page is hidden from the menu.
hidden = false
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Content
# These options modify how your content is displayed.
# Prefix for the title in the content area.
# Default: not set
# The title of the page heading will be prefixed by this HTML content.
headingPre = ''
# Suffix for the title in the content area.
# Default: not set
# The title of the page heading will be suffixed by this HTML content.
headingPost = ''
# Display name of the page's last editor.
# Default: not set
# If set, it will be displayed in the default footer.
LastModifierDisplayName = ''
# Email address of the page's last editor.
# Default: not set
# If set together with LastModifierDisplayName, it will be displayed in the
# default footer.
LastModifierEmail = ''
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Highlight
# These options configure how code is displayed.
# Wrap for code blocks.
# Default: true
# By default lines of code blocks wrap around if the line is too long to be
# displayed on screen. If you dislike this behavior, you can reconfigure it
# here.
# Note that lines always wrap in print mode regardless of this option.
# If not set, the set value of your site's hugo.toml is used or given as a
# parameter to individual code blocks.
highlightWrap = true
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Include
# These options configure how the include shortcode works.
# What to do when path is not resolved.
# Default: ''
# You can control what should happen if a path can not be resolved to as
# a resource or via the file system. If not set, no output will be written
# for the unresolved path. If set to `warning` the same happens and an additional
# warning is printed. If set to `error` an error message is printed and the build
# is aborted.
# If not set, the set value of your site's hugo.toml is used.
include.errorlevel = ''
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Images
# These options configure how images are displayed.
# What to do when local image link is not resolved.
# Default: ''
# You can control what should happen if a local image can not be resolved to as
# a resource. If not set, the unresolved link is written as given into the resulting
# output. If set to `warning` the same happens and an additional warning is
# printed. If set to `error` an error message is printed and the build is
# aborted.
# Please note that this can not resolve files inside of your `static` directory.
# If not set, the set value of your site's hugo.toml is used.
image.errorlevel = ''
# Image effects.
# See the documentation for how you can even add your own arbitrary effects to
# the list.
# All effect values default to the values of your site's hugo.toml and can be
# overridden through URL parameter given to the image. See the documentation for
# details.
# Default: false
imageEffects.border = true
# Default: true
imageEffects.lazy = true
# Default: true
imageEffects.lightbox = true
# Default: false
imageEffects.shadow = false
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Links
# These options configure how links are displayed.
# What to do when local page link is not resolved.
# Default: ''
# You can control what should happen if a local link can not be resolved to a
# page. If not set, the unresolved link is written as given into the resulting
# output. If set to `warning` the same happens and an additional warning is
# printed. If set to `error` an error message is printed and the build is
# aborted.
# Please note that with Hugo < 0.123.0 + `uglyURLs=true` this can lead to false
# negatives.
# If not set, the set value of your site's hugo.toml is used.
link.errorlevel = ''
# How to open external links.
# Default: '_blank'
# For external links you can define how they are opened in your browser. All
# values for the HTML `target` attribute of the `a` element are allowed. The
# default value opens external links in a separate browser tab. If you want
# to open those links in the same tab, use '_self'.
# If not set, the set value of your site's hugo.toml is used.
externalLinkTarget = '_self'
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# MathJax
# These options configure how math formulae are displayed.
# Initialization options for MathJax.
# Default: not set
# A JSON value. See the MathJaxdocumentation for possible parameter.
# If not set, the set value of your site's hugo.toml is used.
mathJaxInitialize = '{}'
# Force load Math on every page.
# Default: false
# If a, Math shortcode or codefence is found, the option will be ignored and
# Math will be loaded regardlessly. This option is useful in case you
# are using passthrough configuration to render your math. In this case no shortcode or
# codefence is involved and the library is not loaded by default so you can
# force loading it by setting `math=true`.
# This option has an alias `math.force`.
# If not set, the set value of your site's hugo.toml is used.
math = false
# URL for external MathJax library.
# Default: not set
# Specifies the remote location of the MathJax library. By default the shipped
# version will be used.
# If not set, the set value of your site's hugo.toml is used.
customMathJaxURL = '' # 'https://unpkg.com/mathjax/es5/tex-mml-chtml.js'
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Mermaid
# These options configure how Mermaid graphs are displayed.
# Make graphs panable and zoomable
# Default: false
# For huge graphs it can be helpful to make them zoomable. Zoomable graphs come
# with a reset button for the zoom.
# If not set, the set value of your site's hugo.toml is used or given as a
# parameter to individual graphs.
mermaidZoom = true
# Initialization options for Mermaid.
# Default: not set
# A JSON value. See the Mermaid documentation for possible parameter.
# If not set, the set value of your site's hugo.toml is used.
mermaidInitialize = '{ "securityLevel": "loose" }'
# Force load Mermaid on every page.
# Default: false
# If a Mermaid shortcode or codefence is found, the option will be ignored and
# Mermaid will be loaded regardlessly. This option is useful in case you
# are using scripting to render your graph. In this case no shortcode or
# codefence is involved and the library is not loaded by default so you can
# force loading it by setting `mermaid.force=true`.
# If not set, the set value of your site's hugo.toml is used.
mermaid.force = false
# URL for external Mermaid library.
# Default: not set
# Specifies the remote location of the Mermaid library. By default the shipped
# version will be used.
# If not set, the set value of your site's hugo.toml is used.
customMermaidURL = '' # 'https://unpkg.com/mermaid/dist/mermaid.min.js'
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# OpenApi
# These options configure how OpenAPI specifications are displayed.
# Load OpenAPI on every page.
# Default: false
# If a, OpenAPI shortcode or codefence is found, the option will be ignored and
# OpenAPI will be loaded regardlessly. This option is useful in case you
# are using scripting to render your spec. In this case no shortcode or
# codefence is involved and the library is not loaded by default so you can
# force loading it by setting `openapi.force=true`.
# If not set, the set value of your site's hugo.toml is used.
openapi.force = false
# URL for external OpenAPI library.
# Default: not set
# Specifies the remote location of the OpenAPI library. By default the shipped
# version will be used.
# If not set, the set value of your site's hugo.toml is used.
customOpenapiURL = '' # 'https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js'
# What to do when a local OpenAPI spec link is not resolved.
# Default: ''
# You can control what should happen if a local OpenAPI spec link can not be resolved
# to a resource. If not set, the unresolved link is written as given into the resulting
# output. If set to `warning` the same happens and an additional warning is
# printed. If set to `error` an error message is printed and the build is
# aborted.
# Please note that this can not resolve files inside of your `static` directory.
# If not set, the set value of your site's hugo.toml is used.
openapi.errorlevel = ''

View file

@ -0,0 +1,84 @@
+++
categories = ["howto"]
description = "Configure the topbar"
frontmatter = ["disableBreadcrumb", "disableNextPrev", "disableMarkdownButton", "disableSourceButton", "disablePrintButton", "disableToc", "editURL"]
options = ["disableBreadcrumb", "disableNextPrev", "disableMarkdownButton", "disableSourceButton", "disablePrintButton", "disableToc", "editURL"]
outputs = ["html", "rss", "print", "markdown", "source"]
title = "Topbar"
weight = 4
+++
This page is about how to configure the topbar using configuration options. If you want to add further buttons or functionality, [see this section](configuration/customization/topbar).
Your topbar contains the following elements. Some of them are configuarable:
- {{% button style="transparent" icon="bars" %}}{{% /button %}} **sidebar**: opens the sidebar flyout if in mobile layout
- {{% button style="transparent" icon="list-alt" %}}{{% /button %}} **toc**: [opens the table of contents in an overlay](#table-of-contents)
- {{% button style="transparent" icon="empty" %}}{{% /button %}} **breadcrumb**: shows the clickable [breadcrumbs](#breadcrumbs)
- {{% button style="transparent" icon="pen" %}}{{% /button %}} **edit**: browses to the editable page if the `editURL` [parameter is set](#edit-button)
- {{% button style="transparent" icon="file-code" %}}{{% /button %}} **source**: browses to the [chapters source code](#source-button) if [source support](configuration/sitemanagement/outputformats#source-support) was activated
- {{% button style="transparent" icon="fa-fw fab fa-markdown" %}}{{% /button %}} **markdown**: browses to the [chapters Markdown source](#markdown-button) if [markdown support](configuration/sitemanagement/outputformats#markdown-support) was activated
- {{% button style="transparent" icon="print" %}}{{% /button %}} **print**: browses to the [chapters printable page](#print-button) if [print support](configuration/sitemanagement/outputformats#print-support) was activated
- {{% button style="transparent" icon="chevron-left" %}}{{% /button %}} **prev**: browses to the [previous page](#arrow-navigation) if there is one
- {{% button style="transparent" icon="chevron-right" %}}{{% /button %}} **next**: browses to the [next page](#arrow-navigation) if there is one
- {{% button style="transparent" icon="ellipsis-v" %}}{{% /button %}} **more**: opens the overlay if screen space is limited
## Table of Contents
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} Set `disableToc=true` to hide the TOC button on all pages. If the button is hidden, also the keyboard shortcut is disabled. This can be overridden in a page's front matter.
{{< multiconfig >}}
disableToc = true
{{< /multiconfig >}}
## Breadcrumbs
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} Set `disableBreadcrumb=true` to hide the breadcrumb in the topbar.
Further breadcrumbs settings can be found in the [content configuration section](configuration/content/titles).
{{< multiconfig >}}
disableBreadcrumb = true
{{< /multiconfig >}}
## Edit Button
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} If `editURL` is set to a URL, an edit button will be shown in the topbar. If the button is hidden, also the keyboard shortcut is disabled.
The value can contain the macro `${FilePath}` which will be replaced by the file path of your displayed page. If no `${FilePath}` is given in the value, the value is treated as if the `${FilePath}` was appended at the end of the value. This can be overridden in the pages front matter.
{{< multiconfig >}}
editURL = 'https://github.com/McShelby/hugo-theme-relearn/edit/main/docs/content/${FilePath}'
{{< /multiconfig >}}
## Markdown Button
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} You can hide the Markdown button if the [Markdown output format](configuration/sitemanagement/outputformats/#markdown-support) is active by setting `disableMarkdownButton=true`.
{{< multiconfig >}}
disableMarkdownButton = true
{{< /multiconfig >}}
## Source Button
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} You can hide the Source button if the [Source output format](configuration/sitemanagement/outputformats/#source-support) is active by setting `disableSourceButton=true`.
{{< multiconfig >}}
disableSourceButton = true
{{< /multiconfig >}}
## Print Button
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} You can hide the print button if the [print output format](configuration/sitemanagement/outputformats/#print-support) is active by setting `disablePrintButton=true`.
{{< multiconfig >}}
disablePrintButton = true
{{< /multiconfig >}}
## Arrow Navigation
{{% badge style="cyan" icon="gears" title=" " %}}Option{{% /badge %}} {{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} You can hide the previous/next buttons by setting `disableNextPrev=true`. If the buttons are hidden, also the keyboard shortcuts are disabled.
{{< multiconfig >}}
disableNextPrev = true
{{< /multiconfig >}}

View file

@ -0,0 +1,10 @@
+++
categories = ["howto"]
description = "Configure the topbar"
frontmatter = ["disableBreadcrumb", "disableNextPrev", "disableMarkdownButton", "disableSourceButton", "disablePrintButton", "disableToc", "editURL"]
options = ["disableBreadcrumb", "disableNextPrev", "disableMarkdownButton", "disableSourceButton", "disablePrintButton", "disableToc", "editURL"]
outputs = ["html", "rss", "print", "markdown", "source"]
title = "Topbarrr"
weight = 4
+++
{{< piratify >}}

View file

@ -0,0 +1,58 @@
+++
categories = ["explanation"]
description = "How to apply graphical effects to your images"
frontmatter = ["imageEffects"]
title = "Image Effects"
weight = 5
+++
The theme offers [graphical effects](authoring/markdown#image-effects) for your linked images.
You can [define additional custom image effects and set defaults](configuration/customization/imageeffects) in your configuration.
The default image effects shipped with the theme are
| Name | Description |
| -------- | ----------------------------------------------------------------- |
| border | Draws a light thin border around the image |
| lazy | Lets the image be lazy loaded |
| lightbox | The image will be clickable to show it enlarged |
| shadow | Draws a shadow around the image to make it appear hovered/glowing |
One way to use them is to add them as URL query parameter to each individually linked image.
This can become cumbersome to be done consistently for the whole site. Instead, you can [configure the defaults](configuration/customization/imageeffects) in your `hugo.toml` as well as overriding these defaults in a page's front matter.
Explicitly set URL query parameter will override the defaults set for a page or your site.
Without any settings in your `hugo.toml` `imageEffects` defaults to
{{< multiconfig >}}
[imageEffects]
border = false
lazy = true
lightbox = true
shadow = false
{{< /multiconfig >}}
{{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} This can be overridden in a pages front matter for example by
{{< multiconfig fm=true >}}
[imageEffects]
lazy = false
{{< /multiconfig >}}
Or by explicitly override settings by URL query parameter
````md {title="URL"}
![Minion](https://octodex.github.com/images/minion.png?lazy=true&lightbox=false)
````
The settings applied to the above image would be
{{< multiconfig >}}
border = true
lazy = true
lightbox = false
shadow = false
{{< /multiconfig >}}

View file

@ -0,0 +1,8 @@
+++
categories = ["explanation"]
description = "How to apply graphical effects to your images"
frontmatter = ["imageEffects"]
title = "Image Effects"
weight = 5
+++
{{< piratify >}}

View file

@ -0,0 +1,849 @@
+++
description = "Reference of CommonMark and Markdown extensions"
categories = ["howto", "reference"]
title = "Markdown Syntax"
weight = 4
+++
Let's face it: Writing content for the web is tiresome. WYSIWYG editors help alleviate this task, but they generally result in horrible code, or worse yet, ugly web pages.
**Markdown** is a better way to write **HTML**, without all the complexities and ugliness that usually accompanies it.
Some of the key benefits are:
1. Markdown is simple to learn, with minimal extra characters so it's also quicker to write content.
2. Less chance of errors when writing in Markdown.
3. Produces valid HTML output.
4. Keeps the content and the visual display separate, so you cannot mess up the look of your site.
5. Write in any text editor or Markdown application you like.
6. Markdown is a joy to use!
John Gruber, the author of Markdown, puts it like this:
> The overriding design goal for Markdown's formatting syntax is to make it as readable as possible. The idea is that a Markdown-formatted document should be publishable as-is, as plain text, without looking like it's been marked up with tags or formatting instructions. While Markdown's syntax has been influenced by several existing text-to-HTML filters, the single biggest source of inspiration for Markdown's syntax is the format of plain text email.
> <cite>John Gruber</cite>
{{% notice tip %}}
{{% icon bookmark %}} Bookmark this page for easy future reference!
{{% /notice %}}
## Standard and Extensions
If not otherwise noted, the shown examples adhere to the [CommonMark](https://commonmark.org/help/) standard. In addition the theme supports the following extensions that [can be activated](https://gohugo.io/getting-started/configuration-markup/#goldmark) in your `hugo.toml` or are built into the theme:
- {{% badge color="darkgray" icon="fa-fw fab fa-github" %}}GFM{{% /badge %}} Extension on top of standard Markdown adhering to [GitHub Flavored Markdown](https://github.github.com/gfm/).
- {{% badge color="#888cc4" icon="fa-fw fab fa-php" %}}PHP{{% /badge %}} Extension on top of standard Markdown adhering to [PHP Markdown](https://michelf.ca/projects/php-markdown/extra/).
- {{% badge color="darkorange" icon="lightbulb" %}}Pants{{% /badge %}} Extension by John Gruber adhering to [SmartyPants](https://daringfireball.net/projects/smartypants/).
- {{% badge color="fuchsia" icon="fa-fw fab fa-hackerrank" %}}Hugo{{% /badge %}} [Hugo Extra Extension](https://github.com/gohugoio/hugo-goldmark-extensions?tab=readme-ov-file#extras-extension) supported by Hugo.
- {{% badge color="#7c3aed" icon="fa-fw far fa-gem" %}}Obsidian{{% /badge %}} Extension implemented by [Obsidian](https://obsidian.md/).
- {{% badge color="orangered" icon="fa-fw fas fa-code" %}}HTML{{% /badge %}} If the [usage of HTML](https://gohugo.io/getting-started/configuration-markup/#rendererunsafe) is allowed, the theme supports styling for further HTML elements.
- {{% badge color="#7dc903" icon="fa-fw fas fa-puzzle-piece" %}}Relearn{{% /badge %}} Extension specific to this theme.
## Paragraphs
In Markdown your content usually spans the whole available document width. This is called a block. Blocks are always separated by whitespace to their adjacent blocks in the resulting document.
Any text not starting with a special sign is written as normal, plain text paragraph block and must be separated to its adjacent blocks by empty lines.
````md
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
````
{{% notice style="code" icon="eye" title="Result" %}}
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
{{% /notice %}}
## Headings
A good idea is to structure your content using headings and subheadings. HTML-headings from `h1` through `h6` are constructed with a `#` for each level.
In Hugo you usually don't use `h1` as this is generated by your theme and you should only have one such element in a document.
````md
# h1 Heading
## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading
````
{{% notice style="code" icon="eye" title="Result" %}}
# h1 Heading
## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading
{{% /notice %}}
## Horizontal Rules
To further structure your content you can add horizontal rules. They create a "thematic break" between paragraph blocks. In Markdown, you can create it with three consecutive dashes `---`.
````md
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
---
Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
````
{{% notice style="code" icon="eye" title="Result" %}}
Lorem ipsum dolor sit amet, graecis denique ei vel, at duo primis mandamus.
---
Et legere ocurreret pri, animal tacimates complectitur ad cum. Cu eum inermis inimicus efficiendi. Labore officiis his ex, soluta officiis concludaturque ei qui, vide sensibus vim ad.
{{% /notice %}}
## Blockquotes
### Quotations
For quoting blocks of content from another source within your document add `>` before any text you want to quote.
Blockquotes can also be nested.
````md
> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue, aliquam non hendrerit ac, commodo vel nisi.
>
> > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
>
> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.
````
{{% notice style="code" icon="eye" title="Result" %}}
> Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue, aliquam non hendrerit ac, commodo vel nisi.
>
> > Sed adipiscing elit vitae augue consectetur a gravida nunc vehicula. Donec auctor odio non est accumsan facilisis. Aliquam id turpis in dolor tincidunt mollis ac eu diam.
>
> Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.
{{% /notice %}}
### GitHub Alerts
{{% badge color="darkgray" icon="fa-fw fab fa-github" %}}GFM{{% /badge %}} Since Hugo {{% badge color="fuchsia" icon="fa-fw fab fa-hackerrank" %}}0.132.0{{% /badge %}} [GitHub alerts](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts) are also supported. Please note, that coloring and icons of severities may defer between GitHub and this theme.
If you are in need of more advanced options to style your alerts, like icons, use the [notice shortcode](shortcodes/notice).
````md
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!INFO]
> Information that users <ins>_might_</ins> find interesting.
> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
````
{{% notice style="code" icon="eye" title="Result" %}}
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!INFO]
> Information that users <ins>_might_</ins> find interesting.
> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
{{% /notice %}}
### Obsidian Callouts
{{% badge color="#7c3aed" icon="fa-fw far fa-gem" %}}Obsidian{{% /badge %}} Since Hugo {{% badge color="fuchsia" icon="fa-fw fab fa-hackerrank" %}}0.134.0{{% /badge %}} [Obsidian callouts](https://help.obsidian.md/Editing+and+formatting/Callouts#Change+the+title) are also supported. Which enables configurable title text and expand/collapse.
If you are in need of more advanced options to style your alerts, like icons, use the [notice shortcode](shortcodes/notice).
````md
> [!tip] Callouts can have custom titles
> Like this one.
> [!tip] Title-only callout
> [!note]- Are callouts foldable?
> Yes! In a foldable callout, the contents are hidden when the callout is collapsed
> [!note]+ Are callouts foldable?
> Yes! In a foldable callout, the contents are hidden when the callout is collapsed
````
{{% notice style="code" icon="eye" title="Result" %}}
> [!tip] Callouts can have custom titles
> Like this one.
> [!tip] Title-only callout
> [!note]- Are callouts foldable?
> Yes! In a foldable callout, the contents are hidden when the callout is collapsed
> [!note]+ Are callouts foldable?
> Yes! In a foldable callout, the contents are hidden when the callout is collapsed
{{% /notice %}}
## Text Markers
### Bold
You can show importance of a snippet of text with a heavier font-weight by enclosing it with two asterisks `**`.
````md
I am rendered with **bold text**
````
{{% notice style="code" icon="eye" title="Result" %}}
I am rendered with **bold text**
{{% /notice %}}
### Italics
You can emphasize a snippet of text with italics by enclosing it with underscores `_`.
````md
I am rendered with _italicized text_
````
{{% notice style="code" icon="eye" title="Result" %}}
I am rendered with _italicized text_
{{% /notice %}}
### Marked Text
You can mark text in the predefined accent color of your stylesheet.
{{% badge color="fuchsia" icon="fa-fw fab fa-hackerrank" %}}Hugo{{% /badge %}} Since Hugo 0.126.0, you can [activate this through the _Hugo Extra Extension_](https://github.com/gohugoio/hugo-goldmark-extensions?tab=readme-ov-file#extras-extension) in your `hugo.toml`
````md
==Parts== of this text ==are marked!==
````
{{% badge color="orangered" icon="fa-fw fas fa-code" %}}HTML{{% /badge %}} You can also use it by configuring Hugo for [usage of HTML](https://gohugo.io/getting-started/configuration-markup/#rendererunsafe).
````html
<mark>Parts</mark> of this text <mark>are marked!</mark>
````
{{% notice style="code" icon="eye" title="Result" %}}
<mark>Parts</mark> of this text <mark>are marked!</mark>
{{% /notice %}}
### Inserted Text
You can mark text additions to existing text.
{{% badge color="fuchsia" icon="fa-fw fab fa-hackerrank" %}}Hugo{{% /badge %}} Since Hugo 0.126.0, you can [activate this through the _Hugo Extra Extension_](https://github.com/gohugoio/hugo-goldmark-extensions?tab=readme-ov-file#extras-extension) in your `hugo.toml`
````md
The ++hot, new++ stuff
````
{{% badge color="orangered" icon="fa-fw fas fa-code" %}}HTML{{% /badge %}} You can also use it by configuring Hugo for [usage of HTML](https://gohugo.io/getting-started/configuration-markup/#rendererunsafe).
````html
The <ins>hot, new</ins> stuff
````
{{% notice style="code" icon="eye" title="Result" %}}
The ++hot, new++ stuff
{{% /notice %}}
### Deleted Text
{{% badge color="darkgray" icon="fa-fw fab fa-github" %}}GFM{{% /badge %}} You can do strikethroughs by enclosing text with two tildes `~~`. See [Hugo's documentation remarks](https://gohugo.io/getting-started/configuration-markup/#extras) if you want to use this together with the subscript syntax.
````md
~~Strike through~~ this text
````
{{% notice style="code" icon="eye" title="Result" %}}
~~Strike through~~ this text
{{% /notice %}}
## Special Typesetting
### Text Substitution
{{% badge color="darkorange" icon="lightbulb" %}}Pants{{% /badge %}} You can combine multiple punctuation characters to single typographic entities. This will only be applied to text outside of code blocks or inline code.
````md
Double quotes `"` and single quotes `'` of enclosed text are replaced by **"double curly quotes"** and **'single curly quotes'**.
Double dashes `--` and triple dashes `---` are replaced by en-dash **--** and em-dash **---** entities.
Double arrows pointing left `<<` or right `>>` are replaced by arrow **<<** and **>>** entities.
Three consecutive dots `...` are replaced by an ellipsis **...** entity.
````
{{% notice style="code" icon="eye" title="Result" %}}
Double quotes `"` and single quotes `'` of enclosed text are replaced by **"double curly quotes"** and **'single curly quotes'**.
Double dashes `--` and triple dashes `---` are replaced by en-dash **--** and em-dash **---** entities.
Double arrows pointing left `<<` or right `>>` are replaced by arrow **<<** and **>>** entities.
Three consecutive dots `...` are replaced by an ellipsis **...** entity.
{{% /notice %}}
### Subscript and Superscript
You can also use subscript and superscript text. For more complex stuff, you can use the [`math` shortcode](shortcodes/math).
{{% badge color="fuchsia" icon="fa-fw fab fa-hackerrank" %}}Hugo{{% /badge %}} Since Hugo 0.126.0, you can [activate this through the _Hugo Extra Extension_](https://github.com/gohugoio/hugo-goldmark-extensions?tab=readme-ov-file#extras-extension) in your `hugo.toml`
````md
How many liters H~2~O fit into 1dm^3^?
````
{{% badge color="orangered" icon="fa-fw fas fa-code" %}}HTML{{% /badge %}} You can also use it by configuring Hugo for [usage of HTML](https://gohugo.io/getting-started/configuration-markup/#rendererunsafe).
````html
How many liters H<sub>2</sub>O fit into 1dm<sup>3</sup>?
````
{{% notice style="code" icon="eye" title="Result" %}}
How many liters H~2~O fit into 1dm^3^?
{{% /notice %}}
### Keyboard Shortcuts
{{% badge color="orangered" icon="fa-fw fas fa-code" %}}HTML{{% /badge %}} You can use the `<kbd>` element to style keyboard shortcuts.
````html
Press <kbd>STRG</kbd> <kbd>ALT</kbd> <kbd>DEL</kbd> to end your shift early.
````
{{% notice style="code" icon="eye" title="Result" %}}
Press <kbd>STRG</kbd> <kbd>ALT</kbd> <kbd>DEL</kbd> to end your shift early.
{{% /notice %}}
## Lists
### Unordered
You can write a list of items in which the order of the items does not explicitly matter.
It is possible to nest lists by indenting an item for the next sublevel.
You may use any of `-`, `*` or `+` to denote bullets for each list item but should not switch between those symbols inside one whole list.
````md
- Lorem ipsum dolor sit amet
- Consectetur adipiscing elit
- Vestibulum laoreet porttitor sem
- Ac tristique libero volutpat at
- Nulla volutpat aliquam velit
- Phasellus iaculis neque
- Purus sodales ultricies
- Faucibus porta lacus fringilla vel
````
{{% notice style="code" icon="eye" title="Result" %}}
- Lorem ipsum dolor sit amet
- Consectetur adipiscing elit
- Vestibulum laoreet porttitor sem
- Ac tristique libero volutpat at
- Nulla volutpat aliquam velit
- Phasellus iaculis neque
- Purus sodales ultricies
- Faucibus porta lacus fringilla vel
{{% /notice %}}
### Ordered
You can create a list of items in which the order of items does explicitly matter.
It is possible to nest lists by indenting an item for the next sublevel.
Markdown will automatically number each of your items consecutively. This means, the order number you are providing is irrelevant.
````md
1. Lorem ipsum dolor sit amet
3. Consectetur adipiscing elit
1. Integer molestie lorem at massa
7. Facilisis in pretium nisl aliquet
99. Nulla volutpat aliquam velit
1. Faucibus porta lacus fringilla vel
1. Aenean sit amet erat nunc
17. Eget porttitor lorem
````
{{% notice style="code" icon="eye" title="Result" %}}
1. Lorem ipsum dolor sit amet
1. Consectetur adipiscing elit
1. Integer molestie lorem at massa
7. Facilisis in pretium nisl aliquet
99. Nulla volutpat aliquam velit
1. Faucibus porta lacus fringilla vel
1. Aenean sit amet erat nunc
17. Eget porttitor lorem
{{% /notice %}}
### Tasks
{{% badge color="darkgray" icon="fa-fw fab fa-github" %}}GFM{{% /badge %}} You can add task lists resulting in checked or unchecked non-clickable items
````md
- [x] Basic Test
- [ ] More Tests
- [x] View
- [x] Hear
- [ ] Smell
````
{{% notice style="code" icon="eye" title="Result" %}}
- [x] Basic Test
- [ ] More Tests
- [x] View
- [x] Hear
- [ ] Smell
{{% /notice %}}
### Definitions
{{% badge color="#888cc4" icon="fa-fw fab fa-php" %}}PHP{{% /badge %}} Definition lists are made of terms and definitions of these terms, much like in a dictionary.
A definition list in Markdown Extra is made of a single-line term followed by a colon and the definition for that term. You can also associate more than one term to a definition.
If you add empty lines around the definition terms, additional vertical space will be generated. Also multiple paragraphs are possible
````md
Apple
: Pomaceous fruit of plants of the genus Malus in the family Rosaceae.
: An American computer company.
Orange
: The fruit of an evergreen tree of the genus Citrus.
You can make juice out of it.
: A telecommunication company.
You can't make juice out of it.
````
{{% notice style="code" icon="eye" title="Result" %}}
Apple
: Pomaceous fruit of plants of the genus Malus in the family Rosaceae.
: An American computer company.
Orange
: The fruit of an evergreen tree of the genus Citrus.
You can make juice out of it.
: A telecommunication company.
You can't make juice out of it.
{{% /notice %}}
## Code
### Inline Code
Inline snippets of code can be wrapped with backticks `` ` ``.
````md
In this example, `<div></div>` is marked as code.
````
{{% notice style="code" icon="eye" title="Result" %}}
In this example, `<div></div>` is marked as code.
{{% /notice %}}
### Indented Code Block
A simple code block can be generated by indenting several lines of code by at least two spaces.
````md
Be impressed by my advanced code:
// Some comments
line 1 of code
line 2 of code
line 3 of code
````
{{% notice style="code" icon="eye" title="Result" %}}
Be impressed by my advanced code:
// Some comments
line 1 of code
line 2 of code
line 3 of code
{{% /notice %}}
### Fenced Code Block
If you want to gain more control of your code block you can enclose your code by at least three backticks ```` ``` ```` a so called fence.
{{% badge color="darkgray" icon="fa-fw fab fa-github" %}}GFM{{% /badge %}} You can also add a language specifier directly after the opening fence, ` ```js `, and syntax highlighting will automatically be applied according to the selected language in the rendered HTML.
See [Code Highlighting](shortcodes/highlight) for additional documentation.
````plaintext
```js
{
name: "Claus",
surname: "Santa",
profession: "courier",
age: 666,
address: {
city: "North Pole",
postalCode: 1,
country: "Arctic"
},
friends: [ "Dasher", "Dancer", "Prancer", "Vixen", "Comet", "Cupid", "Donder", "Blitzen", "Rudolph" ]
};
```
````
{{% notice style="code" icon="eye" title="Result" %}}
```js
{
name: "Claus",
surname: "Santa",
profession: "courier",
age: 666,
address: {
city: "North Pole",
postalCode: 1,
country: "Arctic"
},
friends: [ "Dasher", "Dancer", "Prancer", "Vixen", "Comet", "Cupid", "Donder", "Blitzen", "Rudolph" ]
};
```
{{% /notice %}}
## Tables
{{% badge color="darkgray" icon="fa-fw fab fa-github" %}}GFM{{% /badge %}} You can create tables by adding pipes as dividers between each cell, and by adding a line of dashes (also separated by bars) beneath the header. Note that the pipes do not need to be vertically aligned.
````md
| Option | Description |
|--------|-------------|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |
````
{{% notice style="code" icon="eye" title="Result" %}}
| Option | Description |
|--------|-------------|
| data | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext | extension to be used for dest files. |
{{% /notice %}}
### Aligned Columns
Adding a colon on the left and/or right side of the dashes below any heading will align the text for that column accordingly.
````md
| Option | Number | Description |
|-------:|:------:|:------------|
| data | 1 | path to data files to supply the data that will be passed into templates. |
| engine | 2 | engine to be used for processing templates. Handlebars is the default. |
| ext | 3 | extension to be used for dest files. |
````
{{% notice style="code" icon="eye" title="Result" %}}
| Option | Number | Description |
|-------:|:------:|:------------|
| data | 1 | path to data files to supply the data that will be passed into templates. |
| engine | 2 | engine to be used for processing templates. Handlebars is the default. |
| ext | 3 | extension to be used for dest files. |
{{% /notice %}}
## Links
### Autolink
{{% badge color="darkgray" icon="fa-fw fab fa-github" %}}GFM{{% /badge %}} Absolute URLs will automatically be converted into a link.
````md
This is a link to https://example.com.
````
{{% notice style="code" icon="eye" title="Result" %}}
This is a link to https://example.com.
{{% /notice %}}
### Basic Link
You can explicitly define links in case you want to use non-absolute URLs or want to give different text.
````md
[Assemble](http://assemble.io)
````
{{% notice style="code" icon="eye" title="Result" %}}
[Assemble](http://assemble.io)
{{% /notice %}}
### Link with Tooltip
For even further information, you can add an additional text, displayed in a tooltip on hovering over the link.
````md
[Upstage](https://github.com/upstage/ "Visit Upstage!")
````
{{% notice style="code" icon="eye" title="Result" %}}
[Upstage](https://github.com/upstage/ "Visit Upstage!")
{{% /notice %}}
### Link References
Links can be simplyfied for recurring reuse by using a reference ID to later define the URL location. This simplyfies writing if you want to use a link more than once in a document.
````md
[Example][somelinkID]
[somelinkID]: https://example.com "Go to example domain"
````
{{% notice style="code" icon="eye" title="Result" %}}
[Example][somelinkID]
[somelinkID]: https://example.com "Go to example domain"
{{% /notice %}}
### Footnotes
{{% badge color="#888cc4" icon="fa-fw fab fa-php" %}}PHP{{% /badge %}} Footnotes work mostly like reference-style links. A footnote is made of two things, a marker in the text that will become a superscript number and a footnote definition that will be placed in a list of footnotes.
Usually the list of footnotes will be shown at the end of your document. If we use a footnote in a notice box it will instead be listed at the end of its box.
Footnotes can contain block elements, which means that you can put multiple paragraphs, lists, blockquotes and so on in a footnote. It works the same as for list items, just indent the following paragraphs by four spaces in the footnote definition.
````md
That's some text with a footnote[^1]
[^1]: And that's the footnote.
That's some more text with a footnote.[^someid]
[^someid]:
Anything of interest goes here.
Blue light glows blue.
````
{{% notice style="code" icon="eye" title="Result" %}}
That's some text with a footnote[^1]
[^1]: And that's the footnote.
That's some more text with a footnote.[^someid]
[^someid]:
Anything of interest goes here.
Blue light glows blue.
{{% /notice %}}
## Images
### Basic Images
Images have a similar syntax to links but include a preceding exclamation mark.
````md
![Spock](https://octodex.github.com/images/spocktocat.png)
````
{{% notice style="code" icon="eye" title="Result" %}}
![Spock](https://octodex.github.com/images/spocktocat.png?width=20vw)
{{% /notice %}}
### Image with Tooltip
Like links, images can also be given a tooltip.
````md
![Picard](https://octodex.github.com/images/jean-luc-picat.jpg "Jean Luc Picard")
````
{{% notice style="code" icon="eye" title="Result" %}}
![Picard](https://octodex.github.com/images/jean-luc-picat.jpg?width=20vw "Jean Luc Picard")
{{% /notice %}}
### Image References
Images can also be linked by reference ID to later define the URL location. This simplyfies writing if you want to use an image more than once in a document.
````md
![La Forge][laforge]
[laforge]: https://octodex.github.com/images/trekkie.jpg "Geordi La Forge"
````
{{% notice style="code" icon="eye" title="Result" %}}
![La Forge][laforge]
[laforge]: https://octodex.github.com/images/trekkie.jpg?width=20vw "Geordi La Forge"
{{% /notice %}}
### Image Effects
{{% badge color="#7dc903" icon="fa-fw fas fa-puzzle-piece" %}}Relearn{{% /badge %}} This theme allows additional non-standard formatting by setting query parameter at the end of the image URL. See the [image effects docs](authoring/imageeffects) for a detailed example and how to configure it.
#### Resizing
Add query parameter `width` and/or `height` to the link image to resize the image. Values are CSS values (default is `auto`).
````md
![Minion](https://octodex.github.com/images/minion.png?width=20vw)
````
{{% notice style="code" icon="eye" title="Result" %}}
![Minion](https://octodex.github.com/images/minion.png?width=20vw)
{{% /notice %}}
````md
![Minion](https://octodex.github.com/images/minion.png?height=50px)
````
{{% notice style="code" icon="eye" title="Result" %}}
![Minion](https://octodex.github.com/images/minion.png?height=50px)
{{% /notice %}}
````md
![Minion](https://octodex.github.com/images/minion.png?height=50px&width=40vw)
````
{{% notice style="code" icon="eye" title="Result" %}}
![Minion](https://octodex.github.com/images/minion.png?height=50px&width=40vw)
{{% /notice %}}
#### CSS Classes
Add a query parameter `classes` to the link image to add CSS classes. Add some of the predefined values or even define your own in your CSS.
##### Shadow
````md
![Spidertocat](https://octodex.github.com/images/spidertocat.png?classes=shadow)
````
{{% notice style="code" icon="eye" title="Result" %}}
![Spidertocat](https://octodex.github.com/images/spidertocat.png?width=20vw&classes=shadow,noborder)
{{% /notice %}}
##### Border
````md
![DrOctocat](https://octodex.github.com/images/droctocat.png?classes=border)
````
{{% notice style="code" icon="eye" title="Result" %}}
![DrOctocat](https://octodex.github.com/images/droctocat.png?width=20vw&classes=border,noshadow)
{{% /notice %}}
##### Left
````md
![Supertocat](https://octodex.github.com/images/okal-eltocat.jpg?classes=left)
````
{{% notice style="code" icon="eye" title="Result" %}}
![Supertocat](https://octodex.github.com/images/okal-eltocat.jpg?width=20vw&classes=left)
{{% /notice %}}
##### Right
````md
![Riddlocat](https://octodex.github.com/images/riddlocat.jpg?classes=right)
````
{{% notice style="code" icon="eye" title="Result" %}}
![Riddlocat](https://octodex.github.com/images/riddlocat.jpg?width=20vw&classes=right)
{{% /notice %}}
##### Inline
````md
![Spidertocat](https://octodex.github.com/images/spidertocat.png?classes=inline)
![DrOctocat](https://octodex.github.com/images/droctocat.png?classes=inline)
![Supertocat](https://octodex.github.com/images/okal-eltocat.jpg?classes=inline)
![Riddlocat](https://octodex.github.com/images/riddlocat.jpg?classes=inline)
````
{{% notice style="code" icon="eye" title="Result" %}}
![Spidertocat](https://octodex.github.com/images/spidertocat.png?width=10vw&classes=inline)
![DrOctocat](https://octodex.github.com/images/droctocat.png?width=10vw&classes=inline)
![Supertocat](https://octodex.github.com/images/okal-eltocat.jpg?width=10vw&classes=inline)
![Riddlocat](https://octodex.github.com/images/riddlocat.jpg?width=10vw&classes=inline)
{{% /notice %}}
##### Combination
````md
![X-tocat](https://octodex.github.com/images/xtocat.jpg?classes=shadow,border,left)
````
{{% notice style="code" icon="eye" title="Result" %}}
![X-tocat](https://octodex.github.com/images/xtocat.jpg?width=20vw&classes=shadow,border,left)
{{% /notice %}}
#### Lightbox
Add the query parameter `lightbox=false` to the image link to disable the lightbox.
````md
![Homercat](https://octodex.github.com/images/homercat.png?lightbox=false)
````
{{% notice style="code" icon="eye" title="Result" %}}
![Homercat](https://octodex.github.com/images/homercat.png?width=20vw&lightbox=false)
{{% /notice %}}
{{% notice note %}}
If you want to wrap an image in a link and `lightbox=true` is your default setting, you have to explicitly disable the lightbox to avoid it to hijacking your link like:
````md
[![Homercat](https://octodex.github.com/images/homercat.png?lightbox=false)](https://octodex.github.com/#homercat)
````
[![Homercat](https://octodex.github.com/images/homercat.png?width=20vw&lightbox=false)](https://octodex.github.com/#homercat)
{{% /notice %}}

View file

@ -0,0 +1,7 @@
+++
description = "Reference of CommonMark and Markdown extensions"
categories = ["howto", "reference"]
title = "Marrrkdown Rules"
weight = 4
+++
{{< piratify >}}

View file

@ -0,0 +1,71 @@
+++
categories = ["howto"]
description = "What page meta information are available"
frontmatter = ["headingPost", "headingPre", "hidden", "LastModifierDisplayName", "LastModifierEmail"]
title = "Meta Information"
weight = 3
+++
## Page Title
The `title` will be used in the heading and meta information of your HTML.
A page without a title is [treated as if `hidden=true`](#hidden) has been set.
{{< multiconfig fm=true >}}
title = 'Example Title'
{{< /multiconfig >}}
## Page Description
The `description` is used for generating HTML meta information, in the [children](shortcodes/children) shortcode and in social media meta information.
If not set, the set value of your site's hugo.toml is used for the HTML meta information and social media meta information. It appears empty for the [children](shortcodes/children) shortcode.
{{< multiconfig fm=true >}}
description = 'Some lenghty example description'
{{< /multiconfig >}}
## Social Media Images
The theme adds social media meta tags including feature images for the [Open Graph](https://gohugo.io/templates/internal/#open-graph) protocol and [Twitter Cards](https://gohugo.io/templates/internal/#twitter-cards) to your site. These are configured as mentioned in the linked Hugo docs.
{{< multiconfig fm=true >}}
images = [ 'images/hero.png' ]
{{< /multiconfig >}}
## Hidden
{{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} You can hide your pages from the menu by setting `hidden=true`.
{{% badge color="blueviolet" icon="bars" title=" " %}}Menu{{% /badge %}} For [Hugo menus](https://gohugo.io/content-management/menus/), you have to set `params.hidden=true` instead.
[See how you can further configure visibility](configuration/content/hidden) throughout your site.
{{< multiconfig fm=true >}}
hidden = true
{{< /multiconfig >}}
## Add Icon to the Title Heading
{{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} In the page front matter, add a `headingPre` to insert any HTML code before the title heading. You can also set `headingPost` to insert HTML code after the title heading.
You also may want to [apply further CSS](configuration/customization/extending#adding-javascript-or-stylesheets-to-all-pages) in this case.
{{< multiconfig fm=true >}}
headingPre = '<i class="fab fa-github"></i> '
{{< /multiconfig >}}
## Footer Information
{{% badge style="green" icon="fa-fw fab fa-markdown" title=" " %}}Front Matter{{% /badge %}} If you use the default `layouts/partials/content-footer.html` is not overridden by you, it will display authoring information, namely
- `AuthorName` if [GitInfo](https://gohugo.io/methods/page/gitinfo/) is active, otherwise `LastModifierDisplayName` front matter
- `AuthorEmail` if [GitInfo](https://gohugo.io/methods/page/gitinfo/) is active, otherwise `LastModifierEmail` front matter
- `AuthorDate` if [GitInfo](https://gohugo.io/methods/page/gitinfo/) is active, otherwise [Hugo's `date` front matter](https://gohugo.io/methods/page/date/)
{{< multiconfig fm=true >}}
LastModifierDisplayName = 'Santa Claus'
LastModifierEmail = 'santa@example.com'
date = 2000-12-24T00:00:00-12:00
{{< /multiconfig >}}

View file

@ -0,0 +1,8 @@
+++
categories = ["howto"]
description = "What page meta information are available"
frontmatter = ["headingPost", "headingPre", "hidden", "LastModifierDisplayName", "LastModifierEmail"]
title = "Meta Information"
weight = 3
+++
{{< piratify >}}

View file

@ -0,0 +1,34 @@
+++
categories = ["explanation"]
description = "Your content's directory structure"
title = "Directory Structure"
weight = 1
+++
In **Hugo**, pages are the core of your site.
The theme generates the navigation menu out of the given directory structure.
Organize your site like [any other Hugo project](https://gohugo.io/content/structure/). Typically, you will have a _content_ directory with all your pages.
````plaintext
content
├── first-chapter
│ ├── first-page
| | |── _index.md
| │ ├── first-sub-page
| | | |── _index.md
| | | |── picture1.png
| | | └── plain.txt
│ ├── second-page
| | |── index.md
| | |── picture1.png
| | └── picture2.png
│ └── third-page.md
└── _index.md
````
> [!note]
> While you can also go different, `_index.md` (with an underscore) is recommended for each directory, it's your _directory's home page_.
>
> See [Hugo's guide for content ](https://gohugo.io/content-management/) to learn more.

View file

@ -0,0 +1,7 @@
+++
categories = ["explanation"]
description = "Your content's directory structure"
title = "Directory Structure"
weight = 1
+++
{{< piratify >}}