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" >
2022-11-17 21:58:05 +00:00
< meta name = "generator" content = "Hugo 0.106.0" >
2022-11-19 19:31:17 +00:00
< meta name = "generator" content = "Relearn 5.6.5+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 > Content :: Hugo Relearn Theme< / title >
2022-11-15 06:35:08 +00:00
< link href = "https://McShelby.github.io/hugo-theme-relearn/cont/index.html" rel = "canonical" type = "text/html" title = "Content :: Hugo Relearn Theme" >
2022-11-06 00:38:34 +00:00
< link href = "../cont/index.xml" rel = "alternate" type = "application/rss+xml" title = "Content :: Hugo Relearn Theme" >
2022-11-22 23:29:08 +00:00
< link href = "../images/logo.svg?1669159742" 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 -->
2022-11-22 23:29:08 +00:00
< link href = "../css/fontawesome-all.min.css?1669159744" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../css/fontawesome-all.min.css?1669159744" rel = "stylesheet" > < / noscript >
< link href = "../css/featherlight.min.css?1669159744" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../css/featherlight.min.css?1669159744" rel = "stylesheet" > < / noscript >
< link href = "../css/auto-complete.css?1669159744" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../css/auto-complete.css?1669159744" rel = "stylesheet" > < / noscript >
< link href = "../css/perfect-scrollbar.min.css?1669159744" rel = "stylesheet" >
< link href = "../css/nucleus.css?1669159744" rel = "stylesheet" >
< link href = "../css/fonts.css?1669159744" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "../css/fonts.css?1669159744" rel = "stylesheet" > < / noscript >
< link href = "../css/theme.css?1669159744" rel = "stylesheet" >
< link href = "../css/theme-relearn-light.css?1669159744" rel = "stylesheet" id = "variant-style" >
< link href = "../css/ie.css?1669159744" rel = "stylesheet" >
< link href = "../css/variant.css?1669159744" rel = "stylesheet" >
< link href = "../css/print.css?1669159744" rel = "stylesheet" media = "print" >
< link href = "../css/format-print.css?1669159744" rel = "stylesheet" >
< script src = "../js/url.js?1669159744" > < / script >
< script src = "../js/variant.js?1669159744" > < / 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 >
2022-11-22 23:29:08 +00:00
< script src = "../js/jquery.min.js?1669159744" defer > < / script >
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/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 >
2022-10-02 22:25:49 +00:00
< li itemscope itemtype = "https://schema.org/ListItem" itemprop = "itemListElement" > < span itemprop = "name" > Content< / span > < meta itemprop = "position" content = "2" > < / 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 chapter narrow" 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 = "chapter" >
2022-07-05 22:16:52 +00:00
< div class = "article-subheading" > Chapter 2< / div >
2022-11-13 21:34:47 +00:00
< h1 id = "content" > Content< / h1 >
2022-04-02 13:30:16 +00:00
< p > Find out how to create and organize your content quickly and intuitively.< / p >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< section >
2022-10-07 18:46:19 +00:00
< h1 class = "a11y-only" > Subsections of Content< / h1 >
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 >
< p > Organize your site like < a href = "https://gohugo.io/content/organization/" > any other Hugo project< / a > . Typically, you will have a < em > content< / em > folder with all your pages.< / p >
< 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" >
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-circle" > < / i > Note< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
< p > < code > _index.md< / code > is required in each folder, it’ s your “folder home page”< / p >
< / div >
< / div >
< h2 id = "create-your-project" > Create your project< / h2 >
2022-07-05 22:16:52 +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/" > 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-11-05 23:35:48 +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 >
< p > Each Hugo page has to define a < a href = "https://gohugo.io/content/front-matter/" > frontmatter< / a > in < em > toml< / em > , < em > yaml< / em > or < em > json< / em > . This site will use < em > toml< / em > in all cases.< / p >
< 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
< a href = "../cont/pages/frontmatter-icon.png?classes=shadow&width=300px" data-featherlight = "image" >
< img src = "../cont/pages/frontmatter-icon.png?classes=shadow&width=300px" alt = "Title with icon" class = "shadow" style = "height: auto; width: 300px;" loading = "lazy" >
< / a > < / p >
2022-04-02 13:30:16 +00:00
< h3 id = "ordering-sibling-menupage-entries" > Ordering sibling menu/page entries< / h3 >
< p > Hugo provides a < a href = "https://gohugo.io/content/ordering/" > flexible way< / a > to handle order for your pages.< / p >
< 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-11-05 23:35:48 +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 >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "archetypes" > Archetypes< / h1 >
2022-07-05 22:16:52 +00:00
< p > Using the command: < code > hugo new [relative new content path]< / code > , you can start a content file with the date and title automatically set. While this is a welcome feature, active writers need more: < a href = "https://gohugo.io/content/archetypes/" > archetypes< / a > . These are preconfigured skeleton pages with default frontmatter.< / p >
< p > The Relearn theme defines some few archetypes of pages but you are free to define new ones to your liking. All can be used at any level of the documentation, the only difference being the layout of the content.< / p >
< h2 id = "predefined-archetypes" > Predefined Archetypes< / h2 >
< h3 id = "archetypes-home" > Home< / h3 >
< p > A < strong > Home< / strong > page is the starting page of your project. It’ s best to have only one page of this kind in your project.< / p >
2022-11-05 23:35:48 +00:00
< p >
2022-11-06 15:27:13 +00:00
< a href = "../cont/archetypes/pages-home.png?classes=shadow&width=60pc" data-featherlight = "image" >
< img src = "../cont/archetypes/pages-home.png?classes=shadow&width=60pc" alt = "Home page" class = "shadow" style = "height: auto; width: 60pc;" loading = "lazy" >
< / a > < / p >
2022-07-05 22:16:52 +00:00
< p > To create a home page, run the following command< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo new --kind home _index.md
< / span > < / span > < / code > < / pre > < / div > < p > This leads to a file with the following content< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > +++
< / span > < / span > < span class = "line" > < span class = "cl" > archetype = " home"
< / span > < / span > < span class = "line" > < span class = "cl" > title = " {{ replace .Name " -" " " | title }}"
< / span > < / span > < span class = "line" > < span class = "cl" > +++
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" >
2022-07-05 22:16:52 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > Lorem Ipsum.
< / span > < / span > < / code > < / pre > < / div > < h3 id = "archetypes-chapter" > Chapter< / h3 >
< p > A < strong > Chapter< / strong > displays a page meant to be used as introduction for a set of child pages. Commonly, it contains a simple title and a catch line to define content that can be found below it.< / p >
2022-11-05 23:35:48 +00:00
< p >
2022-11-06 15:27:13 +00:00
< a href = "../cont/archetypes/pages-chapter.png?classes=shadow&width=60pc" data-featherlight = "image" >
< img src = "../cont/archetypes/pages-chapter.png?classes=shadow&width=60pc" alt = "Chapter page" class = "shadow" style = "height: auto; width: 60pc;" loading = "lazy" >
< / a > < / p >
2022-07-05 22:16:52 +00:00
< p > To create a chapter page, run the following command< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo new --kind chapter < name> /_index.md
< / span > < / span > < / code > < / pre > < / div > < p > This leads to a file with the following content< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > +++
< / span > < / span > < span class = "line" > < span class = "cl" > archetype = " chapter"
< / span > < / span > < span class = "line" > < span class = "cl" > title = " {{ replace .Name " -" " " | title }}"
< / span > < / span > < span class = "line" > < span class = "cl" > weight = X
< / span > < / span > < span class = "line" > < span class = "cl" > +++
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" >
2022-07-05 22:16:52 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > Lorem Ipsum.
< / span > < / span > < / code > < / pre > < / div > < p > Replace the < code > X< / code > with a number. Because this number 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 level.< / p >
< h3 id = "archetypes-default" > Default< / h3 >
< p > A < strong > Default< / strong > page is any other content page. If you set an unknown archetype in your frontmatter, this archetype will be used to generate the page.< / p >
2022-11-05 23:35:48 +00:00
< p >
2022-11-06 15:27:13 +00:00
< a href = "../cont/archetypes/pages-default.png?classes=shadow&width=60pc" data-featherlight = "image" >
< img src = "../cont/archetypes/pages-default.png?classes=shadow&width=60pc" alt = "Default page" class = "shadow" style = "height: auto; width: 60pc;" loading = "lazy" >
< / a > < / p >
2022-07-05 22:16:52 +00:00
< p > To create a default page, run either one of the following commands< / p >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo new < chapter> /< name> /_index.md
< / span > < / span > < / code > < / pre > < / div > < p > or< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo new < chapter> /< name> .md
2022-07-05 22:16:52 +00:00
< / span > < / span > < / code > < / pre > < / div > < p > This leads to a file with the following content< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > +++
< / span > < / span > < span class = "line" > < span class = "cl" > title = " {{ replace .Name " -" " " | title }}"
< / span > < / span > < span class = "line" > < span class = "cl" > weight = X
< / span > < / span > < span class = "line" > < span class = "cl" > +++
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" >
2022-07-05 22:16:52 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > Lorem Ipsum.
2022-10-31 14:06:51 +00:00
< / span > < / span > < / code > < / pre > < / div > < p > Replace the < code > X< / code > with a number or delete the whole < code > weight< / code > parameter entirely.< / p >
< h2 id = "self-defined-archetypes" > Self defined Archetypes< / h2 >
2022-07-05 22:16:52 +00:00
< p > If you are in need of further archetypes you can define your own or even redefine existing ones.< / p >
< h3 id = "template" > Template< / h3 >
< p > Define a template file in your project at < code > archetypes/< kind> .md< / code > and make sure it has at least the frontmatter parameter for that archetype like< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > +++
< / span > < / span > < span class = "line" > < span class = "cl" > archetype = " < span class = "p" > < < / span > < span class = "nt" > kind< / span > < span class = "p" > > < / span > "
< / span > < / span > < span class = "line" > < span class = "cl" > +++
2022-10-31 14:06:51 +00:00
< / span > < / span > < / code > < / pre > < / div > < p > Afterwards you can generate new content files of that kind with the following command< / p >
2022-07-05 22:16:52 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo new --kind < kind> < name> /_index.md
< / span > < / span > < / code > < / pre > < / div > < h3 id = "partials" > Partials< / h3 >
< p > To define how your archetypes are rendered, define corresponding partial files in your projects directory < code > layouts/partials/archetypes/< kind> < / code > .< / p >
< p > If you use an unknown archetype in your frontmatter, the < code > default< / code > archetype will be used to generate the page.< / p >
2022-07-14 20:20:11 +00:00
< p > Related to each archetype, several < em > hook< / em > partial files in the form of < code > < hook> .html< / code > can be given inside each archetype directory. If a partial for a specific hook is missing, no output is generated for this hook.< / p >
2022-07-05 22:16:52 +00:00
< p > The following hooks are used:< / p >
< table >
< thead >
< tr >
< th style = "text-align:left" > Name< / th >
< th style = "text-align:left" > Notes< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td style = "text-align:left" > styleclass< / td >
< td style = "text-align:left" > Defines a set of CSS classes to be added to the HTML’ s < code > < main> < / code > element. You can use these classes to define own CSS rules in your < code > custom-header.html< / code > < / td >
< / tr >
< tr >
< td style = "text-align:left" > article< / td >
< td style = "text-align:left" > Defines the HTML how to render your content< / td >
< / tr >
< / tbody >
< / table >
< p > Take a look at the existing archetypes of this theme to get an idea how to utilize it.< / p >
2022-07-14 20:20:11 +00:00
< h4 id = "output-formats" > Output formats< / h4 >
< p > Each hook file can be overridden of a specific < a href = "https://gohugo.io/templates/output-formats/" > output format< / a > . Eg. if you define a new output format < code > PLAINTEXT< / code > in your < code > config.toml< / code > , you can add a file < code > layouts/partials/archetypes/default.plaintext.html< / code > to change the way how normal content is written for that output format.< / p >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "markdown-syntax" > Markdown syntax< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > 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.< / p >
< p > < strong > Markdown< / strong > is a better way to write < strong > HTML< / strong > , without all the complexities and ugliness that usually accompanies it.< / p >
< p > Some of the key benefits are:< / p >
< ol >
< li > Markdown is simple to learn, with minimal extra characters so it’ s also quicker to write content.< / li >
< li > Less chance of errors when writing in Markdown.< / li >
< li > Produces valid XHTML output.< / li >
< li > Keeps the content and the visual display separate, so you cannot mess up the look of your site.< / li >
< li > Write in any text editor or Markdown application you like.< / li >
< li > Markdown is a joy to use!< / li >
< / ol >
< p > John Gruber, the author of Markdown, puts it like this:< / p >
< blockquote >
< p > 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 > < / p >
< / blockquote >
< p > Without further delay, let us go over the main elements of Markdown and what the resulting HTML looks like:< / p >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle info" >
< div class = "box-label" > < i class = "fa-fw fas fa-info-circle" > < / i > Info< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
< p > < i class = "fas fa-bookmark" > < / i > Bookmark this page and the < a href = "https://commonmark.org/help/" > official Commonmark reference< / a > for easy future reference!< / p >
< / div >
< / div >
< h2 id = "headings" > Headings< / h2 >
< p > Headings from < code > h1< / code > through < code > h6< / code > are constructed with a < code > #< / code > for each level:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > < span class = "gh" > # h1 Heading
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gh" > < / span > < span class = "gu" > ## h2 Heading
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gu" > ### h3 Heading
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gu" > #### h4 Heading
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gu" > ##### h5 Heading
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gu" > ###### h6 Heading
< / span > < / span > < / span > < / code > < / pre > < / div > < p > Renders to:< / p >
<!-- markdownlint - disable MD025 -->
< h1 id = "h1-heading" > h1 Heading< / h1 >
<!-- markdownlint - enable MD025 -->
< h2 id = "h2-heading" > h2 Heading< / h2 >
< h3 id = "h3-heading" > h3 Heading< / h3 >
< h4 id = "h4-heading" > h4 Heading< / h4 >
< h5 id = "h5-heading" > h5 Heading< / h5 >
< h6 id = "h6-heading" > h6 Heading< / h6 >
< p > HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > h1< / span > < span class = "p" > > < / span > h1 Heading< span class = "p" > < /< / span > < span class = "nt" > h1< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > h2< / span > < span class = "p" > > < / span > h2 Heading< span class = "p" > < /< / span > < span class = "nt" > h2< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > h3< / span > < span class = "p" > > < / span > h3 Heading< span class = "p" > < /< / span > < span class = "nt" > h3< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > h4< / span > < span class = "p" > > < / span > h4 Heading< span class = "p" > < /< / span > < span class = "nt" > h4< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > h5< / span > < span class = "p" > > < / span > h5 Heading< span class = "p" > < /< / span > < span class = "nt" > h5< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > h6< / span > < span class = "p" > > < / span > h6 Heading< span class = "p" > < /< / span > < span class = "nt" > h6< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h2 id = "comments" > Comments< / h2 >
< p > Comments should be HTML compatible< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "c" > < !--
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > This is a comment
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > --> < / span >
< / span > < / span > < / code > < / pre > < / div > < p > Comment below should < strong > NOT< / strong > be seen:< / p >
<!--
This is a comment
-->
< h2 id = "horizontal-rules" > Horizontal Rules< / h2 >
< p > The HTML < code > < hr> < / code > element is for creating a “ thematic break” between paragraph-level elements. In Markdown, you can create a < code > < hr> < / code > with < code > ---< / code > - three consecutive dashes< / p >
< p > renders to:< / p >
< hr >
< h2 id = "paragraphs" > Paragraphs< / h2 >
< p > Any text not starting with a special sign is written as normal, plain text and will be wrapped within < code > < p> < /p> < / code > tags in the rendered HTML.< / p >
< p > So this body copy:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > 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.
< / span > < / span > < / code > < / pre > < / div > < p > renders to this HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > p< / span > < span class = "p" > > < / span > 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.< span class = "p" > < /< / span > < span class = "nt" > p< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h2 id = "text-markers" > Text Markers< / h2 >
< h3 id = "bold" > Bold< / h3 >
< p > For emphasizing a snippet of text with a heavier font-weight.< / p >
< p > The following snippet of text is < strong > rendered as bold text< / strong > .< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > **rendered as bold text**
< / span > < / span > < / code > < / pre > < / div > < p > renders to:< / p >
<!-- markdownlint - disable MD036 -->
< p > < strong > rendered as bold text< / strong > < / p >
<!-- markdownlint - enable MD036 -->
< p > and this HTML< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > strong< / span > < span class = "p" > > < / span > rendered as bold text< span class = "p" > < /< / span > < span class = "nt" > strong< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "italics" > Italics< / h3 >
< p > For emphasizing a snippet of text with italics.< / p >
< p > The following snippet of text is < em > rendered as italicized text< / em > .< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > _rendered as italicized text_
< / span > < / span > < / code > < / pre > < / div > < p > renders to:< / p >
<!-- markdownlint - disable MD036 -->
< p > < em > rendered as italicized text< / em > < / p >
<!-- markdownlint - enable MD036 -->
< p > and this HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > em< / span > < span class = "p" > > < / span > rendered as italicized text< span class = "p" > < /< / span > < span class = "nt" > em< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "strikethrough" > Strikethrough< / h3 >
< p > In GFM (GitHub flavored Markdown) you can do strikethroughs.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ~~Strike through this text.~~
< / span > < / span > < / code > < / pre > < / div > < p > Which renders to:< / p >
< p > < del > Strike through this text.< / del > < / p >
< p > HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > del< / span > < span class = "p" > > < / span > Strike through this text.< span class = "p" > < /< / span > < span class = "nt" > del< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h2 id = "blockquotes" > Blockquotes< / h2 >
< p > For quoting blocks of content from another source within your document.< / p >
< p > Add < code > > < / code > before any text you want to quote.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > < span class = "k" > > < / span > < span class = "ge" > **Fusion Drive** combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.
< / span > < / span > < / span > < / code > < / pre > < / div > < p > Renders to:< / p >
< blockquote >
< p > < strong > Fusion Drive< / strong > combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.< / p >
< / blockquote >
< p > and this HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > blockquote< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > p< / span > < span class = "p" > > < < / span > < span class = "nt" > strong< / span > < span class = "p" > > < / span > Fusion Drive< span class = "p" > < /< / span > < span class = "nt" > strong< / span > < span class = "p" > > < / span > combines a hard drive with a flash storage (solid-state drive) and presents it as a single logical volume with the space of both drives combined.< span class = "p" > < /< / span > < span class = "nt" > p< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > blockquote< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < p > Blockquotes can also be nested:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > < span class = "k" > > < / span > < span class = "ge" > Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "ge" > < / span > < span class = "k" > >
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > < / span > < span class = "ge" > > > 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.
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "ge" > < / span > < span class = "k" > >
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > < / span > < span class = "ge" > > Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.
< / span > < / span > < / span > < / code > < / pre > < / div > < p > Renders to:< / p >
< blockquote >
< p > Donec massa lacus, ultricies a ullamcorper in, fermentum sed augue. Nunc augue augue, aliquam non hendrerit ac, commodo vel nisi.< / p >
< blockquote >
< p > 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.< / p >
< / blockquote >
< p > Mauris sit amet ligula egestas, feugiat metus tincidunt, luctus libero. Donec congue finibus tempor. Vestibulum aliquet sollicitudin erat, ut aliquet purus posuere luctus.< / p >
< / blockquote >
< h2 id = "lists" > Lists< / h2 >
< h3 id = "unordered" > Unordered< / h3 >
< p > A list of items in which the order of the items does not explicitly matter.< / p >
< p > You may use any of the following symbols to denote bullets for each list item:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > < span class = "k" > *< / span > valid bullet
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > -< / span > valid bullet
< / span > < / span > < span class = "line" > < span class = "cl" > + valid bullet
< / span > < / span > < / code > < / pre > < / div > < p > For example< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > + Lorem ipsum dolor sit amet
< / span > < / span > < span class = "line" > < span class = "cl" > + Consectetur adipiscing elit
< / span > < / span > < span class = "line" > < span class = "cl" > + Integer molestie lorem at massa
< / span > < / span > < span class = "line" > < span class = "cl" > + Facilisis in pretium nisl aliquet
< / span > < / span > < span class = "line" > < span class = "cl" > + Nulla volutpat aliquam velit
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > -< / span > Phasellus iaculis neque
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > -< / span > Purus sodales ultricies
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > -< / span > Vestibulum laoreet porttitor sem
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > -< / span > Ac tristique libero volutpat at
< / span > < / span > < span class = "line" > < span class = "cl" > + Faucibus porta lacus fringilla vel
< / span > < / span > < span class = "line" > < span class = "cl" > + Aenean sit amet erat nunc
< / span > < / span > < span class = "line" > < span class = "cl" > + Eget porttitor lorem
< / span > < / span > < / code > < / pre > < / div > < p > Renders to:< / p >
<!-- markdownlint - disable MD004 -->
< ul >
< li > Lorem ipsum dolor sit amet< / li >
< li > Consectetur adipiscing elit< / li >
< li > Integer molestie lorem at massa< / li >
< li > Facilisis in pretium nisl aliquet< / li >
< li > Nulla volutpat aliquam velit
< ul >
< li > Phasellus iaculis neque< / li >
< li > Purus sodales ultricies< / li >
< li > Vestibulum laoreet porttitor sem< / li >
< li > Ac tristique libero volutpat at< / li >
< / ul >
< / li >
< li > Faucibus porta lacus fringilla vel< / li >
< li > Aenean sit amet erat nunc< / li >
< li > Eget porttitor lorem< / li >
< / ul >
<!-- markdownlint - enable MD004 -->
< p > And this HTML< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > ul< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Lorem ipsum dolor sit amet< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Consectetur adipiscing elit< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Integer molestie lorem at massa< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Facilisis in pretium nisl aliquet< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Nulla volutpat aliquam velit
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > ul< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Phasellus iaculis neque< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Purus sodales ultricies< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Vestibulum laoreet porttitor sem< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Ac tristique libero volutpat at< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > ul< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Faucibus porta lacus fringilla vel< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Aenean sit amet erat nunc< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Eget porttitor lorem< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > ul< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "ordered" > Ordered< / h3 >
< p > A list of items in which the order of items does explicitly matter.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > < span class = "k" > 1.< / span > Lorem ipsum dolor sit amet
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 4.< / span > Consectetur adipiscing elit
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 2.< / span > Integer molestie lorem at massa
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 8.< / span > Facilisis in pretium nisl aliquet
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 4.< / span > Nulla volutpat aliquam velit
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 99.< / span > Faucibus porta lacus fringilla vel
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 21.< / span > Aenean sit amet erat nunc
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 6.< / span > Eget porttitor lorem
< / span > < / span > < / code > < / pre > < / div > < p > Renders to:< / p >
< ol >
< li > Lorem ipsum dolor sit amet< / li >
< li > Consectetur adipiscing elit< / li >
< li > Integer molestie lorem at massa< / li >
< li > Facilisis in pretium nisl aliquet< / li >
< li > Nulla volutpat aliquam velit< / li >
< li > Faucibus porta lacus fringilla vel< / li >
< li > Aenean sit amet erat nunc< / li >
< li > Eget porttitor lorem< / li >
< / ol >
< p > And this HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > ol< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Lorem ipsum dolor sit amet< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Consectetur adipiscing elit< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Integer molestie lorem at massa< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Facilisis in pretium nisl aliquet< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Nulla volutpat aliquam velit< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Faucibus porta lacus fringilla vel< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Aenean sit amet erat nunc< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > li< / span > < span class = "p" > > < / span > Eget porttitor lorem< span class = "p" > < /< / span > < span class = "nt" > li< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > ol< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle tip" >
< div class = "box-label" > < i class = "fa-fw fas fa-lightbulb" > < / i > Tip< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
< p > If you just use < code > 1.< / code > for each number, Markdown will automatically number each item. For example:< / p >
< / div >
< / div >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > < span class = "k" > 1.< / span > Lorem ipsum dolor sit amet
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 1.< / span > Consectetur adipiscing elit
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 1.< / span > Integer molestie lorem at massa
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 1.< / span > Facilisis in pretium nisl aliquet
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 1.< / span > Nulla volutpat aliquam velit
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 1.< / span > Faucibus porta lacus fringilla vel
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 1.< / span > Aenean sit amet erat nunc
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > 1.< / span > Eget porttitor lorem
< / span > < / span > < / code > < / pre > < / div > < p > Renders to:< / p >
< ol >
< li > Lorem ipsum dolor sit amet< / li >
< li > Consectetur adipiscing elit< / li >
< li > Integer molestie lorem at massa< / li >
< li > Facilisis in pretium nisl aliquet< / li >
< li > Nulla volutpat aliquam velit< / li >
< li > Faucibus porta lacus fringilla vel< / li >
< li > Aenean sit amet erat nunc< / li >
< li > Eget porttitor lorem< / li >
< / ol >
< h2 id = "code" > Code< / h2 >
< h3 id = "inline-code" > Inline code< / h3 >
< p > Wrap inline snippets of code with < code > `< / code > .< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > In this example, < span class = "sb" > `< div> < /div> `< / span > should be wrapped as < span class = "gs" > **code**< / span > .
< / span > < / span > < / code > < / pre > < / div > < p > Renders to:< / p >
< p > In this example, < code > < div> < /div> < / code > should be wrapped as < strong > code< / strong > .< / p >
< p > HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > p< / span > < span class = "p" > > < / span > In this example, < span class = "p" > < < / span > < span class = "nt" > code< / span > < span class = "p" > > < / span > < span class = "ni" > & lt;< / span > div< span class = "ni" > & gt;& lt;< / span > /div< span class = "ni" > & gt;< / span > < span class = "p" > < /< / span > < span class = "nt" > code< / span > < span class = "p" > > < / span > should be wrapped as < span class = "p" > < < / span > < span class = "nt" > strong< / span > < span class = "p" > > < / span > code< span class = "p" > < /< / span > < span class = "nt" > strong< / span > < span class = "p" > > < / span > .< span class = "p" > < /< / span > < span class = "nt" > p< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "indented-code" > Indented code< / h3 >
< p > Or indent several lines of code by at least two spaces, as in:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > // Some comments
< / span > < / span > < span class = "line" > < span class = "cl" > line 1 of code
< / span > < / span > < span class = "line" > < span class = "cl" > line 2 of code
< / span > < / span > < span class = "line" > < span class = "cl" > line 3 of code
< / span > < / span > < / code > < / pre > < / div > < p > Renders to:< / p >
<!-- markdownlint - disable MD046 -->
< pre > < code > // Some comments
line 1 of code
line 2 of code
line 3 of code
< / code > < / pre >
<!-- markdownlint - enable MD046 -->
< p > HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > pre< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > code< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > // Some comments
< / span > < / span > < span class = "line" > < span class = "cl" > line 1 of code
< / span > < / span > < span class = "line" > < span class = "cl" > line 2 of code
< / span > < / span > < span class = "line" > < span class = "cl" > line 3 of code
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > code< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > pre< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "block-code-fences" > Block code “ fences” < / h3 >
< p > Use “ fences” < code > ```< / code > to block in multiple lines of code.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-plaintext" data-lang = "plaintext" > < span class = "line" > < span class = "cl" > ```
< / span > < / span > < span class = "line" > < span class = "cl" > Sample text here...
< / span > < / span > < span class = "line" > < span class = "cl" > ```
< / span > < / span > < / code > < / pre > < / div > < p > HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > pre< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > code< / span > < span class = "p" > > < / span > Sample text here...< span class = "p" > < /< / span > < span class = "nt" > code< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > pre< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "syntax-highlighting" > Syntax highlighting< / h3 >
< p > GFM, or “ GitHub Flavored Markdown” also supports syntax highlighting. To activate it, usually you simply add the file extension of the language you want to use directly after the first code “ fence” , < code > ```js< / code > , and syntax highlighting will automatically be applied in the rendered HTML.< / p >
2022-11-05 23:35:48 +00:00
< p > See < a href = "../cont/syntaxhighlight/" > Code Highlighting< / a > for additional documentation.< / p >
2022-04-02 13:30:16 +00:00
< p > For example, to apply syntax highlighting to JavaScript code:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-plaintext" data-lang = "plaintext" > < span class = "line" > < span class = "cl" > ```js
< / span > < / span > < span class = "line" > < span class = "cl" > grunt.initConfig({
< / span > < / span > < span class = "line" > < span class = "cl" > assemble: {
< / span > < / span > < span class = "line" > < span class = "cl" > options: {
< / span > < / span > < span class = "line" > < span class = "cl" > assets: ' docs/assets' ,
< / span > < / span > < span class = "line" > < span class = "cl" > data: ' src/data/*.{json,yml}' ,
< / span > < / span > < span class = "line" > < span class = "cl" > helpers: ' src/custom-helpers.js' ,
< / span > < / span > < span class = "line" > < span class = "cl" > partials: [' src/partials/**/*.{hbs,md}' ]
< / span > < / span > < span class = "line" > < span class = "cl" > },
< / span > < / span > < span class = "line" > < span class = "cl" > pages: {
< / span > < / span > < span class = "line" > < span class = "cl" > options: {
< / span > < / span > < span class = "line" > < span class = "cl" > layout: ' default.hbs'
< / span > < / span > < span class = "line" > < span class = "cl" > },
< / span > < / span > < span class = "line" > < span class = "cl" > files: {
< / span > < / span > < span class = "line" > < span class = "cl" > ' ./' : [' src/templates/pages/index.hbs' ]
< / span > < / span > < span class = "line" > < span class = "cl" > }
< / span > < / span > < span class = "line" > < span class = "cl" > }
< / span > < / span > < span class = "line" > < span class = "cl" > }
< / span > < / span > < span class = "line" > < span class = "cl" > };
< / span > < / span > < span class = "line" > < span class = "cl" > ```
< / span > < / span > < / code > < / pre > < / div > < p > Renders to:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-js" data-lang = "js" > < span class = "line" > < span class = "cl" > < span class = "nx" > grunt< / span > < span class = "p" > .< / span > < span class = "nx" > initConfig< / span > < span class = "p" > ({< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > assemble< / span > < span class = "o" > :< / span > < span class = "p" > {< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > options< / span > < span class = "o" > :< / span > < span class = "p" > {< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > assets< / span > < span class = "o" > :< / span > < span class = "s1" > ' docs/assets' < / span > < span class = "p" > ,< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > data< / span > < span class = "o" > :< / span > < span class = "s1" > ' src/data/*.{json,yml}' < / span > < span class = "p" > ,< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > helpers< / span > < span class = "o" > :< / span > < span class = "s1" > ' src/custom-helpers.js' < / span > < span class = "p" > ,< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > partials< / span > < span class = "o" > :< / span > < span class = "p" > [< / span > < span class = "s1" > ' src/partials/**/*.{hbs,md}' < / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > },< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > pages< / span > < span class = "o" > :< / span > < span class = "p" > {< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > options< / span > < span class = "o" > :< / span > < span class = "p" > {< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > layout< / span > < span class = "o" > :< / span > < span class = "s1" > ' default.hbs' < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > },< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > files< / span > < span class = "o" > :< / span > < span class = "p" > {< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "s1" > ' ./' < / span > < span class = "o" > :< / span > < span class = "p" > [< / span > < span class = "s1" > ' src/templates/pages/index.hbs' < / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > }< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > }< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > }< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > };< / span >
< / span > < / span > < / code > < / pre > < / div > < h2 id = "tables" > Tables< / h2 >
< p > Tables are created 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.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > | Option | Description |
< / span > < / span > < span class = "line" > < span class = "cl" > | ------ | ----------- |
< / span > < / span > < span class = "line" > < span class = "cl" > | data | path to data files to supply the data that will be passed into templates. |
< / span > < / span > < span class = "line" > < span class = "cl" > | engine | engine to be used for processing templates. Handlebars is the default. |
< / span > < / span > < span class = "line" > < span class = "cl" > | ext | extension to be used for dest files. |
< / span > < / span > < / code > < / pre > < / div > < p > Renders to:< / p >
< table >
< thead >
< tr >
< th > Option< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > data< / td >
< td > path to data files to supply the data that will be passed into templates.< / td >
< / tr >
< tr >
< td > engine< / td >
< td > engine to be used for processing templates. Handlebars is the default.< / td >
< / tr >
< tr >
< td > ext< / td >
< td > extension to be used for dest files.< / td >
< / tr >
< / tbody >
< / table >
< p > And this HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > table< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > tr< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > th< / span > < span class = "p" > > < / span > Option< span class = "p" > < /< / span > < span class = "nt" > th< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > th< / span > < span class = "p" > > < / span > Description< span class = "p" > < /< / span > < span class = "nt" > th< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > tr< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > tr< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > td< / span > < span class = "p" > > < / span > data< span class = "p" > < /< / span > < span class = "nt" > td< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > td< / span > < span class = "p" > > < / span > path to data files to supply the data that will be passed into templates.< span class = "p" > < /< / span > < span class = "nt" > td< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > tr< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > tr< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > td< / span > < span class = "p" > > < / span > engine< span class = "p" > < /< / span > < span class = "nt" > td< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > td< / span > < span class = "p" > > < / span > engine to be used for processing templates. Handlebars is the default.< span class = "p" > < /< / span > < span class = "nt" > td< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > tr< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > tr< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > td< / span > < span class = "p" > > < / span > ext< span class = "p" > < /< / span > < span class = "nt" > td< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > td< / span > < span class = "p" > > < / span > extension to be used for dest files.< span class = "p" > < /< / span > < span class = "nt" > td< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > tr< / span > < span class = "p" > > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > < /< / span > < span class = "nt" > table< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "right-aligned-text" > Right aligned text< / h3 >
< p > Adding a colon on the right side of the dashes below any heading will right align text for that column.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > | Option | Description |
< / span > < / span > < span class = "line" > < span class = "cl" > | ------:| -----------:|
< / span > < / span > < span class = "line" > < span class = "cl" > | data | path to data files to supply the data that will be passed into templates. |
< / span > < / span > < span class = "line" > < span class = "cl" > | engine | engine to be used for processing templates. Handlebars is the default. |
< / span > < / span > < span class = "line" > < span class = "cl" > | ext | extension to be used for dest files. |
< / span > < / span > < / code > < / pre > < / div > < table >
< thead >
< tr >
< th style = "text-align:right" > Option< / th >
< th style = "text-align:right" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td style = "text-align:right" > data< / td >
< td style = "text-align:right" > path to data files to supply the data that will be passed into templates.< / td >
< / tr >
< tr >
< td style = "text-align:right" > engine< / td >
< td style = "text-align:right" > engine to be used for processing templates. Handlebars is the default.< / td >
< / tr >
< tr >
< td style = "text-align:right" > ext< / td >
< td style = "text-align:right" > extension to be used for dest files.< / td >
< / tr >
< / tbody >
< / table >
< h3 id = "two-tables-adjacent" > Two tables adjacent< / h3 >
< table >
< thead >
< tr >
< th > Option< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > ext< / td >
< td > extension to be used for dest files.< / td >
< / tr >
< / tbody >
< / table >
< table >
< thead >
< tr >
< th > Option< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > ext< / td >
< td > extension to be used for dest files.< / td >
< / tr >
< / tbody >
< / table >
< h2 id = "links" > Links< / h2 >
< h3 id = "basic-link" > Basic link< / h3 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > [< span class = "nt" > Assemble< / span > ](< span class = "na" > http://assemble.io< / span > )
< / span > < / span > < / code > < / pre > < / div > < p > Renders to (hover over the link, there is no tooltip):< / p >
< p > < a href = "http://assemble.io" > Assemble< / a > < / p >
< p > HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > a< / span > < span class = "na" > href< / span > < span class = "o" > =< / span > < span class = "s" > " http://assemble.io" < / span > < span class = "p" > > < / span > Assemble< span class = "p" > < /< / span > < span class = "nt" > a< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "add-a-tooltip" > Add a tooltip< / h3 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > [< span class = "nt" > Upstage< / span > ](< span class = "na" > https://github.com/upstage/ " Visit Upstage!" < / span > )
< / span > < / span > < / code > < / pre > < / div > < p > Renders to (hover over the link, there should be a tooltip):< / p >
< p > < a href = "https://github.com/upstage/" title = "Visit Upstage!" > Upstage< / a > < / p >
< p > HTML:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > a< / span > < span class = "na" > href< / span > < span class = "o" > =< / span > < span class = "s" > " https://github.com/upstage/" < / span > < span class = "na" > title< / span > < span class = "o" > =< / span > < span class = "s" > " Visit Upstage!" < / span > < span class = "p" > > < / span > Upstage< span class = "p" > < /< / span > < span class = "nt" > a< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h3 id = "named-anchors" > Named Anchors< / h3 >
< p > Named anchors enable you to jump to the specified anchor point on the same page. For example, each of these chapters:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > < span class = "gh" > # Table of Contents
2022-07-17 18:04:59 +00:00
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gh" > < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > -< / span > [< span class = "nt" > Chapter 1< / span > ](< span class = "na" > #chapter-1< / span > )
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > -< / span > [< span class = "nt" > Chapter 2< / span > ](< span class = "na" > #chapter-2< / span > )
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "k" > -< / span > [< span class = "nt" > Chapter 3< / span > ](< span class = "na" > #chapter-3< / span > )
2022-04-02 13:30:16 +00:00
< / span > < / span > < / code > < / pre > < / div > < p > will jump to these sections:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > < span class = "gu" > ## Chapter 1 < a id=" chapter-1" > < /a>
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gu" > < / span > Content for chapter one.
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gu" > ## Chapter 2 < a id=" chapter-2" > < /a>
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gu" > < / span > Content for chapter one.
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gu" > ## Chapter 3 < a id=" chapter-3" > < /a>
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "gu" > < / span > Content for chapter one.
2022-10-08 19:39:32 +00:00
< / span > < / span > < / code > < / pre > < / div >
< div class = "box notices cstyle note" >
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-circle" > < / i > Note< / div >
< div class = "box-content" >
< p > Note that specific placement of the anchor tag seems to be arbitrary. They are placed inline here since it seems to be unobtrusive, and it works.< / p >
< / div >
< / div >
2022-04-02 13:30:16 +00:00
< h2 id = "images" > Images< / h2 >
2022-10-08 19:39:32 +00:00
< p > Images have a similar syntax to links but include a preceding exclamation mark:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Spock< / span > ](< span class = "na" > https://octodex.github.com/images/spocktocat.png< / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/spocktocat.png?width=20vw" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/spocktocat.png?width=20vw" alt = "Spock" style = "height: auto; width: 20vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-10-08 19:39:32 +00:00
< p > Like links, images also have a footnote style syntax, resulting in a tooltip:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Picard< / span > ](< span class = "na" > https://octodex.github.com/images/jean-luc-picat.jpg " Jean Luc Picard" < / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/jean-luc-picat.jpg?width=20vw" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/jean-luc-picat.jpg?width=20vw" alt = "Picard" title = "Jean Luc Picard" style = "height: auto; width: 20vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-10-08 19:39:32 +00:00
< p > Images can also be linked by reference ID to later define the URL location:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![La Forge][laforge]
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > [laforge]: https://octodex.github.com/images/trekkie.jpg " Geordi La Forge"
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/trekkie.jpg?width=20vw" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/trekkie.jpg?width=20vw" alt = "La Forge" title = "Geordi La Forge" style = "height: auto; width: 20vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-04-02 13:30:16 +00:00
< h3 id = "further-image-formatting" > Further image formatting< / h3 >
< p > The Hugo Markdown parser supports additional non-standard functionality.< / p >
< h4 id = "resizing-image" > Resizing image< / h4 >
< p > Add HTTP parameters < code > width< / code > and/or < code > height< / code > to the link image to resize the image. Values are CSS values (default is < code > auto< / code > ).< / p >
2022-10-08 19:39:32 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Minion< / span > ](< span class = "na" > https://octodex.github.com/images/minion.png?width=20vw< / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/minion.png?width=20vw" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/minion.png?width=20vw" alt = "Minion" style = "height: auto; width: 20vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-04-02 13:30:16 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Minion< / span > ](< span class = "na" > https://octodex.github.com/images/minion.png?height=50px< / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/minion.png?height=50px" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/minion.png?height=50px" alt = "Minion" style = "height: 50px; width: auto;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-10-08 19:39:32 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Minion< / span > ](< span class = "na" > https://octodex.github.com/images/minion.png?height=50px& width=40vw< / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/minion.png?height=50px&width=40vw" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/minion.png?height=50px&width=40vw" alt = "Minion" style = "height: 50px; width: 40vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-04-02 13:30:16 +00:00
< h4 id = "add-css-classes" > Add CSS classes< / h4 >
2022-10-08 19:39:32 +00:00
< p > Add a HTTP < code > classes< / code > parameter to the link image to add CSS classes. Add some of the predefined values or even define your own in your CSS.< / p >
< h5 id = "shadow" > shadow< / h5 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Spidertocat< / span > ](< span class = "na" > https://octodex.github.com/images/spidertocat.png?classes=shadow< / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/spidertocat.png?width=20vw&classes=shadow" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/spidertocat.png?width=20vw&classes=shadow" alt = "Spidertocat" class = "shadow" style = "height: auto; width: 20vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-10-08 19:39:32 +00:00
< h5 id = "border" > border< / h5 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > DrOctocat< / span > ](< span class = "na" > https://octodex.github.com/images/droctocat.png?classes=border< / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/droctocat.png?width=20vw&classes=border" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/droctocat.png?width=20vw&classes=border" alt = "DrOctocat" class = "border" style = "height: auto; width: 20vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-10-08 19:39:32 +00:00
< h5 id = "left" > left< / h5 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Supertocat< / span > ](< span class = "na" > https://octodex.github.com/images/okal-eltocat.jpg?classes=left< / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/okal-eltocat.jpg?width=20vw&classes=left" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/okal-eltocat.jpg?width=20vw&classes=left" alt = "Supertocat" class = "left" style = "height: auto; width: 20vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-10-08 19:39:32 +00:00
< h5 id = "right" > right< / h5 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Riddlocat< / span > ](< span class = "na" > https://octodex.github.com/images/riddlocat.jpg?classes=right< / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/riddlocat.jpg?width=20vw&classes=right" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/riddlocat.jpg?width=20vw&classes=right" alt = "Riddlocat" class = "right" style = "height: auto; width: 20vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-10-08 19:39:32 +00:00
< h5 id = "inline" > inline< / h5 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Spidertocat< / span > ](< span class = "na" > https://octodex.github.com/images/spidertocat.png?classes=inline< / span > )
< / span > < / span > < span class = "line" > < span class = "cl" > ![< span class = "nt" > DrOctocat< / span > ](< span class = "na" > https://octodex.github.com/images/droctocat.png?classes=inline< / span > )
< / span > < / span > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Supertocat< / span > ](< span class = "na" > https://octodex.github.com/images/okal-eltocat.jpg?classes=inline< / span > )
< / span > < / span > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Riddlocat< / span > ](< span class = "na" > https://octodex.github.com/images/riddlocat.jpg?classes=inline< / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/spidertocat.png?width=10vw&classes=inline" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/spidertocat.png?width=10vw&classes=inline" alt = "Spidertocat" class = "inline" style = "height: auto; width: 10vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a >
2022-11-05 23:35:48 +00:00
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/droctocat.png?width=10vw&classes=inline" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/droctocat.png?width=10vw&classes=inline" alt = "DrOctocat" class = "inline" style = "height: auto; width: 10vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a >
2022-11-05 23:35:48 +00:00
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/okal-eltocat.jpg?width=10vw&classes=inline" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/okal-eltocat.jpg?width=10vw&classes=inline" alt = "Supertocat" class = "inline" style = "height: auto; width: 10vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a >
2022-11-05 23:35:48 +00:00
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/riddlocat.jpg?width=10vw&classes=inline" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/riddlocat.jpg?width=10vw&classes=inline" alt = "Riddlocat" class = "inline" style = "height: auto; width: 10vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
< h5 id = "combination" > Combination< / h5 >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > X-tocat< / span > ](< span class = "na" > https://octodex.github.com/images/xtocat.jpg?width=20vw& classes=shadow,border,left< / span > )
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-18 23:25:43 +00:00
< a href = "https://octodex.github.com/images/xtocat.jpg?width=20vw&classes=shadow,border,left" data-featherlight = "image" >
< img src = "https://octodex.github.com/images/xtocat.jpg?width=20vw&classes=shadow,border,left" alt = "X-tocat" class = "shadow border left" style = "height: auto; width: 20vw;" loading = "lazy" >
2022-11-06 15:27:13 +00:00
< / a > < / p >
2022-04-02 13:30:16 +00:00
< h4 id = "lightbox" > Lightbox< / h4 >
< p > Add a HTTP < code > featherlight< / code > parameter to the link image to disable lightbox. By default lightbox is enabled using the featherlight.js plugin. You can disable this by defining < code > featherlight< / code > to < code > false< / code > .< / p >
2022-10-08 19:39:32 +00:00
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-markdown" data-lang = "markdown" > < span class = "line" > < span class = "cl" > ![< span class = "nt" > Homercat< / span > ](< span class = "na" > https://octodex.github.com/images/homercat.png?featherlight=false< / span > )
2022-11-05 23:35:48 +00:00
< / span > < / span > < / code > < / pre > < / div > < p >
2022-11-06 15:27:13 +00:00
2022-11-18 23:25:43 +00:00
< img src = "https://octodex.github.com/images/homercat.png?width=20vw&featherlight=false" alt = "Homercat" style = "height: auto; width: 20vw;" loading = "lazy" > < / p >
2022-04-02 13:30:16 +00:00
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "code-highlighting" > Code highlighting< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > The Relearn theme uses < a href = "https://gohugo.io/content-management/syntax-highlighting/" > Hugo’ s built-in syntax highlighting< / a > for code.< / p >
< h2 id = "markdown-syntax" > Markdown syntax< / h2 >
< p > Wrap the code block with three backticks and the name of the language. Highlight will try to auto detect the language if one is not provided.< / p >
<!-- markdownlint - disable MD046 -->
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-plaintext" data-lang = "plaintext" > < span class = "line" > < span class = "cl" > ```json
< / span > < / span > < span class = "line" > < span class = "cl" > [
< / span > < / span > < span class = "line" > < span class = "cl" > {
< / span > < / span > < span class = "line" > < span class = "cl" > " title" : " apples" ,
< / span > < / span > < span class = "line" > < span class = "cl" > " count" : [12000, 20000],
< / span > < / span > < span class = "line" > < span class = "cl" > " description" : {" text" : " ..." , " sensitive" : false}
< / span > < / span > < span class = "line" > < span class = "cl" > },
< / span > < / span > < span class = "line" > < span class = "cl" > {
< / span > < / span > < span class = "line" > < span class = "cl" > " title" : " oranges" ,
< / span > < / span > < span class = "line" > < span class = "cl" > " count" : [17500, null],
< / span > < / span > < span class = "line" > < span class = "cl" > " description" : {" text" : " ..." , " sensitive" : false}
< / span > < / span > < span class = "line" > < span class = "cl" > }
< / span > < / span > < span class = "line" > < span class = "cl" > ]
< / span > < / span > < span class = "line" > < span class = "cl" > ```
< / span > < / span > < / code > < / pre > < / div > <!-- markdownlint - disable MD046 -->
< p > Renders to:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-json" data-lang = "json" > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nt" > " title" < / span > < span class = "p" > :< / span > < span class = "s2" > " apples" < / span > < span class = "p" > ,< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nt" > " count" < / span > < span class = "p" > :< / span > < span class = "p" > [< / span > < span class = "mi" > 12000< / span > < span class = "p" > ,< / span > < span class = "mi" > 20000< / span > < span class = "p" > ],< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nt" > " description" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span > < span class = "nt" > " text" < / span > < span class = "p" > :< / span > < span class = "s2" > " ..." < / span > < span class = "p" > ,< / span > < span class = "nt" > " sensitive" < / span > < span class = "p" > :< / span > < span class = "kc" > false< / span > < span class = "p" > }< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > },< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > {< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nt" > " title" < / span > < span class = "p" > :< / span > < span class = "s2" > " oranges" < / span > < span class = "p" > ,< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nt" > " count" < / span > < span class = "p" > :< / span > < span class = "p" > [< / span > < span class = "mi" > 17500< / span > < span class = "p" > ,< / span > < span class = "kc" > null< / span > < span class = "p" > ],< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nt" > " description" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span > < span class = "nt" > " text" < / span > < span class = "p" > :< / span > < span class = "s2" > " ..." < / span > < span class = "p" > ,< / span > < span class = "nt" > " sensitive" < / span > < span class = "p" > :< / span > < span class = "kc" > false< / span > < span class = "p" > }< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > }< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > ]< / span >
< / span > < / span > < / code > < / pre > < / div > < h2 id = "supported-languages" > Supported languages< / h2 >
< p > Hugo comes with a < a href = "https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages" > remarkable list< / a > of supported languages.< / p >
< h2 id = "recommended-configuration" > Recommended configuration< / h2 >
< p > You can choose a color theme from the < a href = "https://xyproto.github.io/splash/docs/all.html" > list of supported themes< / a > and add it in your < code > config.toml< / 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 = "p" > [< / span > < span class = "nx" > markup< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > markup< / span > < span class = "p" > .< / span > < span class = "nx" > highlight< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # if set to `guessSyntax = true`, there will be no unstyled code even if no language< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # was given BUT mermaid code fences will not work anymore! So this is a mandatory< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # setting for your site< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > guessSyntax< / span > < span class = "p" > =< / span > < span class = "kc" > false< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # choose a color theme or create your own< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > style< / span > < span class = "p" > =< / span > < span class = "s2" > " base16-snazzy" < / span >
< / span > < / span > < / code > < / pre > < / div >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "menu-extra-shortcuts" > Menu extra shortcuts< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > You can define additional menu entries or shortcuts in the navigation menu without any link to content.< / p >
< h2 id = "basic-configuration" > Basic configuration< / h2 >
< p > Edit the website configuration < code > config.toml< / code > and add a < code > [[menu.shortcuts]]< / code > entry for each link your want to add.< / p >
< p > Example from the current website:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fab fa-fw fa-github' > < /i> GitHub repo" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > identifier< / span > < span class = "p" > =< / span > < span class = "s2" > " ds" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " https://github.com/McShelby/hugo-theme-relearn" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 10< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-camera' > < /i> Showcases" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " more/showcase/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 11< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-bookmark' > < /i> Hugo Documentation" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > identifier< / span > < span class = "p" > =< / span > < span class = "s2" > " hugodoc" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " https://gohugo.io/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 20< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-bullhorn' > < /i> Credits" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " more/credits/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 30< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-tags' > < /i> Tags" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " tags/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 40< / span >
< / span > < / span > < / code > < / pre > < / div > < p > By default, shortcuts are preceded by a title. This title can be disabled by setting < code > disableShortcutsTitle=true< / code > .
2022-10-31 14:06:51 +00:00
However, if you want to keep the title but change its value, it can be overridden by changing your local i18n translation string configuration.< / p >
2022-04-02 13:30:16 +00:00
< p > For example, in your local < code > i18n/en.toml< / code > file, add the following content< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > Shortcuts-Title< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > other< / span > < span class = "p" > =< / span > < span class = "s2" > " < Your value> " < / span >
< / span > < / span > < / code > < / pre > < / div > < p > Read more about < a href = "https://gohugo.io/extras/menus/" > hugo menu< / a > and < a href = "https://gohugo.io/content-management/multilingual/#translation-of-strings" > hugo i18n translation strings< / a > < / p >
< h2 id = "i18n" > Configuration for Multilingual mode< / h2 >
< p > When using a multilingual website, you can set different menus for each language. In the < code > config.toml< / code > file, prefix your menu configuration by < code > Languages.< language-id> < / code > .< / p >
< p > Example from the current website:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > Languages< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > en< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s2" > " Hugo Relearn Theme" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 1< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > languageName< / span > < span class = "p" > =< / span > < span class = "s2" > " English" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > landingPageURL< / span > < span class = "p" > =< / span > < span class = "s2" > " /" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > landingPageName< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-home' > < /i> Home" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > en< / span > < span class = "p" > .< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fab fa-fw fa-github' > < /i> GitHub repo" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > identifier< / span > < span class = "p" > =< / span > < span class = "s2" > " ds" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " https://github.com/McShelby/hugo-theme-relearn" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 10< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > en< / span > < span class = "p" > .< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-camera' > < /i> Showcases" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " more/showcase/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 11< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > en< / span > < span class = "p" > .< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-bookmark' > < /i> Hugo Documentation" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > identifier< / span > < span class = "p" > =< / span > < span class = "s2" > " hugodoc" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " https://gohugo.io/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 20< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > en< / span > < span class = "p" > .< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-bullhorn' > < /i> Credits" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " more/credits/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 30< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > en< / span > < span class = "p" > .< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-tags' > < /i> Tags" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " tags/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 40< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > pir< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s2" > " Cap' n Hugo Relearrrn Theme" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 1< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > languageName< / span > < span class = "p" > =< / span > < span class = "s2" > " Arrr! Pirrrates" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > landingPageURL< / span > < span class = "p" > =< / span > < span class = "s2" > " /pir/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > landingPageName< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-home' > < /i> Arrr! Home" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > pir< / span > < span class = "p" > .< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fab fa-fw fa-github' > < /i> GitHub repo" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > identifier< / span > < span class = "p" > =< / span > < span class = "s2" > " ds" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " https://github.com/McShelby/hugo-theme-relearn" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 10< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > pir< / span > < span class = "p" > .< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-camera' > < /i> Showcases" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " more/showcase/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 11< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > pir< / span > < span class = "p" > .< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-bookmark' > < /i> Cap' n Hugo Documentat' n" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > identifier< / span > < span class = "p" > =< / span > < span class = "s2" > " hugodoc" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " https://gohugo.io/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 20< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > pir< / span > < span class = "p" > .< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-bullhorn' > < /i> Crrredits" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " more/credits/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 30< / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > pir< / span > < span class = "p" > .< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-fw fa-tags' > < /i> Arrr! Tags" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " tags/" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 40< / span >
< / span > < / span > < / code > < / pre > < / div > < p > Read more about < a href = "https://gohugo.io/extras/menus/" > hugo menu< / a > and < a href = "https://gohugo.io/content-management/multilingual/#menus" > hugo multilingual menus< / a > < / p >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "icons-and-logos" > Icons and logos< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > The Relearn theme for Hugo loads the < a href = "https://fontawesome.com" > < strong > Font Awesome< / strong > < / a > library, allowing you to easily display any icon or logo available in the Font Awesome free collection.< / p >
< h2 id = "finding-an-icon" > Finding an icon< / h2 >
< p > Browse through the available icons in the < a href = "https://fontawesome.com/v5/search?m=free" > Font Awesome Gallery< / a > . Notice that the < strong > free< / strong > filter is enabled, as only the free icons are available by default.< / p >
< p > Once on the Font Awesome page for a specific icon, for example the page for the < a href = "https://fontawesome.com/v5/icons/heart?s=solid" > heart< / a > , copy the HTML reference and paste into the Markdown content.< / p >
< p > The HTML to include the heart icon is:< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > < span class = "p" > < < / span > < span class = "nt" > i< / span > < span class = "na" > class< / span > < span class = "o" > =< / span > < span class = "s" > " fas fa-heart" < / span > < span class = "p" > > < /< / span > < span class = "nt" > i< / span > < span class = "p" > > < / span >
< / span > < / span > < / code > < / pre > < / div > < h2 id = "including-in-markdown" > Including in markdown< / h2 >
< p > Paste the < code > < i> < / code > HTML into markup and Font Awesome will load the relevant icon.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-html" data-lang = "html" > < span class = "line" > < span class = "cl" > Built with < span class = "p" > < < / span > < span class = "nt" > i< / span > < span class = "na" > class< / span > < span class = "o" > =< / span > < span class = "s" > " fas fa-heart" < / span > < span class = "p" > > < /< / span > < span class = "nt" > i< / span > < span class = "p" > > < / span > by Relearn and Hugo
< / span > < / span > < / code > < / pre > < / div > < p > Which appears as< / p >
< p > Built with < i class = "fas fa-heart" > < / i > by Relearn and Hugo< / p >
< h2 id = "customising-icons" > Customising icons< / h2 >
< p > Font Awesome provides many ways to modify the icon< / p >
< ul >
< li > Change color (by default the icon will inherit the parent color)< / li >
< li > Increase or decrease size< / li >
< li > Rotate< / li >
< li > Combine with other icons< / li >
< / ul >
< p > Check the full documentation on < a href = "https://fontawesome.com/how-to-use/web-fonts-with-css" > web fonts with CSS< / a > for more.< / p >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "multilingual-and-i18n" > Multilingual and i18n< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > The Relearn theme is fully compatible with Hugo multilingual mode.< / p >
< p > It provides:< / p >
< ul >
2022-10-31 14:06:51 +00:00
< li > Translation strings for default values (English, Arabic, Simplified Chinese, Traditional Chinese, Dutch, Finnish (Suomi), French, German, Hindi, Indonesian, Italian, Japanese, Korean, Polish, Portuguese, Russian, Spanish, Turkish, Vietnamese). Feel free to contribute!< / li >
2022-11-01 01:10:49 +00:00
< li > Support for languages written right to left< / li >
2022-04-02 13:30:16 +00:00
< li > Automatic menu generation from multilingual content< / li >
< li > In-browser language switching< / li >
< / ul >
2022-11-05 23:35:48 +00:00
< p >
2022-11-06 15:27:13 +00:00
< a href = "../cont/i18n/i18n-menu.gif?classes=shadow&width=300px" data-featherlight = "image" >
< img src = "../cont/i18n/i18n-menu.gif?classes=shadow&width=300px" alt = "I18n menu" class = "shadow" style = "height: auto; width: 300px;" loading = "lazy" >
< / a > < / p >
2022-04-02 13:30:16 +00:00
< h2 id = "basic-configuration" > Basic configuration< / h2 >
< p > After learning < a href = "https://gohugo.io/content-management/multilingual" > how Hugo handle multilingual websites< / a > , define your languages in your < code > config.toml< / code > file.< / p >
< p > For example with current English and Piratized English website.< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "c" > # English is the default language< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > defaultContentLanguage< / span > < span class = "p" > =< / span > < span class = "s2" > " en" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > Languages< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > en< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s2" > " Hugo Relearn Theme" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 1< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > languageName< / span > < span class = "p" > =< / span > < span class = "s2" > " English" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [< / span > < span class = "nx" > Languages< / span > < span class = "p" > .< / span > < span class = "nx" > pir< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s2" > " Cap' n Hugo Relearrrn Theme" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 2< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > languageName< / span > < span class = "p" > =< / span > < span class = "s2" > " Arrr! Pirrrates" < / span >
< / span > < / span > < / code > < / pre > < / div > < p > Then, for each new page, append the < em > id< / em > of the language to the file.< / p >
< ul >
< li > Single file < code > my-page.md< / code > is split in two files:
< ul >
< li > in English: < code > my-page.md< / code > < / li >
< li > in Piratized English: < code > my-page.pir.md< / code > < / li >
< / ul >
< / li >
< li > Single file < code > _index.md< / code > is split in two files:
< ul >
< li > in English: < code > _index.md< / code > < / li >
< li > in Piratized English: < code > _index.pir.md< / code > < / li >
< / ul >
< / li >
< / ul >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle info" >
< div class = "box-label" > < i class = "fa-fw fas fa-info-circle" > < / i > Info< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
< p > Be aware that only translated pages are displayed in menu. It’ s not replaced with default language content.< / p >
< / div >
< / div >
2022-05-29 21:00:53 +00:00
< div class = "box notices cstyle tip" >
< div class = "box-label" > < i class = "fa-fw fas fa-lightbulb" > < / i > Tip< / div >
2022-04-02 13:30:16 +00:00
< div class = "box-content" >
2022-07-05 22:16:52 +00:00
< p > Use < a href = "https://gohugo.io/content-management/multilingual/#translate-your-content" > slug< / a > frontmatter parameter to translate urls too.< / p >
2022-04-02 13:30:16 +00:00
< / div >
< / div >
2022-06-12 17:25:16 +00:00
< h2 id = "search" > Search< / h2 >
< p > In case each page’ s content is written in one single language only, the above configuration will already configure the site’ s search functionality correctly.< / p >
< div class = "box notices cstyle warning" >
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-triangle" > < / i > Warning< / div >
< div class = "box-content" >
< p > Although the theme supports a wide variety of supported languages, the site’ s search does not.
You’ ll see error reports in your browsers console log for each unsupported language. Currently unsupported are:< / p >
< ul >
< li > Indonesian< / li >
< li > Korean< / li >
< li > Polish< / li >
< / ul >
< / div >
< / div >
< h3 id = "search-with-mixed-language-support" > Search with mixed language support< / h3 >
2022-10-31 14:06:51 +00:00
< p > In case your page’ s content contains text in multiple languages (e.g. you are writing a Russian documentation for your english API), you can add those languages to your < code > config.toml< / code > to broaden search.< / p >
2022-06-12 17:25: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 = "p" > [< / span > < span class = "nx" > params< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > additionalContentLanguage< / span > < span class = "p" > =< / span > < span class = "p" > [< / span > < span class = "s2" > " en" < / span > < span class = "p" > ]< / span >
< / span > < / span > < / code > < / pre > < / div > < p > As this is an array, you can add multiple additional languages.< / p >
< div class = "box notices cstyle note" >
< div class = "box-label" > < i class = "fa-fw fas fa-exclamation-circle" > < / i > Note< / div >
< div class = "box-content" >
2022-10-31 14:06:51 +00:00
< p > Keep in mind that the language code required here, is the base language code. E.g. if you have additional content in < code > zh-CN< / code > , you have to add just < code > zh< / code > to this parameter.< / p >
2022-06-12 17:25:16 +00:00
< / div >
< / div >
2022-04-02 13:30:16 +00:00
< h2 id = "overwrite-translation-strings" > Overwrite translation strings< / h2 >
< p > Translations strings are used for common default values used in the theme (< em > Edit< / em > button, < em > Search placeholder< / em > and so on). Translations are available in English and Piratized English but you may use another language or want to override default values.< / p >
< p > To override these values, create a new file in your local i18n folder < code > i18n/< idlanguage> .toml< / code > and inspire yourself from the theme < code > themes/hugo-theme-relearn/i18n/en.toml< / code > < / p >
< h2 id = "disable-language-switching" > Disable language switching< / h2 >
< p > Switching the language in the browser is a great feature, but for some reasons you may want to disable it.< / p >
< p > Just set < code > disableLanguageSwitchingButton=true< / code > in your < code > config.toml< / 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 = "p" > [< / span > < span class = "nx" > params< / span > < span class = "p" > ]< / span >
2022-10-31 14:06:51 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "c" > # When using multilingual website, disable the switch language button.< / span >
2022-04-02 13:30:16 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > disableLanguageSwitchingButton< / span > < span class = "p" > =< / span > < span class = "kc" > true< / span >
< / span > < / span > < / code > < / pre > < / div >
< footer class = "footline" >
< / footer >
< / article >
2022-11-07 19:58:08 +00:00
< article class = "default" >
2022-11-13 21:34:47 +00:00
< h1 id = "tags" > Tags< / h1 >
2022-07-05 22:16:52 +00:00
2022-04-02 13:30:16 +00:00
< p > The Relearn theme supports one default taxonomy of Hugo: the < em > tag< / em > feature.< / p >
< h2 id = "configuration" > Configuration< / h2 >
< p > Just add tags to any page:< / 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" > tags< / span > < span class = "p" > =< / span > < span class = "p" > [< / span > < span class = "s2" > " tutorial" < / span > < span class = "p" > ,< / span > < span class = "s2" > " theme" < / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > title< / span > < span class = "p" > =< / span > < span class = "s2" > " Theme tutorial" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 15< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "err" > +++< / span >
< / span > < / span > < / code > < / pre > < / div > < h2 id = "behavior" > Behavior< / h2 >
< p > The tags are displayed at the top of the page, in their insertion order.< / p >
< p > Each tag is a link to a < em > Taxonomy< / em > page displaying all the articles with the given tag.< / p >
< h2 id = "list-all-the-tags" > List all the tags< / h2 >
< p > In the < code > config.toml< / code > file you can add a shortcut to display all the tags< / p >
< div class = "highlight" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > menu< / span > < span class = "p" > .< / span > < span class = "nx" > shortcuts< / span > < span class = "p" > ]]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > name< / span > < span class = "p" > =< / span > < span class = "s2" > " < i class=' fas fa-tags' > < /i> Tags" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > url< / span > < span class = "p" > =< / span > < span class = "s2" > " /tags" < / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > weight< / span > < span class = "p" > =< / span > < span class = "mi" > 30< / span >
< / span > < / span > < / code > < / pre > < / div >
< footer class = "footline" >
< / footer >
< / article >
2022-07-05 22:16:52 +00:00
2022-07-17 23:32:02 +00:00
< / section > < / div >
2022-04-02 13:30:16 +00:00
< / main >
< / div >
2022-11-22 23:29:08 +00:00
< script src = "../js/clipboard.min.js?1669159744" defer > < / script >
< script src = "../js/perfect-scrollbar.min.js?1669159744" defer > < / script >
< script src = "../js/featherlight.min.js?1669159744" defer > < / script >
< script src = "../js/theme.js?1669159744" defer > < / script >
2022-04-02 13:30:16 +00:00
< / body >
< / html >