2022-04-02 13:30:16 +00:00
<!DOCTYPE html>
2022-11-01 01:10:49 +00:00
< html lang = "en" dir = "ltr" >
2022-04-02 13:30:16 +00:00
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "height=device-height, width=device-width, initial-scale=1.0, minimum-scale=1.0" >
2023-01-22 21:19:30 +00:00
< meta name = "generator" content = "Hugo 0.110.0" >
2023-01-25 23:10:57 +00:00
< meta name = "generator" content = "Relearn 5.10.2+tip" >
2022-04-02 13:30:16 +00:00
< meta name = "description" content = "Documentation for Hugo Relearn Theme" >
< meta name = "author" content = "Sören Weber" >
< title > Pages organization :: Hugo Relearn Theme< / title >
2023-01-25 11:42:06 +00:00
< link href = "https://McShelby.github.io/hugo-theme-relearn/cont/pages/index.html" rel = "alternate" hreflang = "x-default" >
< link href = "https://McShelby.github.io/hugo-theme-relearn/cont/pages/index.html" rel = "alternate" hreflang = "en" >
< link href = "https://McShelby.github.io/hugo-theme-relearn/pir/cont/pages/index.html" rel = "alternate" hreflang = "pir" >
2022-11-15 06:35:08 +00:00
< link href = "https://McShelby.github.io/hugo-theme-relearn/cont/pages/index.html" rel = "canonical" type = "text/html" title = "Pages organization :: Hugo Relearn Theme" >
2022-11-06 00:38:34 +00:00
< link href = "../../cont/pages/index.xml" rel = "alternate" type = "application/rss+xml" title = "Pages organization :: Hugo Relearn Theme" >
2023-02-03 21:08:57 +00:00
< link href = "../../images/logo.svg?1675458531" rel = "icon" type = "image/svg+xml" >
2022-07-15 13:20:02 +00:00
<!-- https://github.com/filamentgroup/loadCSS/blob/master/README.md#how - to - use -->
2023-02-03 21:08:57 +00:00
< link href = "../../css/fontawesome-all.min.css?1675458532" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../../css/fontawesome-all.min.css?1675458532" rel = "stylesheet" > < / noscript >
< link href = "../../css/auto-complete.css?1675458532" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../../css/auto-complete.css?1675458532" rel = "stylesheet" > < / noscript >
< link href = "../../css/perfect-scrollbar.min.css?1675458532" rel = "stylesheet" >
< link href = "../../css/nucleus.css?1675458532" rel = "stylesheet" >
< link href = "../../css/fonts.css?1675458532" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../../css/fonts.css?1675458532" rel = "stylesheet" > < / noscript >
< link href = "../../css/theme.css?1675458532" rel = "stylesheet" >
< link href = "../../css/theme-relearn-light.css?1675458532" rel = "stylesheet" id = "variant-style" >
< link href = "../../css/ie.css?1675458532" rel = "stylesheet" >
< link href = "../../css/variant.css?1675458532" rel = "stylesheet" >
< link href = "../../css/print.css?1675458532" rel = "stylesheet" media = "print" >
< link href = "../../css/format-print.css?1675458532" rel = "stylesheet" >
< script src = "../../js/url.js?1675458532" > < / script >
< script src = "../../js/variant.js?1675458532" > < / script >
2022-04-02 13:30:16 +00:00
< script >
// hack to let hugo tell us how to get to the root when using relativeURLs, it needs to be called *url= for it to do its magic:
// https://github.com/gohugoio/hugo/blob/145b3fcce35fbac25c7033c91c1b7ae6d1179da8/transform/urlreplacers/absurlreplacer.go#L72
2022-11-05 23:35:48 +00:00
window.index_js_url="../../index.search.js";
var root_url="../../";
2022-04-02 13:30:16 +00:00
var baseUri=root_url.replace(/\/$/, '');
// translations
window.T_Copy_to_clipboard = 'Copy to clipboard';
window.T_Copied_to_clipboard = 'Copied to clipboard!';
window.T_Copy_link_to_clipboard = 'Copy link to clipboard';
window.T_Link_copied_to_clipboard = 'Copied link to clipboard!';
2022-11-17 21:13:11 +00:00
window.T_No_results_found = 'No results found for \u0022{0}\u0022';
window.T_N_results_found = '{1} results found for \u0022{0}\u0022';
2022-04-02 13:30:16 +00:00
// some further base stuff
var baseUriFull='https:\/\/McShelby.github.io\/hugo-theme-relearn/';
2022-07-14 20:20:11 +00:00
window.variants & & variants.init( [ 'relearn-light', 'relearn-dark', 'learn', 'neon', 'blue', 'green', 'red' ] );
2022-04-02 13:30:16 +00:00
< / script >
2023-02-03 21:08:57 +00:00
< script src = "../../js/jquery.min.js?1675458532" defer > < / script >
2022-12-02 15:05:54 +00:00
< style >
#body img.bg-white {
background-color: white;
}
< / style >
2022-04-02 13:30:16 +00:00
< / head >
2022-11-15 06:35:08 +00:00
< body class = "mobile-support print disableInlineCopyToClipboard" data-url = "../../cont/pages/index.html" >
2022-04-02 13:30:16 +00:00
< div id = "body" class = "default-animation" >
< div id = "sidebar-overlay" > < / div >
< div id = "toc-overlay" > < / div >
2022-11-07 19:58:08 +00:00
< nav id = "topbar" class = "highlightable" dir = "ltr" >
2022-04-02 13:30:16 +00:00
< div >
< div id = "breadcrumbs" >
< span id = "sidebar-toggle-span" >
2022-10-08 20:51:04 +00:00
< a href = "#" id = "sidebar-toggle" title = 'Menu (CTRL+ALT+n)' > < i class = "fas fa-bars fa-fw" > < / i > < / a >
2022-04-02 13:30:16 +00:00
< / span >
< ol class = "links" itemscope itemtype = "http://schema.org/BreadcrumbList" >
2022-11-05 23:35:48 +00:00
< li itemscope itemtype = "https://schema.org/ListItem" itemprop = "itemListElement" > < a itemprop = "item" href = "../../index.html" > < span itemprop = "name" > Hugo Relearn Theme< / span > < / a > < meta itemprop = "position" content = "1" > > < / li >
< li itemscope itemtype = "https://schema.org/ListItem" itemprop = "itemListElement" > < a itemprop = "item" href = "../../cont/index.html" > < span itemprop = "name" > Content< / span > < / a > < meta itemprop = "position" content = "2" > > < / li >
2022-10-02 22:25:49 +00:00
< li itemscope itemtype = "https://schema.org/ListItem" itemprop = "itemListElement" > < span itemprop = "name" > Pages organization< / span > < meta itemprop = "position" content = "3" > < / li >
2022-04-02 13:30:16 +00:00
< / ol >
< / div >
< / div >
< / nav >
2022-07-05 22:16:52 +00:00
< main id = "body-inner" class = "highlightable default" tabindex = "-1" >
2022-04-02 13:30:16 +00:00
< div class = "flex-block-wrapper" >
< div id = "head-tags" >
< / div >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "pages-organization" > Pages organization< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > In < strong > Hugo< / strong > , pages are the core of your site. Once it is configured, pages are definitely the added value to your documentation site.< / p >
< h2 id = "folders" > Folders< / h2 >
2022-12-23 11:24:54 +00:00
< p > Organize your site like < a href = "https://gohugo.io/content/organization/" target = "_blank" > any other Hugo project< / a > . Typically, you will have a < em > content< / em > folder with all your pages.< / p >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-plaintext" data-lang = "plaintext" > < span class = "line" > < span class = "cl" > content
< / span > < / span > < span class = "line" > < span class = "cl" > ├── level-one
< / span > < / span > < span class = "line" > < span class = "cl" > │ ├── level-two
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ ├── level-three
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ │ ├── level-four
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ │ │ ├── _index.md < -- /level-one/level-two/level-three/level-four
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ │ │ ├── page-4-a.md < -- /level-one/level-two/level-three/level-four/page-4-a
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ │ │ ├── page-4-b.md < -- /level-one/level-two/level-three/level-four/page-4-b
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ │ │ └── page-4-c.md < -- /level-one/level-two/level-three/level-four/page-4-c
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ │ ├── _index.md < -- /level-one/level-two/level-three
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ │ ├── page-3-a.md < -- /level-one/level-two/level-three/page-3-a
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ │ ├── page-3-b.md < -- /level-one/level-two/level-three/page-3-b
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ │ └── page-3-c.md < -- /level-one/level-two/level-three/page-3-c
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ ├── _index.md < -- /level-one/level-two
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ ├── page-2-a.md < -- /level-one/level-two/page-2-a
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ ├── page-2-b.md < -- /level-one/level-two/page-2-b
< / span > < / span > < span class = "line" > < span class = "cl" > │ │ └── page-2-c.md < -- /level-one/level-two/page-2-c
< / span > < / span > < span class = "line" > < span class = "cl" > │ ├── _index.md < -- /level-one
< / span > < / span > < span class = "line" > < span class = "cl" > │ ├── page-1-a.md < -- /level-one/page-1-a
< / span > < / span > < span class = "line" > < span class = "cl" > │ ├── page-1-b.md < -- /level-one/page-1-b
< / span > < / span > < span class = "line" > < span class = "cl" > │ └── page-1-c.md < -- /level-one/page-1-c
< / span > < / span > < span class = "line" > < span class = "cl" > ├── _index.md < -- /
< / span > < / span > < span class = "line" > < span class = "cl" > └── page-top.md < -- /page-top
< / span > < / span > < / code > < / pre > < / div >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle note" >
2022-12-01 00:38:08 +00:00
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-circle" > < / i > Note< / div >
< div class = "box-content" >
2022-04-02 13:30:16 +00:00
< p > < code > _index.md< / code > is required in each folder, it’ s your “folder home page”< / p >
2022-12-04 09:16:01 +00:00
< / div >
2022-04-02 13:30:16 +00:00
< / div >
< h2 id = "create-your-project" > Create your project< / h2 >
2022-12-23 11:24:54 +00:00
< p > The following steps are here to help you initialize your new website. If you don’ t know Hugo at all, we strongly suggest you to train by following < a href = "https://gohugo.io/overview/quickstart/" target = "_blank" > great documentation for beginners< / a > .< / p >
2022-04-02 13:30:16 +00:00
< p > Hugo provides a < code > new< / code > command to create a new website.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo new site < new_project>
2022-12-16 17:42:17 +00:00
< / span > < / span > < / code > < / pre > < / div > < p > The Relearn theme provides < a href = "../../cont/archetypes/" > archetypes< / a > to help you create this kind of pages.< / p >
2022-07-05 22:16:52 +00:00
< h2 id = "frontmatter-configuration" > Frontmatter Configuration< / h2 >
2022-12-23 11:24:54 +00:00
< p > Each Hugo page has to define a < a href = "https://gohugo.io/content/front-matter/" target = "_blank" > frontmatter< / a > in < em > toml< / em > , < em > yaml< / em > or < em > json< / em > . This site will use < em > toml< / em > in all cases.< / p >
2022-07-05 22:16:52 +00:00
< p > The Relearn theme uses the following parameters on top of Hugo ones:< / p >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # Table of contents (toc) is enabled by default. Set this parameter to true to disable it.< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # Note: Toc is always disabled for chapter pages< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > disableToc< / span > < span class = "p" > =< / span > < span class = "kc" > false< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # If set, this will be used for the page' s menu entry (instead of the `title` attribute)< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > menuTitle< / span > < span class = "p" > =< / span > < span class = "s2" > " " < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # If set, this will explicitly override common rules for the expand state of a page' s menu entry< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > alwaysopen< / span > < span class = "p" > =< / span > < span class = "kc" > true< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # If set, this will explicitly override common rules for the sorting order of a page' s submenu entries< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > ordersectionsby< / span > < span class = "p" > =< / span > < span class = "s2" > " title" < / span >
2022-07-03 15:22:50 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # The title of the page heading will be prefixed by this HTML content< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > headingPre< / span > < span class = "p" > =< / span > < span class = "s2" > " " < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # The title of the page heading will be postfixed by this HTML content< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > headingPost< / span > < span class = "p" > =< / span > < span class = "s2" > " " < / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # The title of the page in menu will be prefixed by this HTML content< / span >
2022-07-03 15:22:50 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > menuPre< / span > < span class = "p" > =< / span > < span class = "s2" > " " < / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # The title of the page in menu will be postfixed by this HTML content< / span >
2022-07-03 15:22:50 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > menuPost< / span > < span class = "p" > =< / span > < span class = "s2" > " " < / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # Hide a menu entry by setting this to true< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > hidden< / span > < span class = "p" > =< / span > < span class = "kc" > false< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # Display name of this page modifier. If set, it will be displayed in the footer.< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > LastModifierDisplayName< / span > < span class = "p" > =< / span > < span class = "s2" > " " < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # Email of this page modifier. If set with LastModifierDisplayName, it will be displayed in the footer< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > LastModifierEmail< / span > < span class = "p" > =< / span > < span class = "s2" > " " < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "add-icon-to-a-menu-entry" > Add icon to a menu entry< / h3 >
2022-07-03 15:22:50 +00:00
< p > In the page frontmatter, add a < code > menuPre< / code > param to insert any HTML code before the menu label. The example below uses the GitHub icon.< / p >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s2" > " GitHub repo" < / span >
2022-07-03 15:22:50 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > menuPre< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fab fa-github' > < /i> " < / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2023-02-03 21:08:57 +00:00
< a href = "#image-6ace2edbd78fdaf450da8c44a506fdec" >
2022-11-06 15:27:13 +00:00
< img src = "../../cont/pages/frontmatter-icon.png?classes=shadow&width=300px" alt = "Title with icon" class = "shadow" style = "height: auto; width: 300px;" loading = "lazy" >
2023-01-29 10:28:20 +00:00
< / a >
2023-02-03 21:08:57 +00:00
< a href = "javascript:history.back();" class = "lightbox" id = "image-6ace2edbd78fdaf450da8c44a506fdec" >
2023-01-29 10:28:20 +00:00
< img src = "../../cont/pages/frontmatter-icon.png?classes=shadow&width=300px" alt = "Title with icon" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-04-02 13:30:16 +00:00
< h3 id = "ordering-sibling-menupage-entries" > Ordering sibling menu/page entries< / h3 >
2022-12-23 11:24:54 +00:00
< p > Hugo provides a < a href = "https://gohugo.io/content/ordering/" target = "_blank" > flexible way< / a > to handle order for your pages.< / p >
2022-04-02 13:30:16 +00:00
< p > The simplest way is to set < code > weight< / code > parameter to a number.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s2" > " My page" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 5< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "using-a-custom-title-for-menu-entries" > Using a custom title for menu entries< / h3 >
< p > By default, the Relearn theme will use a page’ s < code > title< / code > attribute for the menu item (or < code > linkTitle< / code > if defined).< / p >
< p > But a page’ s title has to be descriptive on its own while the menu is a hierarchy.
We’ ve added the < code > menuTitle< / code > parameter for that purpose:< / p >
< p > For example (for a page named < code > content/install/linux.md< / code > ):< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s2" > " Install on Linux" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > menuTitle< / span > < span class = "p" > =< / span > < span class = "s2" > " Linux" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "override-expand-state-rules-for-menu-entries" > Override expand state rules for menu entries< / h3 >
< p > You can change how the theme expands menu entries on the side of the content with the < code > alwaysopen< / code > setting on a per page basis. If < code > alwaysopen=false< / code > for any given entry, its children will not be shown in the menu as long as it is not necessary for the sake of navigation.< / p >
< p > The theme generates the menu based on the following rules:< / p >
< ul >
< li > all parent entries of the active page including their siblings are shown regardless of any settings< / li >
< li > immediate children entries of the active page are shown regardless of any settings< / li >
< li > if not overridden, all other first level entries behave like they would have been given < code > alwaysopen=false< / code > < / li >
< li > if not overridden, all other entries of levels besides the first behave like they would have been given < code > alwaysopen=true< / code > < / li >
2022-10-31 14:06:51 +00:00
< li > all visible entries show their immediate children entries if < code > alwaysopen=true< / code > ; this proceeds recursively< / li >
2022-04-02 13:30:16 +00:00
< li > all remaining entries are not shown< / li >
< / ul >
2022-12-16 17:42:17 +00:00
< p > You can see this feature in action on the example page for < a href = "../../shortcodes/children/" > children shortcode< / a > and its children pages.< / p >
2022-04-02 13:30:16 +00:00
< footer class = "footline" >
< / footer >
< / article >
< / div >
< / main >
< / div >
2023-02-03 21:08:57 +00:00
< script src = "../../js/clipboard.min.js?1675458532" defer > < / script >
< script src = "../../js/perfect-scrollbar.min.js?1675458532" defer > < / script >
< script src = "../../js/theme.js?1675458532" defer > < / script >
2022-04-02 13:30:16 +00:00
< / body >
< / html >