2022-04-02 13:30:16 +00:00
<!DOCTYPE html>
2024-04-27 13:29:53 +00:00
< html lang = "en" dir = "ltr" itemscope itemtype = "http://schema.org/Article" >
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" >
2024-09-05 18:03:19 +00:00
< meta name = "generator" content = "Hugo 0.134.1" >
2024-09-03 17:45:17 +00:00
< meta name = "generator" content = "Relearn 6.3.0+tip" >
2024-09-03 17:09:09 +00:00
< meta name = "description" content = "The following steps are here to help you initialize your new website. If you don’ t know Hugo at all, we strongly suggest you learn more about it by following this great documentation for beginners." >
2023-10-10 21:22:41 +00:00
< meta name = "author" content = "Sören Weber" >
2023-10-11 16:03:03 +00:00
< meta name = "twitter:card" content = "summary_large_image" >
2024-02-24 13:03:50 +00:00
< meta name = "twitter:image" content = "https://mcshelby.github.io/hugo-theme-relearn/images/hero.png" >
2023-10-11 16:03:03 +00:00
< meta name = "twitter:title" content = "Installation :: Hugo Relearn Theme" >
2024-09-03 17:09:09 +00:00
< meta name = "twitter:description" content = "The following steps are here to help you initialize your new website. If you don’ t know Hugo at all, we strongly suggest you learn more about it by following this great documentation for beginners." >
2024-04-07 13:13:19 +00:00
< meta property = "og:url" content = "https://mcshelby.github.io/hugo-theme-relearn/basics/installation/index.html" >
< meta property = "og:site_name" content = "Hugo Relearn Theme" >
2023-10-11 15:32:39 +00:00
< meta property = "og:title" content = "Installation :: Hugo Relearn Theme" >
2024-09-03 17:09:09 +00:00
< meta property = "og:description" content = "The following steps are here to help you initialize your new website. If you don’ t know Hugo at all, we strongly suggest you learn more about it by following this great documentation for beginners." >
2024-04-07 13:13:19 +00:00
< meta property = "og:locale" content = "en" >
2023-10-11 15:32:39 +00:00
< meta property = "og:type" content = "website" >
2024-02-24 13:03:50 +00:00
< meta property = "og:image" content = "https://mcshelby.github.io/hugo-theme-relearn/images/hero.png" >
2024-04-24 19:38:41 +00:00
< meta itemprop = "name" content = "Installation :: Hugo Relearn Theme" >
2024-09-03 17:09:09 +00:00
< meta itemprop = "description" content = "The following steps are here to help you initialize your new website. If you don’ t know Hugo at all, we strongly suggest you learn more about it by following this great documentation for beginners." >
2024-09-05 18:03:19 +00:00
< meta itemprop = "wordCount" content = "662" >
2024-04-24 19:38:41 +00:00
< meta itemprop = "image" content = "https://mcshelby.github.io/hugo-theme-relearn/images/hero.png" >
< meta itemprop = "keywords" content = "Documentation" >
2022-04-02 13:30:16 +00:00
< title > Installation :: Hugo Relearn Theme< / title >
2024-02-24 13:03:50 +00:00
< link href = "https://mcshelby.github.io/hugo-theme-relearn/basics/installation/index.html" rel = "alternate" hreflang = "x-default" >
< link href = "https://mcshelby.github.io/hugo-theme-relearn/basics/installation/index.html" rel = "alternate" hreflang = "en" >
2024-04-30 20:08:46 +00:00
< link href = "https://mcshelby.github.io/hugo-theme-relearn/pir/basics/installation/index.html" rel = "alternate" hreflang = "art-x-pir" >
2024-02-24 13:03:50 +00:00
< link href = "https://mcshelby.github.io/hugo-theme-relearn/basics/installation/index.html" rel = "canonical" type = "text/html" title = "Installation :: Hugo Relearn Theme" >
2024-02-24 12:50:21 +00:00
< link href = "/hugo-theme-relearn/basics/installation/index.xml" rel = "alternate" type = "application/rss+xml" title = "Installation :: Hugo Relearn Theme" >
2024-09-05 18:03:19 +00:00
< link href = "/hugo-theme-relearn/images/logo.svg?1725559392" rel = "icon" type = "image/svg+xml" >
< link href = "/hugo-theme-relearn/css/fontawesome-all.min.css?1725559392" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "/hugo-theme-relearn/css/fontawesome-all.min.css?1725559392" rel = "stylesheet" > < / noscript >
< link href = "/hugo-theme-relearn/css/nucleus.css?1725559392" rel = "stylesheet" >
< link href = "/hugo-theme-relearn/css/auto-complete.css?1725559392" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "/hugo-theme-relearn/css/auto-complete.css?1725559392" rel = "stylesheet" > < / noscript >
< link href = "/hugo-theme-relearn/css/perfect-scrollbar.min.css?1725559392" rel = "stylesheet" >
< link href = "/hugo-theme-relearn/css/fonts.css?1725559392" rel = "stylesheet" media = "print" onload = "this.media='all';this.onload=null;" > < noscript > < link href = "/hugo-theme-relearn/css/fonts.css?1725559392" rel = "stylesheet" > < / noscript >
< link href = "/hugo-theme-relearn/css/theme.css?1725559392" rel = "stylesheet" >
< link href = "/hugo-theme-relearn/css/theme-relearn-auto.css?1725559392" rel = "stylesheet" id = "R-variant-style" >
< link href = "/hugo-theme-relearn/css/chroma-relearn-auto.css?1725559392" rel = "stylesheet" id = "R-variant-chroma-style" >
< link href = "/hugo-theme-relearn/css/variant.css?1725559392" rel = "stylesheet" >
< link href = "/hugo-theme-relearn/css/print.css?1725559392" rel = "stylesheet" media = "print" >
< link href = "/hugo-theme-relearn/css/format-print.css?1725559392" rel = "stylesheet" >
< script src = "/hugo-theme-relearn/js/variant.js?1725559392" > < / script >
2024-03-16 13:44:28 +00:00
< script >
2023-11-16 22:53:34 +00:00
window.relearn = window.relearn || {};
2024-03-18 20:59:19 +00:00
window.relearn.relBasePath='..\/..';
window.relearn.relBaseUri='..\/..\/..';
window.relearn.absBaseUri='https:\/\/mcshelby.github.io\/hugo-theme-relearn';
2024-08-22 16:34:04 +00:00
window.relearn.disableAnchorCopy=false;
window.relearn.disableAnchorScrolling=false;
2024-09-05 18:03:19 +00:00
window.index_js_url="/hugo-theme-relearn/index.search.js?1725559392";
2023-11-16 22:53:34 +00:00
// variant stuff
2024-04-19 06:38:17 +00:00
window.variants & & variants.init( [ 'relearn-auto', 'relearn-light', 'relearn-dark', 'relearn-bright', 'zen-auto', 'zen-light', 'zen-dark', 'retro-auto', 'neon', 'learn', 'blue', 'green', 'red' ] );
2023-11-16 22:53:34 +00:00
// 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!`;
window.T_Reset_view = `Reset view`;
window.T_View_reset = `View reset!`;
window.T_No_results_found = `No results found for "{0}"`;
window.T_N_results_found = `{1} results found for "{0}"`;
2022-04-02 13:30:16 +00:00
< / script >
2022-12-02 15:05:54 +00:00
< style >
2023-09-23 08:19:35 +00:00
#R-body img.bg-white {
2022-12-02 15:05:54 +00:00
background-color: white;
}
< / style >
2022-04-02 13:30:16 +00:00
< / head >
2024-02-24 12:50:21 +00:00
< body class = "mobile-support print disableInlineCopyToClipboard" data-url = "/hugo-theme-relearn/basics/installation/index.html" >
2023-09-23 08:19:35 +00:00
< div id = "R-body" class = "default-animation" >
< div id = "R-body-overlay" > < / div >
< nav id = "R-topbar" >
2023-09-18 18:49:44 +00:00
< div class = "topbar-wrapper" >
2023-09-13 21:30:04 +00:00
< div class = "topbar-sidebar-divider" > < / div >
2023-09-18 18:49:44 +00:00
< div class = "topbar-area topbar-area-start" data-area = "start" >
2023-12-05 07:41:41 +00:00
< div class = "topbar-button topbar-button-sidebar" data-content-empty = "disable" data-width-s = "show" data-width-m = "hide" data-width-l = "hide" > < button class = "topbar-control" onclick = "toggleNav()" type = "button" title = "Menu (CTRL+ALT+n)" > < i class = "fa-fw fas fa-bars" > < / i > < / button >
2023-09-12 21:10:21 +00:00
< / div >
2023-09-13 21:30:04 +00:00
< / div >
2023-09-20 22:28:27 +00:00
< ol class = "topbar-breadcrumbs breadcrumbs highlightable" itemscope itemtype = "http://schema.org/BreadcrumbList" > < li
2024-02-24 12:50:21 +00:00
itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">< a itemprop = "item" href = "/hugo-theme-relearn/basics/index.html" > < span itemprop = "name" > Basics< / span > < / a > < meta itemprop = "position" content = "1" > > < / li > < li
2023-09-23 22:28:49 +00:00
itemscope itemtype="https://schema.org/ListItem" itemprop="itemListElement">< span itemprop = "name" > Installation< / span > < meta itemprop = "position" content = "2" > < / li >
2023-09-13 21:30:04 +00:00
< / ol >
2023-09-18 18:49:44 +00:00
< div class = "topbar-area topbar-area-end" data-area = "end" >
2024-04-07 19:58:38 +00:00
< div class = "topbar-button topbar-button-prev" data-content-empty = "disable" data-width-s = "show" data-width-m = "show" data-width-l = "show" > < a class = "topbar-control" href = "/hugo-theme-relearn/basics/requirements/index.html" title = "Requirements (🡐)" > < i class = "fa-fw fas fa-chevron-left" > < / i > < / a >
< / div >
< div class = "topbar-button topbar-button-next" data-content-empty = "disable" data-width-s = "show" data-width-m = "show" data-width-l = "show" > < a class = "topbar-control" href = "/hugo-theme-relearn/basics/configuration/index.html" title = "Configuration (🡒)" > < i class = "fa-fw fas fa-chevron-right" > < / i > < / a >
< / div >
2023-09-12 21:19:47 +00:00
< / div >
2022-04-02 13:30:16 +00:00
< / div >
< / nav >
2023-09-23 08:19:35 +00:00
< div id = "R-main-overlay" > < / div >
< main id = "R-body-inner" class = "highlightable default" tabindex = "-1" >
2022-04-02 13:30:16 +00:00
< div class = "flex-block-wrapper" >
2023-05-19 18:46:07 +00:00
< article class = "default" >
< header class = "headline" >
2023-10-03 20:51:03 +00:00
< div class = " taxonomy-tags term-list cstyle tags" title = "Tags" style = "--VARIABLE-TAGS-BG-color: var(--INTERNAL-TAG-BG-color);" >
2023-10-03 11:21:35 +00:00
< ul >
2024-02-24 12:50:21 +00:00
< li > < a class = "term-link" href = "/hugo-theme-relearn/tags/documentation/index.html" > Documentation< / a > < / li >
2023-10-03 11:21:35 +00:00
< / ul >
2023-05-19 07:55:18 +00:00
< / div >
2023-05-19 18:46:07 +00:00
< / header >
2024-04-07 19:58:38 +00:00
2022-11-13 21:34:47 +00:00
< h1 id = "installation" > Installation< / h1 >
2022-07-05 22:16:52 +00:00
2024-04-21 21:48:09 +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 learn more about it by following this < a href = "https://gohugo.io/overview/quickstart/" rel = "external" target = "_self" > great documentation for beginners< / a > .< / p >
2024-03-15 20:10:54 +00:00
< div class = "box notices cstyle tip" >
2024-09-01 11:58:33 +00:00
< div class = "box-label" >
< i class = "fa-fw fas fa-lightbulb" > < / i > Tip
< / div >
2024-03-15 20:10:54 +00:00
< div class = "box-content" >
2024-04-12 15:30:57 +00:00
< p > The following tutorial leads you through the steps of creating a first, minimal new site.< / p >
2024-03-15 20:10:54 +00:00
< p > You don’ t need to edit any files besides your < code > hugo.toml< / code > and only need to execute the commands in the given order.< / p >
2024-09-05 18:03:19 +00:00
< / div >
2024-03-15 20:10:54 +00:00
< / div >
2024-04-22 19:14:35 +00:00
< h2 id = "create-your-project" > Create your Project< / h2 >
< p > Hugo provides the < code > new< / code > command to create a new website:< / p >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo new site my-new-site< / span > < / span > < / code > < / pre > < / div >
< p > After that change into the directory:< / p >
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > < span class = "nb" > cd< / span > my-new-site< / span > < / span > < / code > < / pre > < / div >
< p > Every upcoming command will be executed from inside your new site’ s root.< / p >
2024-04-22 19:14:35 +00:00
< h2 id = "install-the-theme" > Install the Theme< / h2 >
< h3 id = "downloading-as-archive" > Downloading as Archive< / h3 >
< p > You can < a href = "https://github.com/McShelby/hugo-theme-relearn/archive/main.zip" rel = "external" target = "_self" > download the theme as .zip archive< / a > and extract its content into them < code > themes/hugo-theme-relearn< / code > directory.< / p >
< p > Afterwards add this at the end of your < code > hugo.toml< / code > .< / p >
< div class = "tab-panel" data-tab-group = "config-code" >
< div class = "tab-nav" >
< div class = "tab-nav-title" > hugo.< / div >
< button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
< span class = "tab-nav-text" > toml< / span >
< / button >
< button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
< span class = "tab-nav-text" > yaml< / span >
< / button >
< button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
< span class = "tab-nav-text" > json< / span >
< / button >
< / div >
< div class = "tab-content-container" >
< div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
< div class = "tab-content-text" >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "nx" > theme< / span > < span class = "p" > =< / span > < span class = "s1" > ' hugo-theme-relearn' < / span > < / span > < / span > < / code > < / pre > < / div >
< / div >
2024-04-22 19:14:35 +00:00
< / div >
< div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
< div class = "tab-content-text" >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-yaml" data-lang = "yaml" > < span class = "line" > < span class = "cl" > < span class = "nt" > theme< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "l" > hugo-theme-relearn< / span > < / span > < / span > < / code > < / pre > < / div >
< / div >
2024-04-22 19:14:35 +00:00
< / div >
< div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
< div class = "tab-content-text" >
< div class = "highlight wrap-code" > < 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 = "nt" > " theme" < / span > < span class = "p" > :< / span > < span class = "s2" > " hugo-theme-relearn" < / span >
2024-09-05 18:03:19 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > }< / span > < / span > < / span > < / code > < / pre > < / div >
< / div >
2024-04-22 19:14:35 +00:00
< / div >
< / div >
< / div >
< h3 id = "using-hugos-module-system" > Using Hugo’ s Module System< / h3 >
< p > You can install the Relearn theme by following < a href = "https://gohugo.io/hugo-modules/use-modules/#use-a-module-for-a-theme" rel = "external" target = "_self" > the standard documentation< / a > using Hugo’ s module system:< / p >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo mod init example.com< / span > < / span > < / code > < / pre > < / div >
< p > Afterwards add this at the end of your < code > hugo.toml< / code > .< / p >
2024-04-22 19:14:35 +00:00
< div class = "tab-panel" data-tab-group = "config-code" >
< div class = "tab-nav" >
< div class = "tab-nav-title" > hugo.< / div >
< button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
< span class = "tab-nav-text" > toml< / span >
< / button >
< button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
< span class = "tab-nav-text" > yaml< / span >
< / button >
< button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
< span class = "tab-nav-text" > json< / span >
< / button >
< / div >
< div class = "tab-content-container" >
< div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
< div class = "tab-content-text" >
< div class = "highlight wrap-code" > < 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" > module< / span > < span class = "p" > ]< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > [[< / span > < span class = "nx" > module< / span > < span class = "p" > .< / span > < span class = "nx" > imports< / span > < span class = "p" > ]]< / span >
2024-09-05 18:03:19 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nx" > path< / span > < span class = "p" > =< / span > < span class = "s1" > ' github.com/McShelby/hugo-theme-relearn' < / span > < / span > < / span > < / code > < / pre > < / div >
< / div >
2024-04-22 19:14:35 +00:00
< / div >
< div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
< div class = "tab-content-text" >
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-yaml" data-lang = "yaml" > < span class = "line" > < span class = "cl" > < span class = "nt" > module< / span > < span class = "p" > :< / span > < span class = "w" >
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "w" > < / span > < span class = "nt" > imports< / span > < span class = "p" > :< / span > < span class = "w" >
2024-09-05 18:03:19 +00:00
< / span > < / span > < / span > < span class = "line" > < span class = "cl" > < span class = "w" > < / span > - < span class = "nt" > path< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "l" > github.com/McShelby/hugo-theme-relearn< / span > < / span > < / span > < / code > < / pre > < / div >
< / div >
2024-04-22 19:14:35 +00:00
< / div >
< div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
< div class = "tab-content-text" >
< div class = "highlight wrap-code" > < 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 = "nt" > " module" < / span > < span class = "p" > :< / span > < span class = "p" > {< / span >
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nt" > " imports" < / span > < span class = "p" > :< / 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 = "nt" > " path" < / span > < span class = "p" > :< / span > < span class = "s2" > " github.com/McShelby/hugo-theme-relearn" < / 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 >
2024-09-05 18:03:19 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > }< / span > < / span > < / span > < / code > < / pre > < / div >
< / div >
2024-04-22 19:14:35 +00:00
< / div >
< / div >
< / div >
< h3 id = "using-git-submodules" > Using Git Submodules< / h3 >
< p > If you plan to store your project in a git repository you can create one with:< / p >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > git init< / span > < / span > < / code > < / pre > < / div >
< p > Now add the theme as a submodule by:< / p >
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > git submodule add --depth < span class = "m" > 1< / span > https://github.com/McShelby/hugo-theme-relearn.git themes/hugo-theme-relearn< / span > < / span > < / code > < / pre > < / div >
< p > Afterwards add this at the end of your < code > hugo.toml< / code > .< / p >
2024-03-02 10:05:50 +00:00
< div class = "tab-panel" data-tab-group = "config-code" >
< div class = "tab-nav" >
< div class = "tab-nav-title" > hugo.< / div >
< button
data-tab-item="toml"
class="tab-nav-button tab-panel-style cstyle initial active" tabindex="-1"
onclick="switchTab('config-code','toml')"
>
< span class = "tab-nav-text" > toml< / span >
< / button >
< button
data-tab-item="yaml"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','yaml')"
>
< span class = "tab-nav-text" > yaml< / span >
< / button >
< button
data-tab-item="json"
class="tab-nav-button tab-panel-style cstyle initial"
onclick="switchTab('config-code','json')"
>
< span class = "tab-nav-text" > json< / span >
< / button >
< / div >
< div class = "tab-content-container" >
< div
data-tab-item="toml"
class="tab-content tab-panel-style cstyle initial active">
< div class = "tab-content-text" >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-toml" data-lang = "toml" > < span class = "line" > < span class = "cl" > < span class = "nx" > theme< / span > < span class = "p" > =< / span > < span class = "s1" > ' hugo-theme-relearn' < / span > < / span > < / span > < / code > < / pre > < / div >
< / div >
2024-03-02 10:05:50 +00:00
< / div >
< div
data-tab-item="yaml"
class="tab-content tab-panel-style cstyle initial">
< div class = "tab-content-text" >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-yaml" data-lang = "yaml" > < span class = "line" > < span class = "cl" > < span class = "nt" > theme< / span > < span class = "p" > :< / span > < span class = "w" > < / span > < span class = "l" > hugo-theme-relearn< / span > < / span > < / span > < / code > < / pre > < / div >
< / div >
2024-03-02 10:05:50 +00:00
< / div >
< div
data-tab-item="json"
class="tab-content tab-panel-style cstyle initial">
< div class = "tab-content-text" >
2024-03-11 20:44:09 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-json" data-lang = "json" > < span class = "line" > < span class = "cl" > < span class = "p" > {< / span >
2024-03-02 10:05:50 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "nt" > " theme" < / span > < span class = "p" > :< / span > < span class = "s2" > " hugo-theme-relearn" < / span >
2024-09-05 18:03:19 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > < span class = "p" > }< / span > < / span > < / span > < / code > < / pre > < / div >
< / div >
2024-03-02 10:05:50 +00:00
< / div >
< / div >
< / div >
2024-03-15 20:10:54 +00:00
< h2 id = "create-your-home-page" > Create your Home Page< / h2 >
2024-04-22 19:14:35 +00:00
< p > If you don’ t create a home page, yet, the theme will generate a placeholder text with instructions on how to proceed.< / p >
< p > Start your journey by creating a home page:< / p >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < 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 > The newly created home page < code > content/_index.md< / code > is empty and you obviously should add some meaningful content.< / p >
2024-03-15 20:10:54 +00:00
< h2 id = "create-your-first-chapter-page" > Create your First Chapter Page< / h2 >
2024-04-22 19:14:35 +00:00
< p > Chapters are meant to be top level pages that contain other child pages. They have a special layout style and often just contain the < em > title< / em > and a < em > brief abstract< / em > of the section.< / p >
< p > Now create your first chapter page with the following command:< / p >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo new --kind chapter basics/_index.md< / span > < / span > < / code > < / pre > < / div >
< p > When opening the newly created file < code > content/basics/_index.md< / code > , you should see the < code > weight< / code > frontmatter with a number. This will be used to generate the subtitle of the chapter page, and should be set to a consecutive value starting at < code > 1< / code > for each chapter level.< / p >
2024-03-15 20:10:54 +00:00
< h2 id = "create-your-first-content-pages" > Create your First Content Pages< / h2 >
2024-04-22 19:14:35 +00:00
< p > Then create content pages inside the previously created chapter. Here are three ways to create content in the chapter:< / p >
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo new basics/first-content/_index.md
< / span > < / span > < span class = "line" > < span class = "cl" > hugo new basics/second-content/index.md
2024-09-05 18:03:19 +00:00
< / span > < / span > < span class = "line" > < span class = "cl" > hugo new basics/third-content.md< / span > < / span > < / code > < / pre > < / div >
< p > Feel free to edit those files by adding some sample content and replacing the < code > title< / code > value in the beginning of the files.< / p >
2024-04-22 19:14:35 +00:00
< div class = "box notices cstyle note" >
2024-09-01 11:58:33 +00:00
< div class = "box-label" >
< i class = "fa-fw fas fa-exclamation-circle" > < / i > Note
< / div >
2024-04-22 19:14:35 +00:00
< div class = "box-content" >
< p > Please note that Hugo overrides the default archetype template coming with this theme when using < code > hugo new site my-new-site< / code > . To actually see your page later, you have to remove the < code > draft=true< / code > from the page’ s frontmatter.< / p >
2024-09-05 18:03:19 +00:00
< / div >
2024-04-22 19:14:35 +00:00
< / div >
< h2 id = "testing-your-website-locally" > Testing your Website Locally< / h2 >
< p > Launch your new web site by using the following command:< / p >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo serve< / span > < / span > < / code > < / pre > < / div >
< p > Go to < a href = "http://localhost:1313" rel = "external" target = "_self" > < code > http://localhost:1313< / code > < / a > in your browser.< / p >
2024-04-22 19:14:35 +00:00
< p > You should notice a few things:< / p >
2022-04-02 13:30:16 +00:00
< ol >
2024-04-22 19:14:35 +00:00
< li > The home page contains your provided text.< / li >
< li > You have the menu < strong > Basics< / strong > in the sidebar. Clicking on it reveals three submenus with names equal to the < code > title< / code > properties in the previously created content pages.< / li >
< li > While you are running < code > hugo serve< / code > your page refreshes automatically when you change a content page. Neat!< / li >
2022-04-02 13:30:16 +00:00
< / ol >
2024-04-22 19:14:35 +00:00
< h2 id = "build-and-deploy-your-website" > Build and Deploy your Website< / h2 >
2024-04-22 19:29:49 +00:00
< p > When your site is ready to be deployed, run the following command:< / p >
2024-09-05 18:03:19 +00:00
< div class = "highlight wrap-code" > < pre tabindex = "0" class = "chroma" > < code class = "language-shell" data-lang = "shell" > < span class = "line" > < span class = "cl" > hugo< / span > < / span > < / code > < / pre > < / div >
< p > A < code > public< / code > directory will be generated, containing all content and assets for your web site.< / p >
2024-04-22 19:14:35 +00:00
< p > It now can be deployed to any web server by simply uploading its contents or you can check out one of < a href = "https://gohugo.io/hosting-and-deployment/" rel = "external" target = "_self" > Hugo’ s many other deployment options< / a > .< / p >
2024-04-22 19:34:38 +00:00
< div class = "box notices cstyle note" >
2024-09-01 11:58:33 +00:00
< div class = "box-label" >
< i class = "fa-fw fas fa-exclamation-circle" > < / i > Note
< / div >
2024-04-22 19:34:38 +00:00
< div class = "box-content" >
2024-04-22 19:29:49 +00:00
< p > If you are storing your web site in git, commit all but the < code > public< / code > directory.< / p >
2024-09-05 18:03:19 +00:00
< / div >
2024-04-22 19:34:38 +00:00
< / div >
2022-04-02 13:30:16 +00:00
< footer class = "footline" >
< / footer >
< / article >
2023-05-17 22:13:41 +00:00
2022-04-02 13:30:16 +00:00
< / div >
< / main >
< / div >
2024-09-05 18:03:19 +00:00
< script src = "/hugo-theme-relearn/js/clipboard.min.js?1725559392" defer > < / script >
< script src = "/hugo-theme-relearn/js/perfect-scrollbar.min.js?1725559392" defer > < / script >
< script src = "/hugo-theme-relearn/js/theme.js?1725559392" defer > < / script >
2022-04-02 13:30:16 +00:00
< / body >
< / html >