--- /dev/null
+/.idea
+/.vscode
+/public
++/dist
+node_modules
+nohup.out
+.DS_Store
+trace.out
+.hugo_build.lock
+resources/_gen/images/
--- /dev/null
- name = "Linode"
- link = "https://www.linode.com/"
- logo = "/images/sponsors/linode-logo_standard_light_medium.png"
- copy = ""
+[[banners]]
- name = "eSolia"
- link = "https://esolia.com/post/why-did-esolia-choose-hugo/"
- logo = "/images/sponsors/esolia-logo.svg"
- copy = ""
-
++ name = "Linode"
++ link = "https://www.linode.com/"
++ logo = "/images/sponsors/linode-logo_standard_light_medium.png"
++ copy = ""
+
+[[banners]]
- name = "Brave"
- link = "https://brave.com/"
- logo = "/images/sponsors/brave-logo.svg"
- bgcolor = "#5A2FA1"
- copy = ""
++ name = "eSolia"
++ link = "https://esolia.com/post/why-did-esolia-choose-hugo/"
++ logo = "/images/sponsors/esolia-logo.svg"
++ copy = ""
+
+[[banners]]
++ name = "BEP Consulting"
++ link = "https://bep.consulting"
++ logo = "/images/sponsors/bep-consulting.svg"
++ bgcolor = "#004887"
++ copy = ""
--- /dev/null
- {{ if .Page.Store.Get "hasMermaid" }}
- <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
- <script>
- mermaid.initialize({ startOnLoad: true });
- </script>
- {{ end }}
-
-
+<!DOCTYPE html>
+<html class="no-js" lang="{{ with $.Site.LanguageCode }}{{ . }}{{ else }}en-us{{ end }}">
+
+<head>
+ <meta charset="utf-8">
+ {{/* https://www.zachleat.com/web/preload/ */}}
+ <link rel="preload" href="{{ "fonts/muli-latin-200.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
+ <link rel="preload" href="{{ "fonts/muli-latin-400.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
+ <link rel="preload" href="{{ "fonts/muli-latin-800.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
+
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ {{/* NOTE: the Site's title, and if there is a page title, that is set too */}}
+ <title>{{ block "title" . }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
+
+ <meta name="viewport" content="width=device-width,minimum-scale=1">
+ {{ hugo.Generator }}
+
+ {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
+ <meta name="robots" content="index, follow">
+ {{ else }}
+ <meta name="robots" content="noindex, nofollow">
+ {{ end }}
+
+ {{ range .AlternativeOutputFormats -}}
+ <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
+ {{ end -}}
+
+ {{ $isDev := eq hugo.Environment "development" }}
+ {{ $stylesheet := resources.Get "output/css/app.css" }}
+ {{ if not $isDev }}
+ {{ $stylesheet = $stylesheet | minify | fingerprint }}
+ {{ end }}
+ {{ with $stylesheet }}
+ {{ if $isDev }}
+ <link rel="stylesheet" href="{{ .RelPermalink }}" crossorigin="anonymous">
+ {{ else }}
+ <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
+ {{ end }}
+ {{ $.Scratch.Set "stylesheet" . }}
+ {{end}}
+
+ <meta name="description"
+ content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
+
+ {{ block "scripts" . }}
+ {{- partial "site-scripts.html" . -}}
+ {{ end }}
+ {{ partial "site-manifest.html" . }}
+ {{- partial "head-additions.html" . -}}
+ {{- partial "opengraph/opengraph.html" . -}}
+ {{- template "_internal/schema.html" . -}}
+ {{- partial "opengraph/twitter_cards.html" . -}}
+
+ {{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
+ {{ partial "gtag" . }}
+ {{ end }}
+
+</head>
+
+<body class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}">
+ {{ partial "hooks/after-body-start" . }}
+ {{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }}
+ {{ block "header" . }}{{ end }}
+ <main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns">
+ {{ block "main" . }}{{ end }}
+ </main>
+
+ {{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }}
+
+ {{ partial "hooks/before-body-end" . }}
+
+
+</body>
+
+</html>
--- /dev/null
--- /dev/null
++<svg width="158" height="160" viewBox="0 0 158 160" fill="none" xmlns="http://www.w3.org/2000/svg">
++<path d="M4.32 103V27.64H17.664V54.616C18.752 54.04 20 53.56 21.408 53.176C22.816 52.728 24.192 52.376 25.536 52.12C26.88 51.864 28.192 51.672 29.472 51.544C30.816 51.352 32.032 51.256 33.12 51.256C35.872 51.256 38.24 51.704 40.224 52.6C42.272 53.432 43.904 54.584 45.12 56.056C46.336 57.464 47.296 59.32 48 61.624C48.704 63.928 49.152 66.328 49.344 68.824C49.6 71.32 49.728 74.296 49.728 77.752C49.728 86.008 48.448 92.376 45.888 96.856C43.328 101.336 39.072 103.576 33.12 103.576C30.368 103.576 27.584 103 24.768 101.848C21.952 100.696 19.616 99.352 17.76 97.816L15.36 103H4.32ZM17.76 88.984C21.024 91.032 24.992 92.056 29.664 92.056C31.136 92.056 32.352 91.64 33.312 90.808C34.272 89.912 35.008 88.376 35.52 86.2C36.032 83.96 36.288 80.984 36.288 77.272C36.288 73.048 36 69.784 35.424 67.48C34.912 65.176 34.208 63.672 33.312 62.968C32.416 62.2 31.2 61.816 29.664 61.816C27.296 61.816 25.152 61.976 23.232 62.296C21.312 62.552 19.488 63.032 17.76 63.736V88.984ZM56.8958 77.272C56.8958 72.856 57.1518 69.176 57.6638 66.232C58.2398 63.224 59.0398 60.76 60.0638 58.84C61.0878 56.856 62.5278 55.352 64.3838 54.328C66.2398 53.304 68.2878 52.6 70.5278 52.216C72.8318 51.832 75.7118 51.64 79.1678 51.64C81.4718 51.64 83.4238 51.704 85.0238 51.832C86.6238 51.896 88.2238 52.088 89.8238 52.408C91.4878 52.664 92.8318 53.08 93.8558 53.656C94.8798 54.168 95.8718 54.904 96.8318 55.864C97.7918 56.76 98.5278 57.88 99.0398 59.224C99.6158 60.504 100.032 62.072 100.288 63.928C100.608 65.72 100.768 67.8 100.768 70.168C100.768 74.648 99.5838 77.912 97.2158 79.96C94.8478 82.008 91.2958 83.032 86.5598 83.032H70.3358C70.3358 85.976 70.7518 88.184 71.5838 89.656C72.4798 91.064 73.5678 91.928 74.8478 92.248C76.1918 92.568 78.2718 92.728 81.0878 92.728C88.9598 92.728 95.1998 92.376 99.8078 91.672V100.792C95.0078 102.584 86.3038 103.48 73.6958 103.48C70.4318 103.48 67.7118 103 65.5358 102.04C63.4238 101.08 61.7278 99.512 60.4478 97.336C59.1678 95.16 58.2398 92.472 57.6638 89.272C57.1518 86.072 56.8958 82.072 56.8958 77.272ZM70.3358 73.336H83.1038C85.9198 73.336 87.3278 72.056 87.3278 69.496C87.3278 66.296 86.8798 64.248 85.9838 63.352C85.1518 62.392 83.1358 61.912 79.9358 61.912C77.8878 61.912 76.3518 62.008 75.3278 62.2C74.3678 62.328 73.4078 62.776 72.4478 63.544C71.5518 64.248 70.9438 65.368 70.6238 66.904C70.3678 68.44 70.2718 70.584 70.3358 73.336ZM108.101 128.92V52.024H119.141L121.445 57.112C123.301 55.64 125.637 54.328 128.453 53.176C131.333 52.024 134.149 51.448 136.901 51.448C139.397 51.448 141.573 51.864 143.429 52.696C145.349 53.528 146.917 54.68 148.133 56.152C149.413 57.624 150.469 59.448 151.301 61.624C152.133 63.8 152.709 66.168 153.029 68.728C153.349 71.288 153.509 74.136 153.509 77.272C153.509 79.896 153.413 82.264 153.221 84.376C153.093 86.488 152.805 88.6 152.357 90.712C151.909 92.76 151.269 94.552 150.437 96.088C149.669 97.624 148.677 99 147.461 100.216C146.309 101.368 144.837 102.264 143.045 102.904C141.253 103.48 139.205 103.768 136.901 103.768C134.597 103.768 132.005 103.48 129.125 102.904C126.245 102.264 123.685 101.464 121.445 100.504V128.92H108.101ZM121.445 91.288C124.773 92.568 128.773 93.208 133.445 93.208C134.981 93.208 136.197 92.856 137.093 92.152C137.989 91.384 138.693 89.848 139.205 87.544C139.781 85.24 140.069 82.008 140.069 77.848C140.069 72.344 139.525 68.504 138.437 66.328C137.349 64.088 135.685 62.968 133.445 62.968C128.709 62.968 124.709 63.992 121.445 66.04V91.288Z" fill="white"/>
++</svg>
--- /dev/null
--- /dev/null
++<svg width="298" height="144" viewBox="0 0 298 144" fill="none" xmlns="http://www.w3.org/2000/svg">
++<path d="M92.056 39.544H86.68L68.536 66.616V80.056H78.712V91H46.072V80.056H55.672V66.52L36.952 39.544H31.384V28.6H57.208V39.544H52.024L62.488 55.288H63.064L73.432 39.544H67.48V28.6H92.056V39.544ZM134.601 69.4C134.601 76.248 132.361 81.72 127.881 85.816C123.401 89.912 117.705 91.96 110.793 91.96C104.137 91.96 98.6965 90.04 94.4725 86.2C90.3125 82.296 88.2325 76.856 88.2325 69.88C88.2325 63.544 90.1525 58.104 93.9925 53.56C97.8325 49.016 103.657 46.744 111.465 46.744C119.273 46.744 125.065 49.016 128.841 53.56C132.681 58.04 134.601 63.32 134.601 69.4ZM121.833 69.016C121.833 64.6 120.809 61.368 118.761 59.32C116.713 57.272 114.217 56.248 111.273 56.248C108.073 56.248 105.545 57.4 103.689 59.704C101.897 61.944 101.001 65.112 101.001 69.208C101.001 72.92 101.833 76.056 103.497 78.616C105.225 81.176 107.785 82.456 111.177 82.456C114.377 82.456 116.937 81.272 118.857 78.904C120.841 76.472 121.833 73.176 121.833 69.016ZM191.379 91H172.755V84.376C169.875 89.368 165.235 91.864 158.835 91.864C154.739 91.864 151.187 90.648 148.179 88.216C145.171 85.784 143.667 82.008 143.667 76.888V57.016H137.907V47.704H156.051V72.088C156.051 75.864 156.659 78.552 157.875 80.152C159.155 81.688 161.011 82.456 163.443 82.456C166.387 82.456 168.659 81.496 170.259 79.576C171.923 77.656 172.755 75.192 172.755 72.184V57.016H165.747V47.704H185.139V81.688H191.379V91ZM222.863 47.128C224.079 47.128 225.423 47.32 226.895 47.704C228.431 48.024 229.935 48.632 231.407 49.528L233.327 64.696L223.919 65.752L222.287 58.36C221.007 57.592 219.887 57.208 218.927 57.208C217.519 57.208 216.271 57.752 215.183 58.84C214.159 59.928 213.647 61.528 213.647 63.64V81.688H221.327V91H195.503V81.688H201.263V57.112H195.023V47.704H212.687V55.96C213.391 53.464 214.511 51.384 216.047 49.72C217.647 47.992 219.919 47.128 222.863 47.128Z" fill="white"/>
++<path d="M37.568 124.032C36.0747 125.44 33.9413 126.571 31.168 127.424C28.4373 128.235 25.6 128.64 22.656 128.64C16.64 128.64 11.6693 126.699 7.744 122.816C3.86133 118.891 1.92 113.856 1.92 107.712C1.92 104.256 2.64533 100.843 4.096 97.472C5.54667 94.1013 7.808 91.3067 10.88 89.088C13.952 86.8693 17.8773 85.76 22.656 85.76C26.1547 85.76 29.1413 86.2507 31.616 87.232C34.0907 88.2133 36.0533 89.3653 37.504 90.688L38.592 99.712L32.768 100.288L31.744 94.528C29.184 92.864 26.112 92.032 22.528 92.032C18.6027 92.032 15.4453 93.3973 13.056 96.128C10.7093 98.8587 9.536 102.592 9.536 107.328C9.536 112.277 10.7947 116.032 13.312 118.592C15.8293 121.109 19.136 122.368 23.232 122.368C26.6453 122.368 29.44 121.771 31.616 120.576L32.64 114.368L38.464 114.944L37.568 124.032ZM72.802 113.664C72.802 118.144 71.3727 121.771 68.514 124.544C65.698 127.275 62.0287 128.64 57.506 128.64C53.1113 128.64 49.57 127.317 46.882 124.672C44.2367 122.027 42.914 118.443 42.914 113.92C42.914 109.739 44.1727 106.155 46.69 103.168C49.2073 100.139 52.9407 98.624 57.89 98.624C62.882 98.624 66.6153 100.117 69.09 103.104C71.5647 106.091 72.802 109.611 72.802 113.664ZM65.698 113.472C65.698 110.4 64.9513 108.053 63.458 106.432C62.0073 104.811 60.1087 104 57.762 104C55.33 104 53.4313 104.875 52.066 106.624C50.7007 108.331 50.018 110.635 50.018 113.536C50.018 116.267 50.658 118.571 51.938 120.448C53.2607 122.325 55.202 123.264 57.762 123.264C60.2367 123.264 62.178 122.368 63.586 120.576C64.994 118.741 65.698 116.373 65.698 113.472ZM129.478 128H116.806V122.752H118.406V111.488C118.406 108.757 117.915 106.837 116.934 105.728C115.995 104.576 114.651 104 112.902 104C110.64 104 108.976 104.768 107.91 106.304C106.886 107.84 106.352 109.589 106.31 111.552V122.752H110.597V128H97.9255V122.752H99.4615V111.488C99.4615 108.757 98.9708 106.837 97.9895 105.728C97.0508 104.576 95.7282 104 94.0215 104C91.8028 104 90.1602 104.768 89.0935 106.304C88.0268 107.797 87.4722 109.525 87.4295 111.488V122.752H92.8055V128H76.2935V122.752H80.5815V104.576H76.3575V99.264H87.4295V104C88.3255 102.421 89.5202 101.141 91.0135 100.16C92.5068 99.1787 94.3202 98.688 96.4535 98.688C98.5868 98.688 100.507 99.2213 102.214 100.288C103.92 101.312 105.115 102.933 105.798 105.152C106.651 103.189 107.888 101.632 109.51 100.48C111.131 99.2853 113.115 98.688 115.462 98.688C118.064 98.688 120.347 99.52 122.31 101.184C124.272 102.848 125.254 105.451 125.254 108.992V122.752H129.478V128ZM164.428 112.896C164.428 116.992 163.34 120.64 161.164 123.84C159.03 127.04 155.724 128.64 151.244 128.64C147.105 128.64 144.097 127.147 142.22 124.16V136.256H147.916V141.632H131.084V136.256H135.372V104.512H130.892V99.264H142.22V104.96C143.03 103.253 144.204 101.781 145.74 100.544C147.318 99.3067 149.43 98.688 152.076 98.688C155.745 98.688 158.71 99.9467 160.972 102.464C163.276 104.939 164.428 108.416 164.428 112.896ZM157.324 113.6C157.324 110.528 156.62 108.203 155.212 106.624C153.804 105.003 152.012 104.192 149.836 104.192C147.532 104.192 145.718 105.067 144.396 106.816C143.073 108.565 142.369 110.613 142.284 112.96L142.22 115.2C142.22 117.589 142.902 119.509 144.268 120.96C145.676 122.411 147.468 123.136 149.644 123.136C152.076 123.136 153.953 122.283 155.276 120.576C156.641 118.869 157.324 116.544 157.324 113.6ZM170.922 101.376C173.055 100.352 174.954 99.648 176.618 99.264C178.282 98.88 180.202 98.688 182.378 98.688C185.578 98.688 188.202 99.4987 190.25 101.12C192.341 102.741 193.386 105.173 193.386 108.416V121.344C193.386 123.051 194.09 123.904 195.498 123.904C195.882 123.904 196.373 123.819 196.97 123.648L197.034 127.424C195.626 128.235 194.09 128.64 192.426 128.64C188.799 128.64 186.837 126.741 186.538 122.944V122.816C185.685 124.309 184.469 125.653 182.89 126.848C181.354 128.043 179.434 128.64 177.13 128.64C175.125 128.64 173.141 128.043 171.178 126.848C169.258 125.611 168.298 123.477 168.298 120.448C168.298 116.907 169.706 114.581 172.522 113.472C175.338 112.32 178.389 111.744 181.674 111.744C182.485 111.744 183.317 111.765 184.17 111.808C185.023 111.851 185.813 111.915 186.538 112V110.4C186.538 108.693 186.239 107.157 185.642 105.792C185.045 104.427 183.551 103.744 181.162 103.744C180.266 103.744 179.413 103.808 178.602 103.936C177.834 104.064 177.087 104.32 176.362 104.704L175.21 109.12L169.706 108.544L170.922 101.376ZM186.538 116.608V115.584C185.813 115.499 185.066 115.413 184.298 115.328C183.53 115.243 182.741 115.2 181.93 115.2C180.223 115.2 178.687 115.499 177.322 116.096C175.999 116.693 175.338 117.888 175.338 119.68C175.338 122.283 176.725 123.584 179.498 123.584C181.119 123.584 182.655 123.008 184.106 121.856C185.557 120.661 186.367 118.912 186.538 116.608ZM234.863 128H219.503V122.752H223.727V111.488C223.727 108.757 223.236 106.837 222.255 105.728C221.273 104.576 219.908 104 218.159 104C215.983 104 214.255 104.704 212.975 106.112C211.737 107.52 211.097 109.248 211.055 111.296V122.752H215.343V128H199.919V122.752H204.207V104.576H199.727V99.264H211.055V103.936C213.06 100.437 216.239 98.688 220.591 98.688C223.321 98.688 225.668 99.52 227.631 101.184C229.593 102.848 230.575 105.451 230.575 108.992V122.752H234.863V128ZM267.085 104.512H264.077L254.477 128L251.277 136.256H255.501V141.632H240.141V136.256H245.005L247.821 128.256L237.645 104.512H234.509V99.264H248.653V104.512H245.005L251.661 120.064H252.045L257.421 104.512H254.157V99.264H267.085V104.512ZM275.625 98.688L270.121 98.176L271.145 89.152C273.15 88.0427 275.22 87.2107 277.353 86.656C279.486 86.1013 281.449 85.824 283.241 85.824C286.825 85.824 289.812 86.6347 292.201 88.256C294.633 89.8347 295.849 92.032 295.849 94.848C295.849 97.024 295.209 98.7947 293.929 100.16C292.649 101.483 291.177 102.592 289.513 103.488C287.892 104.384 286.441 105.237 285.161 106.048C283.881 106.859 283.241 107.84 283.241 108.992C283.241 110.4 284.201 111.104 286.121 111.104V115.456C279.252 116.139 275.817 114.24 275.817 109.76C275.817 107.755 276.436 106.197 277.673 105.088C278.91 103.936 280.34 102.976 281.961 102.208C283.582 101.44 285.012 100.608 286.249 99.712C287.486 98.7733 288.105 97.536 288.105 96C288.105 93.3547 286.206 92.032 282.409 92.032C281.428 92.032 280.382 92.16 279.273 92.416C278.206 92.672 277.289 93.056 276.521 93.568L275.625 98.688ZM277.673 128V119.872H285.865V128H277.673Z" fill="white"/>
++</svg>
--- /dev/null
- # github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135
++# github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d
--- /dev/null
- lastmod: 2017-03-09
+---
+title: Comments
+linktitle: Comments
+description: Hugo ships with an internal Disqus template, but this isn't the only commenting system that will work with your new Hugo website.
+date: 2017-02-01
+publishdate: 2017-02-01
- * [Talkyard](https://www.talkyard.io/blog-comments) (Open source, & serverless hosting)
+keywords: [sections,content,organization]
+categories: [project organization, fundamentals]
+menu:
+ docs:
+ parent: "content-management"
+ weight: 140
+weight: 140 #rem
+draft: false
+aliases: [/extras/comments/]
+toc: true
+---
+
+Hugo ships with support for [Disqus](https://disqus.com/), a third-party service that provides comment and community capabilities to websites via JavaScript.
+
+Your theme may already support Disqus, but if not, it is easy to add to your templates via [Hugo's built-in Disqus partial][disquspartial].
+
+## Add Disqus
+
+Hugo comes with all the code you need to load Disqus into your templates. Before adding Disqus to your site, you'll need to [set up an account][disqussetup].
+
+### Configure Disqus
+
+Disqus comments require you set a single value in your [site's configuration file][configuration] like so:
+
+{{< code-toggle copy="false" >}}
+disqusShortname = "yourDisqusShortname"
+{{</ code-toggle >}}
+
+For many websites, this is enough configuration. However, you also have the option to set the following in the [front matter][] of a single content file:
+
+* `disqus_identifier`
+* `disqus_title`
+* `disqus_url`
+
+### Render Hugo's Built-in Disqus Partial Template
+
+Disqus has its own [internal template](https://gohugo.io/templates/internal/#disqus) available, to render it add the following code where you want comments to appear:
+
+```
+{{ template "_internal/disqus.html" . }}
+```
+
+## Alternatives
+
+These are some alternatives to Disqus:
+
+* [Cactus Comments](https://cactus.chat/docs/integrations/hugo/) (Open Source, Matrix appservice, Docker install)
+* [Commento](https://commento.io/) (Open Source, available as a service, local install, or docker image)
+* [Graph Comment](https://graphcomment.com/)
+* [Hyvor Talk](https://talk.hyvor.com/) (Available as a service)
+* [IntenseDebate](https://intensedebate.com/)
+* [Isso](https://posativ.org/isso/) (Self-hosted, Python) ([tutorial][issotutorial])
+* [Muut](https://muut.com/)
+* [Remark42](https://remark42.com/) (Open source, Golang, Easy to run docker)
+* [Staticman](https://staticman.net/)
++* [Talkyard](https://blog-comments.talkyard.io/) (Open source, & serverless hosting)
+* [Utterances](https://utteranc.es/) (Open source, GitHub comments widget built on GitHub issues)
+
+[configuration]: /getting-started/configuration/
+[disquspartial]: /templates/internal/#disqus
+[disqussetup]: https://disqus.com/profile/signup/
+[forum]: https://discourse.gohugo.io
+[front matter]: /content-management/front-matter/
+[kaijuissue]: https://github.com/spf13/kaiju/issues/new
+[issotutorial]: https://stiobhart.net/2017-02-24-isso-comments/
+[partials]: /templates/partials/
+[MongoDB]: https://www.mongodb.com/
+[tweet]: https://twitter.com/spf13
--- /dev/null
- To access an image as a page resource:
+---
+title: "Image Processing"
+description: "Resize, crop, rotate, filter, and convert images."
+date: 2018-01-24T13:10:00-05:00
+categories: ["content management"]
+keywords: [resources, images]
+weight: 4004
+draft: false
+toc: true
+menu:
+ docs:
+ parent: "content-management"
+ weight: 32
+---
+## Image Resources
+
+To process an image, you must access the image as either a page resource or a global resource.
+
+### Page Resources
+
+A page resource is a file within a [page bundle]. A page bundle is a directory with an `index.md` or `_index.md` file at its root.
+
+```text
+content/
+└── posts/
+ └── post-1/ <-- page bundle
+ ├── index.md
+ └── sunset.jpg <-- page resource
+```
+
++## The Image Resource
++
++The `image` resource gives you access to image-specific attributes like the picture's `Width` and `Height`, as well as powerful processing methods and filters. More on that below.
++
++Note that the `image` resource can also be retrieved from a [global resource]({{< relref "/hugo-pipes/introduction#from-file-to-resource" >}})
+
+```go-html-template
+{{ $image := .Resources.GetMatch "sunset.jpg" }}
+```
+
+### Global Resources
+
+A global resource is a file:
+
+- Within the `assets` directory, or
+- Within any directory [mounted] to the `assets` directory, or
+- Located on a remote server accessible via `http` or `https`
+
+```text
+assets/
+└── images/
+ └── sunset.jpg <-- global resource
+```
+
+To access a local image as a global resource:
+
+```go-html-template
+{{ $image := resources.Get "images/sunset.jpg" }}
+```
+
+To access a remote image as a global resource:
+
+```go-html-template
+{{ $image := resources.GetRemote "https://gohugo.io/img/hugo-logo.png" }}
+```
+
+## Image Rendering
+
+Once you have accessed an image as either a page resource or a global resource, render it in your templates using the `Permalink`, `RelPermalink`, `Width`, and `Height` properties.
+
+Example 1: Throws an error if the resource is not found.
+
+```go-html-template
+{{ $image := .Resources.GetMatch "sunset.jpg" }}
+<img src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
+```
+
+Example 2: Skips image rendering if the resource is not found.
+
+```go-html-template
+{{ $image := .Resources.GetMatch "sunset.jpg" }}
+{{ with $image }}
+ <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+{{ end }}
+```
+
+Example 3: A more concise way to skip image rendering if the resource is not found.
+
+```go-html-template
+{{ with .Resources.GetMatch "sunset.jpg" }}
+ <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+{{ end }}
+```
+
+## Image Processing Methods
+
+The `image` resource implements the `Resize`, `Fit`, `Fill`, `Crop`, `Filter`, and `Exif` methods.
+
+{{% note %}}
+Metadata (Exif, IPTC, XMP, etc.) is not preserved during image transformation. Use the`Exif` method with the _original_ image to extract Exif metadata from JPEG or TIFF images.
+{{% /note %}}
+
+### Resize
+
+Resize an image to the specified width and/or height.
+
+If you specify both width and height, the resulting image will be disproportionally scaled unless the original image has the same aspect ratio.
+
+```go-html-template
+{{/* Resize to a width of 600px and preserve aspect ratio */}}
+{{ $image := $image.Resize "600x" }}
+
+{{/* Resize to a height of 400px and preserve aspect ratio */}}
+{{ $image := $image.Resize "x400" }}
+
+{{/* Resize to a width of 600px and a height of 400px */}}
+{{ $image := $image.Resize "600x400" }}
+```
+
+### Fit
+
+Downscale an image to fit the given dimensions while maintaining aspect ratio. You must provide both width and height.
+
+```go-html-template
+{{ $image := $image.Fit "600x400" }}
+```
+
+### Fill
+
+Crop and resize an image to match the given dimensions. You must provide both width and height. Use the [`anchor`] option to change the crop box anchor point.
+
+```go-html-template
+{{ $image := $image.Fill "600x400" }}
+```
+
+### Crop
+
+Crop an image to match the given dimensions without resizing. You must provide both width and height. Use the [`anchor`] option to change the crop box anchor point.
+
+```go-html-template
+{{ $image := $image.Crop "600x400" }}
+```
+
+### Filter
+
+Apply one or more [filters] to an image.
+
+```go-html-template
+{{ $image := $image.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
+```
+
+Write this in a more functional style using pipes. Hugo applies the filters in the order given.
+
+```go-html-template
+{{ $image := $image | images.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
+```
+
+Sometimes it can be useful to create the filter chain once and then reuse it.
+
+```go-html-template
+{{ $filters := slice (images.GaussianBlur 6) (images.Pixelate 8) }}
+{{ $image1 := $image1.Filter $filters }}
+{{ $image2 := $image2.Filter $filters }}
+```
+
+### Exif
+
+Provides an [Exif] object containing image metadata.
+
+You may access Exif data in JPEG and TIFF images. To prevent errors when processing images without Exif data, wrap the access in a `with` statement.
+
+```go-html-template
+{{ with $image.Exif }}
+ Date: {{ .Date }}
+ Lat/Long: {{ .Lat }}/{{ .Long }}
+ Tags:
+ {{ range $k, $v := .Tags }}
+ TAG: {{ $k }}: {{ $v }}
+ {{ end }}
+{{ end }}
+```
+
+You may also access Exif fields individually, using the [`lang.FormatNumber`] function to format the fields as needed.
+
+```go-html-template
+{{ with $image.Exif }}
+ <ul>
+ {{ with .Date }}<li>Date: {{ .Format "January 02, 2006" }}</li>{{ end }}
+ {{ with .Tags.ApertureValue }}<li>Aperture: {{ lang.FormatNumber 2 . }}</li>{{ end }}
+ {{ with .Tags.BrightnessValue }}<li>Brightness: {{ lang.FormatNumber 2 . }}</li>{{ end }}
+ {{ with .Tags.ExposureTime }}<li>Exposure Time: {{ . }}</li>{{ end }}
+ {{ with .Tags.FNumber }}<li>F Number: {{ . }}</li>{{ end }}
+ {{ with .Tags.FocalLength }}<li>Focal Length: {{ . }}</li>{{ end }}
+ {{ with .Tags.ISOSpeedRatings }}<li>ISO Speed Ratings: {{ . }}</li>{{ end }}
+ {{ with .Tags.LensModel }}<li>Lens Model: {{ . }}</li>{{ end }}
+ </ul>
+{{ end }}
+```
+
+#### Exif Variables
+
+.Date
+: Image creation date/time. Format with the [time.Format] function.
+
+.Lat
+: GPS latitude in degrees.
+
+.Long
+: GPS longitude in degrees.
+
+.Tags
+: A collection of the available Exif tags for this image. You may include or exclude specific tags from this collection in the [site configuration](#exif-data).
+
+## Image Processing Options
+
+The `Resize`, `Fit`, `Fill`, and `Crop` methods accept a space-separated, case-insensitive list of options. The order of the options within the list is irrelevant.
+
+### Dimensions
+
+With the `Resize` method you must specify width, height, or both. The `Fit`, `Fill`, and `Crop` methods require both width and height. All dimensions are in pixels.
+
+```go-html-template
+{{ $image := $image.Resize "600x" }}
+{{ $image := $image.Resize "x400" }}
+{{ $image := $image.Resize "600x400" }}
+{{ $image := $image.Fit "600x400" }}
+{{ $image := $image.Fill "600x400" }}
+{{ $image := $image.Crop "600x400" }}
+```
+
+### Rotation
+
+Rotates an image counter-clockwise by the given angle. Hugo performs rotation _before_ scaling. For example, if the original image is 600x400 and you wish to rotate the image 90 degrees counter-clockwise while scaling it by 50%:
+
+```go-html-template
+{{ $image = $image.Resize "200x r90" }}
+```
+
+In the example above, the width represents the desired width _after_ rotation.
+
+To rotate an image without scaling, use the dimensions of the original image:
+
+```go-html-template
+{{ with .Resources.GetMatch "sunset.jpg" }}
+ {{ with .Resize (printf "%dx%d r90" .Height .Width) }}
+ <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+ {{ end }}
+{{ end }}
+```
+
+In the example above, on the second line, we have reversed width and height to reflect the desired dimensions _after_ rotation.
+
+### Anchor
+
+When using the `Crop` or `Fill` method, the _anchor_ determines the placement of the crop box. You may specify `TopLeft`, `Top`, `TopRight`, `Left`, `Center`,`Right`, `BottomLeft`, `Bottom`, `BottomRight`, or `Smart`.
+
+The default value is `Smart`, which uses [Smartcrop] image analysis to determine the optimal placement of the crop box. You may override the default value in the [site configuration](#processing-options).
+
+For example, if you have a 400x200 image with a bird in the upper left quadrant, you can create a 200x100 thumbnail containing the bird:
+
+```go-html-template
+{{ $image.Crop "200x100 TopLeft" }}
+```
+
+If you apply rotation when using the `Crop` or `Fill` method, specify the anchor relative to the rotated image.
+
+### Target Format
+
+By default, Hugo encodes the image in the source format. You may convert the image to another format by specifying `bmp`, `gif`, `jpeg`, `jpg`, `png`, `tif`, `tiff`, or `webp`.
+
+```go-html-template
+{{ $image.Resize "600x webp" }}
+```
+
+To convert an image without scaling, use the dimensions of the original image:
+
+```go-html-template
+{{ with .Resources.GetMatch "sunset.jpg" }}
+ {{ with .Resize (printf "%dx%d webp" .Width .Height) }}
+ <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
+ {{ end }}
+{{ end }}
+```
+
+### Quality
+
+Applicable to JPEG and WebP images, the `q` value determines the quality of the converted image. Higher values produce better quality images, while lower values produce smaller files. Set this value to a whole number between 1 and 100, inclusive.
+
+The default value is 75. You may override the default value in the [site configuration](#processing-options).
+
+```go-html-template
+{{ $image.Resize "600x webp q50" }}
+```
+
+### Hint
+
+<!-- Specifies a libwebp preset, not a libwebp image hint. -->
+
+Applicable to WebP images, this option corresponds to a set of pre-defined encoding parameters.
+
+Value|Example
+:--|:--
+`drawing`|Hand or line drawing with high-contrast details
+`icon`|Small colorful image
+`photo`|Outdoor photograph with natural lighting
+`picture`|Indoor photograph such as a portrait
+`text`|Image that is primarily text
+
+The default value is `photo`. You may override the default value in the [site configuration](#processing-options).
+
+```go-html-template
+{{ $image.Resize "600x webp picture" }}
+```
+
+### Background Color
+
+When converting an image from a format that supports transparency (e.g., PNG) to a format that does _not_ support transparency (e.g., JPEG), you may specify the background color of the resulting image.
+
+Use either a 3-digit or a 6-digit hexadecimal color code (e.g., `#00f` or `#0000ff`).
+
+The default value is `#ffffff` (white). You may override the default value in the [site configuration](#processing-options).
+
+```go-html-template
+{{ $image.Resize "600x jpg #b31280" }}
+```
+
+### Resampling Filter
+
+You may specify the resampling filter used when resizing an image. Commonly used resampling filters include:
+
+Filter|Description
+:--|:--
+`Box`|Simple and fast averaging filter appropriate for downscaling
+`Lanczos`|High-quality resampling filter for photographic images yielding sharp results
+`CatmullRom`|Sharp cubic filter that is faster than the Lanczos filter while providing similar results
+`MitchellNetravali`|Cubic filter that produces smoother results with less ringing artifacts than CatmullRom
+`Linear`|Bilinear resampling filter, produces smooth output, faster than cubic filters
+`NearestNeighbor`|Fastest resampling filter, no antialiasing
+
+The default value is `Box`. You may override the default value in the [site configuration](#processing-options).
+
+```go-html-template
+{{ $image.Resize "600x400 Lanczos" }}
+```
+
+See [github.com/disintegration/imaging] for the complete list of resampling filters. If you wish to improve image quality at the expense of performance, you may wish to experiment with the alternative filters.
+
+## Image Processing Examples
+
+_The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_
+
+{{< imgproc sunset Resize "300x" />}}
+
+{{< imgproc sunset Fill "90x120 left" />}}
+
+{{< imgproc sunset Fill "90x120 right" />}}
+
+{{< imgproc sunset Fit "90x90" />}}
+
+{{< imgproc sunset Crop "250x250 center" />}}
+
+{{< imgproc sunset Resize "300x q10" />}}
+
+This is the shortcode used to generate the examples above:
+
+{{< code file="layouts/shortcodes/imgproc.html" >}}
+{{< readfile file="layouts/shortcodes/imgproc.html" >}}
+{{< /code >}}
+
+Call the shortcode from your markdown like this:
+
+```go-html-template
+{{</* imgproc sunset Resize "300x" /*/>}}
+```
+
+{{% note %}}
+Note the self-closing shortcode syntax above. You may call the `imgproc` shortcode with or without **inner content**.
+{{% /note %}}
+
+## Imaging Configuration
+
+### Processing Options
+
+Define an `imaging` section in your site configuration to set the default [image processing options](#image-processing-options).
+
+{{< code-toggle file="config" copy=true >}}
+[imaging]
+resampleFilter = "Box"
+quality = 75
+hint = "photo"
+anchor = "Smart"
+bgColor = "#ffffff"
+{{< /code-toggle >}}
+
+anchor
+: See image processing options: [anchor](#anchor).
+
+bgColor
+: See image processing options: [background color](#background-color).
+
+hint
+: See image processing options: [hint](#hint).
+
+quality
+: See image processing options: [quality](#quality).
+
+resampleFilter
+: See image processing options: [resampling filter](#resampling-filter).
+
+### Exif Data
+
+Define an `imaging.exif` section in your site configuration to control the availability of Exif data.
+
+{{< code-toggle file="config" copy=true >}}
+[imaging.exif]
+includeFields = ""
+excludeFields = ""
+disableDate = false
+disableLatLong = false
+{{< /code-toggle >}}
+
+disableDate
+: Hugo extracts the image creation date/time into `.Date`. Set this to `true` to disable. Default is `false`.
+
+disableLatLong
+: Hugo extracts the GPS latitude and longitude into `.Lat` and `.Long`. Set this to `true` to disable. Default is `false`.
+
+excludeFields
+: Regular expression matching the Exif tags to exclude from the `.Tags` collection. Default is `""`.
+
+includeFields
+: Regular expression matching the Exif tags to include in the `.Tags` collection. Default is `""`. To include all available tags, set this value to `".*"`.
+
+{{% note %}}
+To improve performance and decrease cache size, if you set neither `excludeFields` nor `includeFields`, Hugo excludes the following tags: `ColorSpace`, `Contrast`, `Exif`, `Exposure[M|P|B]`, `Flash`, `GPS`, `JPEG`, `Metering`, `Resolution`, `Saturation`, `Sensing`, `Sharp`, and `WhiteBalance`.
+{{% /note %}}
+
+## Smart Cropping of Images
+
+By default, Hugo uses the [Smartcrop] library when cropping images with the `Crop` or`Fill` methods. You can set the anchor point manually, but in most cases the `Smart` option will make a good choice.
+
+Examples using the sunset image from above:
+
+{{< imgproc sunset Fill "200x200 smart" />}}
+
+{{< imgproc sunset Crop "200x200 smart" />}}
+
+## Image Processing Performance Consideration
+
+Hugo caches processed images in the `resources` directory. If you include this directory in source control, Hugo will not have to regenerate the images in a CI/CD workflow (e.g., GitHub Pages, GitLab Pages, Netlify, etc.). This results in faster builds.
+
+If you change image processing methods or options, or if you rename or remove images, the `resources` directory will contain unused images. To remove the unused images, perform garbage collection with:
+
+```bash
+hugo --gc
+```
+
+[`anchor`]: {{< relref "content-management/image-processing#anchor" >}}
+[`lang.FormatNumber`]: {{< relref "functions/lang#langformatnumber" >}}
+[Exif]: <https://en.wikipedia.org/wiki/Exif>
+[filters]: {{< relref "functions/images" >}}
+[github.com/disintegration/imaging]: <https://github.com/disintegration/imaging#image-resizing>
+[mounted]: {{< relref "hugo-modules/configuration#module-config-mounts">}}
+[page bundle]: {{< relref "content-management/page-bundles" >}}
+[Smartcrop]: <https://github.com/muesli/smartcrop#smartcrop>
+[time.Format]: {{< relref "functions/dateformat" >}}
--- /dev/null
- lastmod: 2017-01-10
+---
+title: Multilingual Mode
+linktitle: Multilingual
+description: Hugo supports the creation of websites with multiple languages side by side.
+date: 2017-01-10
+publishdate: 2017-01-10
- In order to meet singular/plural requirement, you must pass a dictionary (map) with a numeric `.Count` property to the `i18n` function. The below example uses `.ReadingTime` variable which has a built-in `.Count` property.
+categories: [content management]
+keywords: [multilingual,i18n, internationalization]
+menu:
+ docs:
+ parent: "content-management"
+ weight: 150
+weight: 150 #rem
+draft: false
+aliases: [/content/multilingual/,/tutorials/create-a-multilingual-site/]
+toc: true
+---
+
+You should define the available languages in a `languages` section in your site configuration.
+
+> Also See [Hugo Multilingual Part 1: Content translation]
+
+## Configure Languages
+
+The following is an example of a site configuration for a multilingual Hugo project:
+
+{{< code-toggle file="config" >}}
+defaultContentLanguage = "en"
+copyright = "Everything is mine"
+
+[params]
+[params.navigation]
+help = "Help"
+
+[languages]
+[languages.en]
+title = "My blog"
+weight = 1
+[languages.en.params]
+linkedin = "https://linkedin.com/whoever"
+
+[languages.fr]
+title = "Mon blogue"
+weight = 2
+[languages.fr.params]
+linkedin = "https://linkedin.com/fr/whoever"
+[languages.fr.params.navigation]
+help = "Aide"
+
+[languages.ar]
+title = "مدونتي"
+weight = 2
+languagedirection = "rtl"
+
+[languages.pt-pt]
+title = "O meu blog"
+weight = 3
+{{< /code-toggle >}}
+
+Anything not defined in a `languages` block will fall back to the global value for that key (e.g., `copyright` for the English `en` language). This also works for `params`, as demonstrated with `help` above: You will get the value `Aide` in French and `Help` in all the languages without this parameter set.
+
+With the configuration above, all content, sitemap, RSS feeds, paginations,
+and taxonomy pages will be rendered below `/` in English (your default content language) and then below `/fr` in French.
+
+When working with front matter `Params` in [single page templates], omit the `params` in the key for the translation.
+
+`defaultContentLanguage` sets the project's default language. If not set, the default language will be `en`.
+
+If the default language needs to be rendered below its own language code (`/en`) like the others, set `defaultContentLanguageInSubdir: true`.
+
+Only the obvious non-global options can be overridden per language. Examples of global options are `baseURL`, `buildDrafts`, etc.
+
+**Please note:** use lowercase language codes, even when using regional languages (ie. use pt-pt instead of pt-PT). Currently Hugo language internals lowercase language codes, which can cause conflicts with settings like `defaultContentLanguage` which are not lowercased. Please track the evolution of this issue in [Hugo repository issue tracker](https://github.com/gohugoio/hugo/issues/7344)
+
+### Disable a Language
+
+You can disable one or more languages. This can be useful when working on a new translation.
+
+{{< code-toggle file="config" >}}
+disableLanguages = ["fr", "ja"]
+{{< /code-toggle >}}
+
+Note that you cannot disable the default content language.
+
+We kept this as a standalone setting to make it easier to set via [OS environment]:
+
+```bash
+HUGO_DISABLELANGUAGES="fr ja" hugo
+```
+
+If you have already a list of disabled languages in `config.toml`, you can enable them in development like this:
+
+```bash
+HUGO_DISABLELANGUAGES=" " hugo server
+```
+
+### Configure Multilingual Multihost
+
+From **Hugo 0.31** we support multiple languages in a multihost configuration. See [this issue](https://github.com/gohugoio/hugo/issues/4027) for details.
+
+This means that you can now configure a `baseURL` per `language`:
+
+> If a `baseURL` is set on the `language` level, then all languages must have one and they must all be different.
+
+Example:
+
+{{< code-toggle file="config" >}}
+[languages]
+[languages.fr]
+baseURL = "https://example.fr"
+languageName = "Français"
+weight = 1
+title = "En Français"
+
+[languages.en]
+baseURL = "https://example.com"
+languageName = "English"
+weight = 2
+title = "In English"
+{{</ code-toggle >}}
+
+With the above, the two sites will be generated into `public` with their own root:
+
+```text
+public
+├── en
+└── fr
+```
+
+**All URLs (i.e `.Permalink` etc.) will be generated from that root. So the English home page above will have its `.Permalink` set to `https://example.com/`.**
+
+When you run `hugo server` we will start multiple HTTP servers. You will typically see something like this in the console:
+
+```text
+Web Server is available at 127.0.0.1:1313 (bind address 127.0.0.1)
+Web Server is available at 127.0.0.1:1314 (bind address 127.0.0.1)
+Press Ctrl+C to stop
+```
+
+Live reload and `--navigateToChanged` between the servers work as expected.
+
+
+## Translate Your Content
+
+There are two ways to manage your content translations. Both ensure each page is assigned a language and is linked to its counterpart translations.
+
+### Translation by filename
+
+Considering the following example:
+
+1. `/content/about.en.md`
+2. `/content/about.fr.md`
+
+The first file is assigned the English language and is linked to the second.
+The second file is assigned the French language and is linked to the first.
+
+Their language is __assigned__ according to the language code added as a __suffix to the filename__.
+
+By having the same **path and base filename**, the content pieces are __linked__ together as translated pages.
+
+{{< note >}}
+If a file has no language code, it will be assigned the default language.
+{{</ note >}}
+
+### Translation by content directory
+
+This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` param.
+
+{{< code-toggle file="config" >}}
+languages:
+ en:
+ weight: 10
+ languageName: "English"
+ contentDir: "content/english"
+ fr:
+ weight: 20
+ languageName: "Français"
+ contentDir: "content/french"
+{{< /code-toggle >}}
+
+The value of `contentDir` can be any valid path -- even absolute path references. The only restriction is that the content directories cannot overlap.
+
+Considering the following example in conjunction with the configuration above:
+
+1. `/content/english/about.md`
+2. `/content/french/about.md`
+
+The first file is assigned the English language and is linked to the second.
+The second file is assigned the French language and is linked to the first.
+
+Their language is __assigned__ according to the content directory they are __placed__ in.
+
+By having the same **path and basename** (relative to their language content directory), the content pieces are __linked__ together as translated pages.
+
+### Bypassing default linking
+
+Any pages sharing the same `translationKey` set in front matter will be linked as translated pages regardless of basename or location.
+
+Considering the following example:
+
+1. `/content/about-us.en.md`
+2. `/content/om.nn.md`
+3. `/content/presentation/a-propos.fr.md`
+
+{{< code-toggle >}}
+translationKey: "about"
+{{< /code-toggle >}}
+
+By setting the `translationKey` front matter param to `about` in all three pages, they will be __linked__ as translated pages.
+
+### Localizing permalinks
+
+Because paths and filenames are used to handle linking, all translated pages will share the same URL (apart from the language subdirectory).
+
+To localize the URLs, the [`slug`]({{< ref "/content-management/organization/index.md#slug" >}}) or [`url`]({{< ref "/content-management/organization/index.md#url" >}}) front matter param can be set in any of the non-default language file.
+
+For example, a French translation (`content/about.fr.md`) can have its own localized slug.
+
+{{< code-toggle >}}
+Title: A Propos
+slug: "a-propos"
+{{< /code-toggle >}}
+
+At render, Hugo will build both `/about/` and `/fr/a-propos/` while maintaining their translation linking.
+
+{{% note %}}
+If using `url`, remember to include the language part as well: `/fr/compagnie/a-propos/`.
+{{%/ note %}}
+
+### Page Bundles
+
+To avoid the burden of having to duplicate files, each Page Bundle inherits the resources of its linked translated pages' bundles except for the content files (markdown files, html files etc...).
+
+Therefore, from within a template, the page will have access to the files from all linked pages' bundles.
+
+If, across the linked bundles, two or more files share the same basename, only one will be included and chosen as follows:
+
+* File from current language bundle, if present.
+* First file found across bundles by order of language `Weight`.
+
+{{% note %}}
+Page Bundle resources follow the same language assignment logic as content files, both by filename (`image.jpg`, `image.fr.jpg`) and by directory (`english/about/header.jpg`, `french/about/header.jpg`).
+{{%/ note %}}
+
+## Reference the Translated Content
+
+To create a list of links to translated content, use a template similar to the following:
+
+{{< code file="layouts/partials/i18nlist.html" >}}
+{{ if .IsTranslated }}
+<h4>{{ i18n "translations" }}</h4>
+<ul>
+ {{ range .Translations }}
+ <li>
+ <a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
+ </li>
+ {{ end }}
+</ul>
+{{ end }}
+{{< /code >}}
+
+The above can be put in a `partial` (i.e., inside `layouts/partials/`) and included in any template, whether a [single content page][contenttemplate] or the [homepage]. It will not print anything if there are no translations for a given page.
+
+The above also uses the [`i18n` function][i18func] described in the next section.
+
+### List All Available Languages
+
+`.AllTranslations` on a `Page` can be used to list all translations, including the page itself. On the home page it can be used to build a language navigator:
+
+{{< code file="layouts/partials/allLanguages.html" >}}
+<ul>
+{{ range $.Site.Home.AllTranslations }}
+<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
+{{ end }}
+</ul>
+{{< /code >}}
+
+## Translation of Strings
+
+Hugo uses [go-i18n] to support string translations. [See the project's source repository][go-i18n-source] to find tools that will help you manage your translation workflows.
+
+Translations are collected from the `themes/<THEME>/i18n/` folder (built into the theme), as well as translations present in `i18n/` at the root of your project. In the `i18n`, the translations will be merged and take precedence over what is in the theme folder. Language files should be named according to [RFC 5646] with names such as `en-US.toml`, `fr.toml`, etc.
+
+Artificial languages with private use subtags as defined in [RFC 5646 § 2.2.7](https://datatracker.ietf.org/doc/html/rfc5646#section-2.2.7) are also supported. You may omit the `art-x-` prefix for brevity. For example:
+
+```text
+art-x-hugolang
+hugolang
+```
+
+Private use subtags must not exceed 8 alphanumeric characters.
+
+### Query basic translation
+
+From within your templates, use the `i18n` function like this:
+
+```go-html-template
+{{ i18n "home" }}
+```
+
+The function will search for the `"home"` id:
+
+{{< code-toggle file="i18n/en-US" >}}
+[home]
+other = "Home"
+{{< /code-toggle >}}
+
+The result will be
+
+```text
+Home
+```
+
+### Query a flexible translation with variables
+
+Often you will want to use the page variables in the translation strings. To do so, pass the `.` context when calling `i18n`:
+
+```go-html-template
+{{ i18n "wordCount" . }}
+```
+
+The function will pass the `.` context to the `"wordCount"` id:
+
+{{< code-toggle file="i18n/en-US" >}}
+[wordCount]
+other = "This article has {{ .WordCount }} words."
+{{< /code-toggle >}}
+
+Assume `.WordCount` in the context has value is 101. The result will be:
+
+```text
+This article has 101 words.
+```
+
+### Query a singular/plural translation
+
- The function will read `.Count` from `.ReadingTime` and evaluate where the number is singular (`one`) or plural (`other`). After that, it will pass to `readingTime` id:
++In other to meet singular/plural requirement, you must pass a dictionary (map) with a numeric `.Count` property to the `i18n` function. The below example uses `.ReadingTime` variable which has a built-in `.Count` property.
+
+```go-html-template
+{{ i18n "readingTime" .ReadingTime }}
+```
+
- Assume `.ReadingTime.Count` in the context has value of 525600. The result will be:
++The function will read `.Count` from `.ReadingTime` and evaluate whether the number is singular (`one`) or plural (`other`). After that, it will pass to `readingTime` id in `i18n/en-US.toml` file:
+
+{{< code-toggle file="i18n/en-US" >}}
+[readingTime]
+one = "One minute to read"
+other = "{{.Count}} minutes to read"
+{{< /code-toggle >}}
+
- In case you need to pass custom data: (`(dict "Count" 25)` is minimum requirement)
++Assuming `.ReadingTime.Count` in the context has value is 525600. The result will be:
+
+```text
+525600 minutes to read
+```
+
+If `.ReadingTime.Count` in the context has value is 1. The result is:
+
+```text
+One minute to read
+```
+
++In case you need to pass a custom data: (`(dict "Count" numeric_value_only)` is minimum requirement)
+
+```go-html-template
+{{ i18n "readingTime" (dict "Count" 25 "FirstArgument" true "SecondArgument" false "Etc" "so on, so far") }}
+```
+
+## Localization
+
+The following localization examples assume your site's primary language is English, with translations to French and German.
+
+{{< code-toggle file="config" >}}
+defaultContentLang = 'en'
+
+[languages]
+[languages.en]
+contentDir = 'content/en'
+languageName = 'English'
+weight = 1
+[languages.fr]
+contentDir = 'content/fr'
+languageName = 'Français'
+weight = 2
+[languages.de]
+contentDir = 'content/de'
+languageName = 'Deutsch'
+weight = 3
+
+{{< /code-toggle >}}
+
+### Dates
+
+With this front matter:
+
+{{< code-toggle >}}
+date = 2021-11-03T12:34:56+01:00
+{{< /code-toggle >}}
+
+And this template code:
+
+```go-html-template
+{{ .Date | time.Format ":date_full" }}
+```
+
+The rendered page displays:
+
+Language|Value
+:--|:--
+English|Wednesday, November 3, 2021
+Français|mercredi 3 novembre 2021
+Deutsch|Mittwoch, 3. November 2021
+
+See [time.Format] for details.
+
+### Currency
+
+With this template code:
+
+```go-html-template
+{{ 512.5032 | lang.FormatCurrency 2 "USD" }}
+```
+
+The rendered page displays:
+
+Language|Value
+:--|:--
+English|$512.50
+Français|512,50 $US
+Deutsch|512,50 $
+
+See [lang.FormatCurrency] and [lang.FormatAccounting] for details.
+
+### Numbers
+
+With this template code:
+
+```go-html-template
+{{ 512.5032 | lang.FormatNumber 2 }}
+```
+
+The rendered page displays:
+
+Language|Value
+:--|:--
+English|512.50
+Français|512,50
+Deutsch|512,50
+
+See [lang.FormatNumber] and [lang.FormatNumberCustom] for details.
+
+### Percentages
+
+With this template code:
+
+```go-html-template
+{{ 512.5032 | lang.FormatPercent 2 }} ---> 512.50%
+```
+
+The rendered page displays:
+
+Language|Value
+:--|:--
+English|512.50%
+Français|512,50 %
+Deutsch|512,50 %
+
+See [lang.FormatPercent] for details.
+
+## Menus
+
+You can define your menus for each language independently. Creating multilingual menus works just like [creating regular menus][menus], except they're defined in language-specific blocks in the configuration file:
+
+{{< code-toggle file="config" >}}
+defaultContentLanguage = "en"
+
+[languages.en]
+weight = 0
+languageName = "English"
+
+[[languages.en.menu.main]]
+url = "/"
+name = "Home"
+weight = 0
+
+[languages.de]
+weight = 10
+languageName = "Deutsch"
+
+[[languages.de.menu.main]]
+url = "/"
+name = "Startseite"
+weight = 0
+{{< /code-toggle >}}
+
+The rendering of the main navigation works as usual. `.Site.Menus` will just contain the menu in the current language. Note that `absLangURL` below will link to the correct locale of your website. Without it, menu entries in all languages would link to the English version, since it's the default content language that resides in the root directory.
+
+```go-html-template
+<ul>
+ {{- $currentPage := . -}}
+ {{ range .Site.Menus.main -}}
+ <li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
+ <a href="{{ .URL | absLangURL }}">{{ .Name }}</a>
+ </li>
+ {{- end }}
+</ul>
+```
+
++### Dynamically localizing menus with i18n
++While customizing menus per language is useful, your config file can become hard to maintain if you have a lot of languages
++
++If your menus are the same in all languages (ie. if the only thing that changes is the translated name) you can use the `.Identifier` as a translation key for the menu name:
++
++{{< code-toggle file="config" >}}
++[[menu.main]]
++name = "About me"
++url = "about"
++weight = 1
++identifier = "about"
++{{< /code-toggle >}}
++
++You now need to specify the translations for the menu keys in the i18n files:
++
++{{< code file="i18n/pt.toml" >}}
++[about]
++other="Sobre mim"
++{{< /code >}}
++
++And do the appropriate changes in the menu code to use the `i18n` tag with the `.Identifier` as a key. You will also note that here we are using a `default` to fall back to `.Name`, in case the `.Identifier` key is also not present in the language specified in the `defaultContentLanguage` configuration.
++
++{{< code file="layouts/partials/menu.html" >}}
++<ul>
++ {{- $currentPage := . -}}
++ {{ range .Site.Menus.main -}}
++ <li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
++ <a href="{{ .URL | absLangURL }}">{{ i18n .Identifier | default .Name}}</a>
++ </li>
++ {{- end }}
++</ul>
++{{< /code >}}
++
++
+## Missing Translations
+
+If a string does not have a translation for the current language, Hugo will use the value from the default language. If no default value is set, an empty string will be shown.
+
+While translating a Hugo website, it can be handy to have a visual indicator of missing translations. The [`enableMissingTranslationPlaceholders` configuration option][config] will flag all untranslated strings with the placeholder `[i18n] identifier`, where `identifier` is the id of the missing translation.
+
+{{% note %}}
+Hugo will generate your website with these missing translation placeholders. It might not be suitable for production environments.
+{{% /note %}}
+
+For merging of content from other languages (i.e. missing content translations), see [lang.Merge].
+
+To track down missing translation strings, run Hugo with the `--printI18nWarnings` flag:
+
+```bash
+hugo --printI18nWarnings | grep i18n
+i18n|MISSING_TRANSLATION|en|wordCount
+```
+
+## Multilingual Themes support
+
+To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there is more than one language, URLs must meet the following criteria:
+
+* Come from the built-in `.Permalink` or `.RelPermalink`
+* Be constructed with the [`relLangURL` template function][rellangurl] or the [`absLangURL` template function][abslangurl] **OR** be prefixed with `{{ .LanguagePrefix }}`
+
+If there is more than one language defined, the `LanguagePrefix` variable will equal `/en` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string (and is therefore harmless for single-language Hugo websites).
+
++
++## Generate multilingual content with `hugo new`
++Currently, `hugo new` is not ready to support generating multilingual content. But there is a [proposal topic](https://github.com/gohugoio/hugo/issues/7732) about this in Github issue to discuss how it should work.
++
++
++
+[abslangurl]: /functions/abslangurl
+[config]: /getting-started/configuration/
+[contenttemplate]: /templates/single-page-templates/
+[go-i18n-source]: https://github.com/nicksnyder/go-i18n
+[go-i18n]: https://github.com/nicksnyder/go-i18n
+[homepage]: /templates/homepage/
+[Hugo Multilingual Part 1: Content translation]: https://regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/
+[i18func]: /functions/i18n/
+[lang.FormatAccounting]: /functions/lang/#langformataccounting
+[lang.FormatCurrency]: /functions/lang/#langformatcurrency
+[lang.FormatNumber]: /functions/lang/#langformatnumber
+[lang.FormatNumberCustom]: /functions/lang/#langformatnumbercustom
+[lang.FormatPercent]: /functions/lang/#langformatpercent
+[lang.Merge]: /functions/lang.merge/
+[menus]: /content-management/menus/
+[OS environment]: /getting-started/configuration/#configure-with-environment-variables
+[rellangurl]: /functions/rellangurl
+[RFC 5646]: https://tools.ietf.org/html/rfc5646
+[single page templates]: /templates/single-page-templates/
+[time.Format]: /functions/dateformat
--- /dev/null
- about
+---
+title : "Page Bundles"
+description : "Content organization using Page Bundles"
+date : 2018-01-24T13:09:00-05:00
+linktitle : "Page Bundles"
+keywords : ["page", "bundle", "leaf", "branch"]
+categories : ["content management"]
+toc : true
+menu :
+ docs:
+ identifier : "page-bundles"
+ parent : "content-management"
+ weight : 11
+---
+
+Page Bundles are a way to group [Page Resources](/content-management/page-resources/).
+
+A Page Bundle can be one of:
+
+- Leaf Bundle (leaf means it has no children)
+- Branch Bundle (home page, section, taxonomy terms, taxonomy list)
+
+| | Leaf Bundle | Branch Bundle |
+|-------------------------------------|----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Usage | Collection of content and attachments for single pages | Collection of attachments for section pages (home page, section, taxonomy terms, taxonomy list) |
+| Index file name | `index.md` [^fn:1] | `_index.md` [^fn:1] |
+| Allowed Resources | Page and non-page (like images, pdf, etc.) types | Only non-page (like images, pdf, etc.) types |
+| Where can the Resources live? | At any directory level within the leaf bundle directory. | Only in the directory level **of** the branch bundle directory i.e. the directory containing the `_index.md` ([ref](https://discourse.gohugo.io/t/question-about-content-folder-structure/11822/4?u=kaushalmodi)). |
+| Layout type | `single` | `list` |
+| Nesting | Does not allow nesting of more bundles under it | Allows nesting of leaf or branch bundles under it |
+| Example | `content/posts/my-post/index.md` | `content/posts/_index.md` |
+| Content from non-index page files... | Accessed only as page resources | Accessed only as regular pages |
+
+
+## Leaf Bundles {#leaf-bundles}
+
+A _Leaf Bundle_ is a directory at any hierarchy within the `content/`
+directory, that contains an **`index.md`** file.
+
+### Examples of Leaf Bundle organization {#examples-of-leaf-bundle-organization}
+
+```text
+content/
+├── about
+│ ├── index.md
+├── posts
+│ ├── my-post
+│ │ ├── content1.md
+│ │ ├── content2.md
+│ │ ├── image1.jpg
+│ │ ├── image2.png
+│ │ └── index.md
+│ └── my-other-post
+│ └── index.md
+│
+└── another-section
+ ├── ..
+ └── not-a-leaf-bundle
+ ├── ..
+ └── another-leaf-bundle
+ └── index.md
+```
+
+In the above example `content/` directory, there are four leaf
+bundles:
+
- my-post
++`about`
+: This leaf bundle is at the root level (directly under
+ `content` directory) and has only the `index.md`.
+
- image1
- : This image is a page resource of `my-post`
++`my-post`
+: This leaf bundle has the `index.md`, two other content
+ Markdown files and two image files.
+
- image2
- : This image is a page resource of `my-post`
- and only available in `my-post/index.md` resources.
++- image1, image2:
++These images are page resources of `my-post`
+ and only available in `my-post/index.md` resources.
+
- my-other-post
++- content1, content2:
++These content files are page resources of `my-post`
++ and only available in `my-post/index.md` resources.
++ They will **not** be rendered as individual pages.
+
- another-leaf-bundle
++`my-other-post`
+: This leaf bundle has only the `index.md`.
+
++`another-leaf-bundle`
+: This leaf bundle is nested under couple of
+ directories. This bundle also has only the `index.md`.
+
+{{% note %}}
+The hierarchy depth at which a leaf bundle is created does not matter,
+as long as it is not inside another **leaf** bundle.
+{{% /note %}}
+
+
+### Headless Bundle {#headless-bundle}
+
+A headless bundle is a bundle that is configured to not get published
+anywhere:
+
+- It will have no `Permalink` and no rendered HTML in `public/`.
+- It will not be part of `.Site.RegularPages`, etc.
+
+But you can get it by `.Site.GetPage`. Here is an example:
+
+```go-html-template
+{{ $headless := .Site.GetPage "/some-headless-bundle" }}
+{{ $reusablePages := $headless.Resources.Match "author*" }}
+<h2>Authors</h2>
+{{ range $reusablePages }}
+ <h3>{{ .Title }}</h3>
+ {{ .Content }}
+{{ end }}
+```
+
+_In this example, we are assuming the `some-headless-bundle` to be a headless
+ bundle containing one or more **page** resources whose `.Name` matches
+ `"author*"`._
+
+Explanation of the above example:
+
+1. Get the `some-headless-bundle` Page "object".
+2. Collect a *slice* of resources in this *Page Bundle* that matches
+ `"author*"` using `.Resources.Match`.
+3. Loop through that *slice* of nested pages, and output their `.Title` and
+ `.Content`.
+
+---
+
+A leaf bundle can be made headless by adding below in the Front Matter
+(in the `index.md`):
+
+```toml
+headless = true
+```
+
+There are many use cases of such headless page bundles:
+
+- Shared media galleries
+- Reusable page content "snippets"
+
+
+## Branch Bundles {#branch-bundles}
+
+A _Branch Bundle_ is any directory at any hierarchy within the
+`content/` directory, that contains at least an **`_index.md`** file.
+
+This `_index.md` can also be directly under the `content/` directory.
+
+{{% note %}}
+Here `md` (markdown) is used just as an example. You can use any file
+type as a content resource as long as it is a content type recognized by Hugo.
+{{% /note %}}
+
+
+### Examples of Branch Bundle organization {#examples-of-branch-bundle-organization}
+
+```text
+content/
+├── branch-bundle-1
+│ ├── branch-content1.md
+│ ├── branch-content2.md
+│ ├── image1.jpg
+│ ├── image2.png
+│ └── _index.md
+└── branch-bundle-2
+ ├── _index.md
+ └── a-leaf-bundle
+ └── index.md
+```
+
+In the above example `content/` directory, there are two branch
+bundles (and a leaf bundle):
+
+`branch-bundle-1`
+: This branch bundle has the `_index.md`, two
+ other content Markdown files and two image files.
+
+`branch-bundle-2`
+: This branch bundle has the `_index.md` and a
+ nested leaf bundle.
+
+{{% note %}}
+The hierarchy depth at which a branch bundle is created does not
+matter.
+{{% /note %}}
+
+[^fn:1]: The `.md` extension is just an example. The extension can be `.html`, `.json` or any valid MIME type.
--- /dev/null
- The methods `Match` and `GetMatch` use `Name` to match the resources.
+---
+title : "Page Resources"
+description : "Page resources -- images, other pages, documents, etc. -- have page-relative URLs and their own metadata."
+date: 2018-01-24
+categories: ["content management"]
+keywords: [bundle,content,resources]
+weight: 4003
+draft: false
+toc: true
+linktitle: "Page Resources"
+menu:
+ docs:
+ parent: "content-management"
+ weight: 31
+---
+Page resources are only accessible from [page bundles]({{< relref
+"/content-management/page-bundles" >}}), those directories with `index.md` or
+`_index.md` files at their root. Page resources are only available to the
+page with which they are bundled.
+
+In this example, `first-post` is a page bundle with access to 10 page resources including audio, data, documents, images, and video. Although `second-post` is also a page bundle, it has no page resources and is unable to directly access the page resources associated with `first-post`.
+
+```text
+content
+└── post
+ ├── first-post
+ │ ├── images
+ │ │ ├── a.jpg
+ │ │ ├── b.jpg
+ │ │ └── c.jpg
+ │ ├── index.md (root of page bundle)
+ │ ├── latest.html
+ │ ├── manual.json
+ │ ├── notice.md
+ │ ├── office.mp3
+ │ ├── pocket.mp4
+ │ ├── rating.pdf
+ │ └── safety.txt
+ └── second-post
+ └── index.md (root of page bundle)
+```
+
+## Properties
+
+ResourceType
+: The main type of the resource's [Media Type](/templates/output-formats/#media-types). For example, a file of MIME type `image/jpeg` has the ResourceType `image`. A `Page` will have `ResourceType` with value `page`.
+
+{{< new-in "0.80.0" >}} Note that we in Hugo `v0.80.0` fixed a bug where non-image resources (e.g. video) would return the MIME sub type, e.g. `json`.
+
+Name
+: Default value is the filename (relative to the owning page). Can be set in front matter.
+
+Title
+: Default value is the same as `.Name`. Can be set in front matter.
+
+Permalink
+: The absolute URL to the resource. Resources of type `page` will have no value.
+
+RelPermalink
+: The relative URL to the resource. Resources of type `page` will have no value.
+
+Content
+: The content of the resource itself. For most resources, this returns a string
+with the contents of the file. Use this to create inline resources.
+
+```go-html-template
+{{ with .Resources.GetMatch "script.js" }}
+ <script>{{ .Content | safeJS }}</script>
+{{ end }}
+
+{{ with .Resources.GetMatch "style.css" }}
+ <style>{{ .Content | safeCSS }}</style>
+{{ end }}
+
+{{ with .Resources.GetMatch "img.png" }}
+ <img src="data:{{ .MediaType }};base64,{{ .Content | base64Encode }}">
+{{ end }}
+```
+
+MediaType
+: The MIME type of the resource, such as `image/jpeg`.
+
+MediaType.MainType
+: The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`.
+
+MediaType.SubType
+: The subtype of the resource's MIME type. For example, a file of MIME type `application/pdf` has for SubType `pdf`. Note that this is not the same as the file extension - PowerPoint files have a subtype of `vnd.mspowerpoint`.
+
+MediaType.Suffixes
+: A slice of possible suffixes for the resource's MIME type.
+
+## Methods
+ByType
+: Returns the page resources of the given type.
+
+```go
+{{ .Resources.ByType "image" }}
+```
+Match
+: Returns all the page resources (as a slice) whose `Name` matches the given Glob pattern ([examples](https://github.com/gobwas/glob/blob/master/readme.md)). The matching is case-insensitive.
+
+```go
+{{ .Resources.Match "images/*" }}
+```
+
+GetMatch
+: Same as `Match` but will return the first match.
+
+### Pattern Matching
+```go
+// Using Match/GetMatch to find this images/sunset.jpg ?
+.Resources.Match "images/sun*" ✅
+.Resources.Match "**/sunset.jpg" ✅
+.Resources.Match "images/*.jpg" ✅
+.Resources.Match "**.jpg" ✅
+.Resources.Match "*" 🚫
+.Resources.Match "sunset.jpg" 🚫
+.Resources.Match "*sunset.jpg" 🚫
+
+```
+
+## Page Resources Metadata
+
+The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
+
+{{% note %}}
+Resources of type `page` get `Title` etc. from their own front matter.
+{{% /note %}}
+
+name
+: Sets the value returned in `Name`.
+
+{{% warning %}}
++The methods `Match`, `Get` and `GetMatch` use `Name` to match the resources.
+{{%/ warning %}}
+
+title
+: Sets the value returned in `Title`
+
+params
+: A map of custom key/values.
+
+
+### Resources metadata example
+
+{{< code-toggle copy="false">}}
+title: Application
+date : 2018-01-25
+resources :
+- src : "images/sunset.jpg"
+ name : "header"
+- src : "documents/photo_specs.pdf"
+ title : "Photo Specifications"
+ params:
+ icon : "photo"
+- src : "documents/guide.pdf"
+ title : "Instruction Guide"
+- src : "documents/checklist.pdf"
+ title : "Document Checklist"
+- src : "documents/payment.docx"
+ title : "Proof of Payment"
+- src : "**.pdf"
+ name : "pdf-file-:counter"
+ params :
+ icon : "pdf"
+- src : "**.docx"
+ params :
+ icon : "word"
+{{</ code-toggle >}}
+
+From the example above:
+
+- `sunset.jpg` will receive a new `Name` and can now be found with `.GetMatch "header"`.
+- `documents/photo_specs.pdf` will get the `photo` icon.
+- `documents/checklist.pdf`, `documents/guide.pdf` and `documents/payment.docx` will get `Title` as set by `title`.
+- Every `PDF` in the bundle except `documents/photo_specs.pdf` will get the `pdf` icon.
+- All `PDF` files will get a new `Name`. The `name` parameter contains a special placeholder [`:counter`](#the-counter-placeholder-in-name-and-title), so the `Name` will be `pdf-file-1`, `pdf-file-2`, `pdf-file-3`.
+- Every docx in the bundle will receive the `word` icon.
+
+{{% warning %}}
+The __order matters__ --- Only the **first set** values of the `title`, `name` and `params`-**keys** will be used. Consecutive parameters will be set only for the ones not already set. In the above example, `.Params.icon` is first set to `"photo"` in `src = "documents/photo_specs.pdf"`. So that would not get overridden to `"pdf"` by the later set `src = "**.pdf"` rule.
+{{%/ warning %}}
+
+### The `:counter` placeholder in `name` and `title`
+
+The `:counter` is a special placeholder recognized in `name` and `title` parameters `resources`.
+
+The counter starts at 1 the first time they are used in either `name` or `title`.
+
+For example, if a bundle has the resources `photo_specs.pdf`, `other_specs.pdf`, `guide.pdf` and `checklist.pdf`, and the front matter has specified the `resources` as:
+
+{{< code-toggle copy="false">}}
+[[resources]]
+ src = "*specs.pdf"
+ title = "Specification #:counter"
+[[resources]]
+ src = "**.pdf"
+ name = "pdf-file-:counter"
+{{</ code-toggle >}}
+
+the `Name` and `Title` will be assigned to the resource files as follows:
+
+| Resource file | `Name` | `Title` |
+|-------------------|-------------------|-----------------------|
+| checklist.pdf | `"pdf-file-1.pdf` | `"checklist.pdf"` |
+| guide.pdf | `"pdf-file-2.pdf` | `"guide.pdf"` |
+| other\_specs.pdf | `"pdf-file-3.pdf` | `"Specification #1"` |
+| photo\_specs.pdf | `"pdf-file-4.pdf` | `"Specification #2"` |
--- /dev/null
+---
+title: Syntax Highlighting
+description: Hugo comes with really fast syntax highlighting from Chroma.
+date: 2017-02-01
+publishdate: 2017-02-01
+keywords: [highlighting,chroma,code blocks,syntax]
+categories: [content management]
+menu:
+ docs:
+ parent: "content-management"
+ weight: 300
+weight: 20
+sections_weight: 20
+draft: false
+aliases: [/extras/highlighting/,/extras/highlight/,/tools/syntax-highlighting/]
+toc: true
+---
+
+Hugo uses [Chroma](https://github.com/alecthomas/chroma) as its code highlighter; it is built in Go and is really, really fast -- and for the most important parts compatible with Pygments we used before.
+
+## Configure Syntax Highlighter
+
+See [Configure Highlight](/getting-started/configuration-markup#highlight).
+
+## Generate Syntax Highlighter CSS
+
+If you run with `markup.highlight.noClasses=false` in your site config, you need a style sheet.
+
+You can generate one with Hugo:
+
+```bash
+hugo gen chromastyles --style=monokai > syntax.css
+```
+
+Run `hugo gen chromastyles -h` for more options. See https://xyproto.github.io/splash/docs/ for a gallery of available styles.
+
+## Highlight Shortcode
+
+Highlighting is carried out via the built-in [`highlight` shortcode](https://gohugo.io/content-management/shortcodes/#highlight). It takes exactly one required parameter for the programming language to be highlighted and requires a closing shortcode. Note that `highlight` is *not* used for client-side javascript highlighting.
+
+Options:
+
+* `linenos`: configure line numbers. Valid values are `true`, `false`, `table`, or `inline`. `false` will turn off line numbers if it's configured to be on in site config. {{< new-in "0.60.0" >}} `table` will give copy-and-paste friendly code blocks.
+* `hl_lines`: lists a set of line numbers or line number ranges to be highlighted.
+* `linenostart=199`: starts the line number count from 199.
+* `anchorlinenos`: Configure anchors on line numbers. Valid values are `true` or `false`;
+* `lineanchors`: Configure a prefix for the anchors on line numbers. Will be suffixed with `-`, so linking to the line number 1 with the option `lineanchors=prefix` adds the anchor `prefix-1` to the page.
+* `hl_inline` Highlight inside a `<code>` (inline HTML element) tag. Valid values are `true` or `false`. The `code` tag will get a class with name `code-inline`. {{< new-in "0.101.0" >}}
+
+### Example: Highlight Shortcode
+
+```
+{{</* highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" */>}}
+// ... code
+{{</* / highlight */>}}
+```
+
+Gives this:
+
+{{< highlight go "linenos=table,hl_lines=8 15-17,linenostart=199" >}}
+// GetTitleFunc returns a func that can be used to transform a string to
+// title case.
+//
+// The supported styles are
+//
+// - "Go" (strings.Title)
+// - "AP" (see https://www.apstylebook.com/)
+// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html)
+//
+// If an unknown or empty style is provided, AP style is what you get.
+func GetTitleFunc(style string) func(s string) string {
+ switch strings.ToLower(style) {
+ case "go":
+ return strings.Title
+ case "chicago":
+ return transform.NewTitleConverter(transform.ChicagoStyle)
+ default:
+ return transform.NewTitleConverter(transform.APStyle)
+ }
+}
+{{< / highlight >}}
+
++## Highlight Hugo/GO Template Code
++
++For highlighting Hugo/GO template code on your page, add `/*` after the opening double curly braces and `*/` before closing curly braces.
++
++``` go
++{{</*/* myshortcode */*/>}}
++```
++
++Gives this:
++
++``` go
++{{</* myshortcode */>}}
++```
++
+## Highlight Template Func
+
+See [Highlight](/functions/highlight/).
+
+## Highlighting in Code Fences
+
+Highlighting in code fences is enabled by default.{{< new-in "0.60.0" >}}
+
+````
+```go {linenos=table,hl_lines=[8,"15-17"],linenostart=199}
+// ... code
+```
+````
+
+
+Gives this:
+
+```go {linenos=table,hl_lines=[8,"15-17"],linenostart=199}
+// GetTitleFunc returns a func that can be used to transform a string to
+// title case.
+//
+// The supported styles are
+//
+// - "Go" (strings.Title)
+// - "AP" (see https://www.apstylebook.com/)
+// - "Chicago" (see https://www.chicagomanualofstyle.org/home.html)
+//
+// If an unknown or empty style is provided, AP style is what you get.
+func GetTitleFunc(style string) func(s string) string {
+ switch strings.ToLower(style) {
+ case "go":
+ return strings.Title
+ case "chicago":
+ return transform.NewTitleConverter(transform.ChicagoStyle)
+ default:
+ return transform.NewTitleConverter(transform.APStyle)
+ }
+}
+```
+
+{{< new-in "0.60.0" >}}Note that only Goldmark supports passing attributes such as `hl_lines`, and it's important that it does not contain any spaces. See [goldmark-highlighting](https://github.com/yuin/goldmark-highlighting) for more information.
+
+The options are the same as in the [highlighting shortcode](/content-management/syntax-highlighting/#highlight-shortcode),including `linenos=false`, but note the slightly different Markdown attribute syntax.
+
+## List of Chroma Highlighting Languages
+
+The full list of Chroma lexers and their aliases (which is the identifier used in the `highlight` template func or when doing highlighting in code fences):
+
+{{< chroma-lexers >}}
+
+[Prism]: https://prismjs.com
+[prismdownload]: https://prismjs.com/download.html
+[Highlight.js]: https://highlightjs.org/
+[Rainbow]: https://craig.is/making/rainbows
+[Syntax Highlighter]: https://alexgorbatchev.com/SyntaxHighlighter/
+[Google Prettify]: https://github.com/google/code-prettify
+[Yandex]: https://yandex.ru/
--- /dev/null
- *Note* that this method does not parse and render shortcodes.
-
+---
+title: .RenderString
+description: "Renders markup to HTML."
+date: 2019-12-18
+categories: [functions]
+menu:
+ docs:
+ parent: "functions"
+keywords: [markdown,goldmark,render]
+signature: [".RenderString MARKUP"]
+---
+
+{{< new-in "0.62.0" >}}
+
+`.RenderString` is a method on `Page` that renders some markup to HTML using the content renderer defined for that page (if not set in the options).
+
+The method takes an optional map argument with these options:
+
+display ("inline")
+: `inline` or `block`. If `inline` (default), surrounding `<p></p>` on short snippets will be trimmed.
+
+markup (defaults to the Page's markup)
+: See identifiers in [List of content formats](/content-management/formats/#list-of-content-formats).
+
+Some examples:
+
+```go-html-template
+{{ $optBlock := dict "display" "block" }}
+{{ $optOrg := dict "markup" "org" }}
+{{ "**Bold Markdown**" | $p.RenderString }}
+{{ "**Bold Block Markdown**" | $p.RenderString $optBlock }}
+{{ "/italic org mode/" | $p.RenderString $optOrg }}
+```
+
+
+**Note** that this method is more powerful than the similar [markdownify](/functions/markdownify/) function as it also supports [Render Hooks](/getting-started/configuration-markup/#markdown-render-hooks) and it has options to render other markup formats.
--- /dev/null
- This translates a piece of content based on your `i18n/en-US.yaml` (and similar) files. You can use the [go-i18n](https://github.com/nicksnyder/go-i18n) tools to manage your translations. The translations can exist in both the theme and at the root of your repository.
+---
+title: i18n
+linktitle: i18n
+description: Translates a piece of content based on your i18n configuration files.
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-02-01
+categories: [functions]
+menu:
+ docs:
+ parent: "functions"
+keywords: [internationalization,i18n,multilingual]
+signature: ["i18n KEY", "T KEY"]
+workson: []
+hugoversion:
+relatedfuncs: []
+deprecated: false
+aliases: []
+---
+
++This translates a piece of content based on your `i18n/en-US.toml` files. You can use the [go-i18n](https://github.com/nicksnyder/go-i18n) tools to manage your translations. The translations can exist in both the theme and at the root of your repository.
+
+```
+{{ i18n "translation_id" }}
+```
+
+{{% note "Alias `T`" %}}
+`T` is an alias to `i18n`. E.g. `{{ T "translation_id" }}`.
+{{% /note %}}
+
++### Query a flexible translation with variables
++
++Often you will want to use the page variables in the translation strings. To do so, pass the `.` context when calling `i18n`:
++
++```
++{{ i18n "wordCount" . }}
++```
++
++The function will pass the `.` context to the `"wordCount"` id:
++
++{{< code-toggle file="i18n/en-US" >}}
++[wordCount]
++other = "This article has {{ .WordCount }} words."
++{{< /code-toggle >}}
++
++Assume `.WordCount` in the context has value is 101. The result will be:
++
++```
++This article has 101 words.
++```
++
+For more information about string translations, see [Translation of Strings in Multilingual Mode][multistrings].
+
+[multistrings]: /content-management/multilingual/#translation-of-strings
--- /dev/null
+---
+title: Image Filters
+description: The images namespace provides a list of filters and other image related functions.
+date: 2017-02-01
+categories: [functions]
+aliases: [/functions/imageconfig/]
+menu:
+ docs:
+ parent: "functions"
+keywords: [images]
+toc: true
+---
+
+See [images.Filter](#filter) for how to apply these filters to an image.
+
+## Overlay
+
+{{< new-in "0.80.0" >}}
+
+{{% funcsig %}}
+images.Overlay SRC X Y
+{{% /funcsig %}}
+
+Overlay creates a filter that overlays the source image at position x y, e.g:
+
+
+```go-html-template
+{{ $logoFilter := (images.Overlay $logo 50 50 ) }}
+{{ $img := $img | images.Filter $logoFilter }}
+```
+
+A shorter version of the above, if you only need to apply the filter once:
+
+```go-html-template
+{{ $img := $img.Filter (images.Overlay $logo 50 50 )}}
+```
+
+The above will overlay `$logo` in the upper left corner of `$img` (at position `x=50, y=50`).
+
+## Text
+
+{{< new-in "0.90.0" >}}
+
+Using the `Text` filter, you can add text to an image.
+
+{{% funcsig %}}
+images.Text TEXT DICT)
+{{% /funcsig %}}
+
+The following example will add the text `Hugo rocks!` to the image with the specified color, size and position.
+
+```go-html-template
+{{ $img := resources.Get "/images/background.png"}}
+{{ $img = $img.Filter (images.Text "Hugo rocks!" (dict
+ "color" "#ffffff"
+ "size" 60
+ "linespacing" 2
+ "x" 10
+ "y" 20
+))}}
+```
+
+You can load a custom font if needed. Load the font as a Hugo `Resource` and set it as an option:
+
+```go-html-template
+
+{{ $font := resources.Get "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Black.ttf" }}
+{{ $img := resources.Get "/images/background.png"}}
+{{ $img = $img.Filter (images.Text "Hugo rocks!" (dict
+ "font" $font
+))}}
+```
+
+
+## Brightness
+
+{{% funcsig %}}
+images.Brightness PERCENTAGE
+{{% /funcsig %}}
+
+Brightness creates a filter that changes the brightness of an image.
+The percentage parameter must be in range (-100, 100).
+
+### ColorBalance
+
+{{% funcsig %}}
+images.ColorBalance PERCENTAGERED PERCENTAGEGREEN PERCENTAGEBLUE
+{{% /funcsig %}}
+
+ColorBalance creates a filter that changes the color balance of an image.
+The percentage parameters for each color channel (red, green, blue) must be in range (-100, 500).
+
+## Colorize
+
+{{% funcsig %}}
+images.Colorize HUE SATURATION PERCENTAGE
+{{% /funcsig %}}
+
+Colorize creates a filter that produces a colorized version of an image.
+The hue parameter is the angle on the color wheel, typically in range (0, 360).
+The saturation parameter must be in range (0, 100).
+The percentage parameter specifies the strength of the effect, it must be in range (0, 100).
+
+## Contrast
+
+{{% funcsig %}}
+images.Contrast PERCENTAGE
+{{% /funcsig %}}
+
+Contrast creates a filter that changes the contrast of an image.
+The percentage parameter must be in range (-100, 100).
+
+## Gamma
+
+{{% funcsig %}}
+images.Gamma GAMMA
+{{% /funcsig %}}
+
+Gamma creates a filter that performs a gamma correction on an image.
+The gamma parameter must be positive. Gamma = 1 gives the original image.
+Gamma less than 1 darkens the image and gamma greater than 1 lightens it.
+
+## GaussianBlur
+
+{{% funcsig %}}
+images.GaussianBlur SIGMA
+{{% /funcsig %}}
+
+GaussianBlur creates a filter that applies a gaussian blur to an image.
+
+## Grayscale
+
+{{% funcsig %}}
+images.Grayscale
+{{% /funcsig %}}
+
+Grayscale creates a filter that produces a grayscale version of an image.
+
+## Hue
+
+{{% funcsig %}}
+images.Hue SHIFT
+{{% /funcsig %}}
+
+Hue creates a filter that rotates the hue of an image.
+The hue angle shift is typically in range -180 to 180.
+
+## Invert
+
+{{% funcsig %}}
+images.Invert
+{{% /funcsig %}}
+
+Invert creates a filter that negates the colors of an image.
+
+## Pixelate
+
+{{% funcsig %}}
+images.Pixelate SIZE
+{{% /funcsig %}}
+
+Pixelate creates a filter that applies a pixelation effect to an image.
+
+## Saturation
+
+{{% funcsig %}}
+images.Saturation PERCENTAGE
+{{% /funcsig %}}
+
+Saturation creates a filter that changes the saturation of an image.
+
+## Sepia
+
+{{% funcsig %}}
+images.Sepia PERCENTAGE
+{{% /funcsig %}}
+
+Sepia creates a filter that produces a sepia-toned version of an image.
+
+## Sigmoid
+
+{{% funcsig %}}
+images.Sigmoid MIDPOINT FACTOR
+{{% /funcsig %}}
+
+Sigmoid creates a filter that changes the contrast of an image using a sigmoidal function and returns the adjusted image.
+It's a non-linear contrast change useful for photo adjustments as it preserves highlight and shadow detail.
+
+## UnsharpMask
+
+{{% funcsig %}}
+images.UnsharpMask SIGMA AMOUNT THRESHOLD
+{{% /funcsig %}}
+
+UnsharpMask creates a filter that sharpens an image.
+The sigma parameter is used in a gaussian function and affects the radius of effect.
+Sigma must be positive. Sharpen radius roughly equals 3 * sigma.
+The amount parameter controls how much darker and how much lighter the edge borders become. Typically between 0.5 and 1.5.
+The threshold parameter controls the minimum brightness change that will be sharpened. Typically between 0 and 0.05.
+
+## Other Functions
+
+### Filter
+
+{{% funcsig %}}
+IMAGE | images.Filter FILTERS...
+{{% /funcsig %}}
+
+Can be used to apply a set of filters to an image:
+
+```go-html-template
+{{ $img := $img | images.Filter (images.GaussianBlur 6) (images.Pixelate 8) }}
+```
+
+Also see the [Filter Method](/content-management/image-processing/#filter).
+
+### ImageConfig
+
+Parses the image and returns the height, width, and color model.
+
++The `imageConfig` function takes a single parameter, a file path (_string_) relative to the _project's root directory_, with or without a leading slash.
++
+{{% funcsig %}}
+images.ImageConfig PATH
+{{% /funcsig %}}
+
+```go-html-template
+{{ with (imageConfig "favicon.ico") }}
+favicon.ico: {{.Width}} x {{.Height}}
+{{ end }}
+```
--- /dev/null
- {{ delimit (slice "foo" "bar" "buzz") ", " }}
+---
+title: slice
+# linktitle: slice
+description: Creates a slice (array) of all passed arguments.
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-02-01
+categories: [functions]
+menu:
+ docs:
+ parent: "functions"
+keywords: [slice, array, interface]
+signature: ["slice ITEM..."]
+workson: []
+hugoversion:
+relatedfuncs: []
+deprecated: false
+draft: false
+aliases: []
+toc: false
+---
+
+One use case is the concatenation of elements in combination with the [`delimit` function][]:
+
+{{< code file="slice.html" >}}
++{{ $sliceOfStrings := slice "foo" "bar" "buzz" }}
++<!-- returns the slice [ "foo", "bar", "buzz"] -->
++{{ delimit ($sliceOfStrings) ", " }}
+<!-- returns the string "foo, bar, buzz" -->
+{{< /code >}}
+
+
+[`delimit` function]: /functions/delimit/
--- /dev/null
- {{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }}
- {{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }}
+---
+title: union
+# linktitle: union
+description: Given two arrays or slices, returns a new array that contains the elements or objects that belong to either or both arrays/slices.
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-03-12
+categories: [functions]
+menu:
+ docs:
+ parent: "functions"
+keywords: [collections,intersect,union,complement]
+signature: ["union SET1 SET2"]
+workson: []
+hugoversion: 0.20
+relatedfuncs: [intersect,where]
+deprecated: false
+aliases: []
+---
+
+Given two arrays (or slices) A and B, this function will return a new array that contains the elements or objects that belong to either A or to B or to both. The elements supported are strings, integers, and floats (only float64).
+
+```
+{{ union (slice 1 2 3) (slice 3 4 5) }}
+<!-- returns [1 2 3 4 5] -->
+
+{{ union (slice 1 2 3) nil }}
+<!-- returns [1 2 3] -->
+
+{{ union nil (slice 1 2 3) }}
+<!-- returns [1 2 3] -->
+
+{{ union nil nil }}
+<!-- returns an error because both arrays/slices have to be of the same type -->
+```
+
+## OR filter in where query
+
+This is also very useful to use as `OR` filters when combined with where:
+
+```
+{{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }}
++{{ $pages = $pages | union (where .Site.RegularPages "Params.pinned" true) }}
++{{ $pages = $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }}
+```
+
+The above fetches regular pages not of `page` or `about` type unless they are pinned. And finally, we exclude all pages with no `images` set in Page params.
+
+See [intersect](/functions/intersect) for `AND`.
--- /dev/null
- lastmod: 2017-03-05
+---
+title: Configure Hugo
+linktitle: Configuration
+description: How to configure your Hugo site.
+date: 2013-07-01
+publishdate: 2017-01-02
-
+categories: [getting started,fundamentals]
+keywords: [configuration,toml,yaml,json]
+menu:
+ docs:
+ parent: "getting-started"
+ weight: 60
+weight: 60
+sections_weight: 60
+draft: false
+aliases: [/overview/source-directory/,/overview/configuration/]
+toc: true
+---
+
- Pass down down default configuration values (front matter) to pages in the content tree. The options in site config is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
+## Configuration File
+
+Hugo uses the `config.toml`, `config.yaml`, or `config.json` (if found in the
+site root) as the default site config file.
+
+The user can choose to override that default with one or more site config files
+using the command line `--config` switch.
+
+Examples:
+
+```
+hugo --config debugconfig.toml
+hugo --config a.toml,b.toml,c.toml
+```
+
+{{% note %}}
+Multiple site config files can be specified as a comma-separated string to the `--config` switch.
+{{% /note %}}
+
+{{< todo >}}TODO: distinct config.toml and others (the root object files){{< /todo >}}
+
+## Configuration Directory
+
+In addition to using a single site config file, one can use the `configDir` directory (default to `config/`) to maintain easier organization and environment specific settings.
+
+- Each file represents a configuration root object, such as `params.toml` for `[Params]`, `menu(s).toml` for `[Menu]`, `languages.toml` for `[Languages]` etc...
+- Each file's content must be top-level, for example:
+
+{{< code-toggle file="config" >}}
+[Params]
+ foo = "bar"
+{{< /code-toggle >}}
+
+{{< code-toggle file="params" >}}
+foo = "bar"
+{{< /code-toggle >}}
+
+- Each directory holds a group of files containing settings unique to an environment.
+- Files can be localized to become language specific.
+
+
+```
+├── config
+│ ├── _default
+│ │ ├── config.toml
+│ │ ├── languages.toml
+│ │ ├── menus.en.toml
+│ │ ├── menus.zh.toml
+│ │ └── params.toml
+│ ├── production
+│ │ ├── config.toml
+│ │ └── params.toml
+│ └── staging
+│ ├── config.toml
+│ └── params.toml
+```
+
+Considering the structure above, when running `hugo --environment staging`, Hugo will use every settings from `config/_default` and merge `staging`'s on top of those.
++
++Let's take an example to understand this better. Let's say you are using Google Analytics for your website. This requires you to specify `googleAnalytics = "G-XXXXXXXX"` in `config.toml`. Now consider the following scenario:
++- You don't want the Analytics code to be loaded in development i.e. in your `localhost`
++- You want to use separate googleAnalytics IDs for your production & staging environments (say):
++ - `G-PPPPPPPP` for production
++ - `G-SSSSSSSS` for staging
++
++This is how you need to configure your `config.toml` files considering the above scenario:
++1. In `_default/config.toml` you don't need to mention `googleAnalytics` parameter at all. This ensures that no Google Analytics code is loaded in your development server i.e. when you run `hugo serve`. This works since, by default Hugo sets `Environment=development` when you run `hugo serve` which uses the config files from `_default` folder
++2. In `production/config.toml` you just need to have one line:
++
++ ```googleAnalytics = "G-PPPPPPPP"```
++
++ You don't need to mention all other parameters like `title`, `baseURL`, `theme` etc. again in this config file. You need to mention only those parameters which are different or new for the production environment. This is due to the fact that Hugo is going to __merge__ this on top of `_default/config.toml`. Now when you run `hugo` (build command), by default hugo sets `Environment=production`, so the `G-PPPPPPPP` analytics code will be there in your production website
++3. Similarly in `staging/config.toml` you just need to have one line:
++
++ ```googleAnalytics = "G-SSSSSSSS"```
++
++ Now you need to tell Hugo that you are using the staging environment. So your build command should be `hugo --environment staging` which will load the `G-SSSSSSSS` analytics code in your staging website
++
++
+{{% note %}}
+Default environments are __development__ with `hugo server` and __production__ with `hugo`.
+{{%/ note %}}
+
+## Merge Configuration from Themes
+
+{{< new-in "0.84.0" >}} The configuration merge described below was improved in Hugo 0.84.0 and made fully configurable. The big change/improvement was that we now, by default, do deep merging of `params` maps from themes.
+
+The configuration value for `_merge` can be one of:
+
+none
+: No merge.
+
+shallow
+: Only add values for new keys.
+
+deep
+: Add values for new keys, merge existing.
+
+Note that you don't need to be so verbose as in the default setup below; a `_merge` value higher up will be inherited if not set.
+
+{{< code-toggle config="mergeStrategy" skipHeader=true />}}
+
+## All Configuration Settings
+
+The following is the full list of Hugo-defined variables with their default
+value in parentheses. Users may choose to override those values in their site
+config file(s).
+
+### archetypeDir
+
+**Default value:** "archetypes"
+
+The directory where Hugo finds archetype files (content templates). {{% module-mounts-note %}}
+
+### assetDir
+
+**Default value:** "assets"
+
+The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). {{% module-mounts-note %}}
+
+### baseURL
+Hostname (and path) to the root, e.g. https://bep.is/
+
+### build
+See [Configure Build](#configure-build)
+
+### buildDrafts (false)
+
+**Default value:** false
+
+Include drafts when building.
+
+### buildExpired
+
+**Default value:** false
+
+Include content already expired.
+
+### buildFuture
+
+**Default value:** false
+
+Include content with publishdate in the future.
+
+### caches
+See [Configure File Caches](#configure-file-caches)
+
+### cascade
+
+{{< new-in "0.86.0" >}}
+
- A language tag as defined by [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646). The internal [RSS template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml) populates its `<language>` element with this value. The value is not used elsewhere.
++Pass down default configuration values (front matter) to pages in the content tree. The options in site config is the same as in page front matter, see [Front Matter Cascade](/content-management/front-matter#front-matter-cascade).
+
+### canonifyURLs
+
+**Default value:** false
+
+Enable to turn relative URLs into absolute.
+
+### contentDir
+
+**Default value:** "content"
+
+The directory from where Hugo reads content files. {{% module-mounts-note %}}
+
+### copyright
+
+**Default value:** ""
+
+Copyright notice for your site, typically displayed in the footer.
+
+### dataDir
+
+**Default value:** "data"
+
+The directory from where Hugo reads data files. {{% module-mounts-note %}}
+
+### defaultContentLanguage
+
+**Default value:** "en"
+
+Content without language indicator will default to this language.
+
+### defaultContentLanguageInSubdir
+
+**Default value:** false
+
+Render the default content language in subdir, e.g. `content/en/`. The site root `/` will then redirect to `/en/`.
+
+### disableAliases
+
+**Default value:** false
+
+Will disable generation of alias redirects. Note that even if `disableAliases` is set, the aliases themselves are preserved on the page. The motivation with this is to be able to generate 301 redirects in an `.htaccess`, a Netlify `_redirects` file or similar using a custom output format.
+
+### disableHugoGeneratorInject
+
+**Default value:** false
+
+Hugo will, by default, inject a generator meta tag in the HTML head on the _home page only_. You can turn it off, but we would really appreciate if you don't, as this is a good way to watch Hugo's popularity on the rise.
+
+### disableKinds
+
+**Default value:** []
+
+Enable disabling of all pages of the specified *Kinds*. Allowed values in this list: `"page"`, `"home"`, `"section"`, `"taxonomy"`, `"term"`, `"RSS"`, `"sitemap"`, `"robotsTXT"`, `"404"`.
+
+### disableLiveReload
+
+**Default value:** false
+
+Disable automatic live reloading of browser window.
+
+### disablePathToLower
+
+**Default value:** false
+
+: Do not convert the url/path to lowercase.
+
+### enableEmoji
+
+**Default value:** false
+
+Enable Emoji emoticons support for page content; see the [Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet/).
+
+### enableGitInfo
+
+**Default value:** false
+
+Enable `.GitInfo` object for each page (if the Hugo site is versioned by Git). This will then update the `Lastmod` parameter for each page using the last git commit date for that content file.
+
+### enableInlineShortcodes
+
+**Default value:** false
+
+Enable inline shortcode support. See [Inline Shortcodes](/templates/shortcode-templates/#inline-shortcodes).
+
+### enableMissingTranslationPlaceholders
+
+**Default value:** false
+
+Show a placeholder instead of the default value or an empty string if a translation is missing.
+
+### enableRobotsTXT
+
+**Default value:** false
+
+Enable generation of `robots.txt` file.
+
+### frontmatter
+
+See [Front matter Configuration](#configure-front-matter).
+
+### googleAnalytics
+
+**Default value:** ""
+
+Google Analytics tracking ID.
+
+### hasCJKLanguage
+
+**Default value:** false
+
+If true, auto-detect Chinese/Japanese/Korean Languages in the content. This will make `.Summary` and `.WordCount` behave correctly for CJK languages.
+
+### imaging
+
+See [Image Processing Config](/content-management/image-processing/#imaging-configuration).
+
+### languageCode
+
+**Default value:** ""
+
++A language tag as defined by [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646). This value is used to populate:
++
++- The `<language>` element in the internal [RSS template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml)
++- The `lang` attribute of the `<html>` element in the internal [alias template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/alias.html)
+
+### languages
+
+See [Configure Languages](/content-management/multilingual/#configure-languages).
+
+### disableLanguages
+
+See [Disable a Language](/content-management/multilingual/#disable-a-language)
+
+### markup
+See [Configure Markup](/getting-started/configuration-markup).{{< new-in "0.60.0" >}}
+
+### mediaTypes
+See [Configure Media Types](/templates/output-formats/#media-types).
+
+### menus
+See [Add Non-content Entries to a Menu](/content-management/menus/#add-non-content-entries-to-a-menu).
+
+### minify
+See [Configure Minify](#configure-minify)
+
+### module
+Module config see [Module Config](/hugo-modules/configuration/).{{< new-in "0.56.0" >}}
+
+### newContentEditor
+
+**Default value:** ""
+
+The editor to use when creating new content.
+
+### noChmod
+
+**Default value:** false
+
+Don't sync permission mode of files.
+
+### noTimes
+
+**Default value:** false
+
+Don't sync modification time of files.
+
+### outputFormats
+See [Configure Output Formats](#configure-additional-output-formats).
+
+### paginate
+
+**Default value:** 10
+
+Default number of elements per page in [pagination](/templates/pagination/).
+
+### paginatePath
+
+**Default value:** "page"
+
+The path element used during pagination (`https://example.com/page/2`).
+
+### permalinks
+See [Content Management](/content-management/urls/#permalinks).
+
+### pluralizeListTitles
+
+**Default value:** true
+
+Pluralize titles in lists.
+
+### publishDir
+
+**Default value:** "public"
+
+The directory to where Hugo will write the final static site (the HTML files etc.).
+
+### related
+: See [Related Content](/content-management/related/#configure-related-content).{{< new-in "0.27" >}}
+
+### relativeURLs
+
+**Default value:** false
+
+Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs.
+
+### refLinksErrorLevel
+
+**Default value:** "ERROR"
+
+When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
+
+### refLinksNotFoundURL
+URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
+
+### removePathAccents
+
+**Default value:** false
+
+Removes [non-spacing marks](https://www.compart.com/en/unicode/category/Mn) from [composite characters](https://en.wikipedia.org/wiki/Precomposed_character) in content paths.
+
+```text
+content/post/hügó.md --> https://example.org/post/hugo/
+```
+
+
+### rssLimit
+
+**Default value:** -1 (unlimited)
+
+Maximum number of items in the RSS feed.
+
+### sectionPagesMenu
+See ["Section Menu for Lazy Bloggers"](/templates/menu-templates/#section-menu-for-lazy-bloggers).
+
+### security
+
+See [Security Policy](/about/security-model/#security-policy)
+
+### sitemap
+Default [sitemap configuration](/templates/sitemap-template/#configuration).
+
+### summaryLength
+
+**Default value:** 70
+
+The length of text in words to show in a [`.Summary`](/content-management/summaries/#automatic-summary-splitting).
+
+### taxonomies
+See [Configure Taxonomies](/content-management/taxonomies#configure-taxonomies).
+
+### theme
+: See [Module Config](/hugo-modules/configuration/#module-config-imports) for how to import a theme.
+
+### themesDir
+
+**Default value:** "themes"
+
+The directory where Hugo reads the themes from.
+
+### timeout
+
+**Default value:** "30s"
+
+Timeout for generating page contents, specified as a [duration](https://pkg.go.dev/time#Duration) or in milliseconds. *Note:* this is used to bail out of recursive content generation. You might need to raise this limit if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents).
+
+### timeZone
+
+{{< new-in "0.87.0" >}}
+
+The time zone (or location), e.g. `Europe/Oslo`, used to parse front matter dates without such information and in the [`time` function](/functions/time/). The list of valid values may be system dependent, but should include `UTC`, `Local`, and any location in the [IANA Time Zone database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
+
+### title
+Site title.
+
+### titleCaseStyle
+
+**Default value:** "AP"
+
+See [Configure Title Case](#configure-title-case)
+
+### uglyURLs
+When enabled, creates URL of the form `/filename.html` instead of `/filename/`.
+
+### watch
+
+**Default value:** false
+
+Watch filesystem for changes and recreate as needed.
+
+{{% note %}}
+If you are developing your site on a \*nix machine, here is a handy shortcut for finding a configuration option from the command line:
+```
+cd ~/sites/yourhugosite
+hugo config | grep emoji
+```
+
+which shows output like
+
+```
+enableemoji: true
+```
+{{% /note %}}
+
+## Configure Build
+
+{{< new-in "0.66.0" >}}
+
+The `build` configuration section contains global build-related configuration options.
+
+{{< code-toggle file="config">}}
+[build]
+useResourceCacheWhen="fallback"
+writeStats = false
+noJSConfigInAssets = false
+{{< /code-toggle >}}
+
+
+useResourceCacheWhen
+: When to use the cached resources in `/resources/_gen` for PostCSS and ToCSS. Valid values are `never`, `always` and `fallback`. The last value means that the cache will be tried if PostCSS/extended version is not available.
+
+writeStats {{< new-in "0.69.0" >}}
+: When enabled, a file named `hugo_stats.json` will be written to your project root with some aggregated data about the build, e.g. list of HTML entities published to be used to do [CSS pruning](/hugo-pipes/postprocess/#css-purging-with-postcss). If you're only using this for the production build, you should consider placing it below [config/production](/getting-started/configuration/#configuration-directory). It's also worth mentioning that, due to the nature of the partial server builds, new HTML entities will be added when you add or change them while the server is running, but the old values will not be removed until you restart the server or run a regular `hugo` build.
+
+**Note** that the prime use case for this is purging of unused CSS; it is build for speed and there may be false positives (e.g. elements that isn't really a HTML element).
+
+noJSConfigInAssets {{< new-in "0.78.0" >}}
+: Turn off writing a `jsconfig.json` into your `/assets` folder with mapping of imports from running [js.Build](https://gohugo.io/hugo-pipes/js). This file is intended to help with intellisense/navigation inside code editors such as [VS Code](https://code.visualstudio.com/). Note that if you do not use `js.Build`, no file will be written.
+
+## Configure Server
+
+{{< new-in "0.67.0" >}}
+
+This is only relevant when running `hugo server`, and it allows to set HTTP headers during development, which allows you to test out your Content Security Policy and similar. The configuration format matches [Netlify's](https://docs.netlify.com/routing/headers/#syntax-for-the-netlify-configuration-file) with slightly more powerful [Glob matching](https://github.com/gobwas/glob):
+
+
+{{< code-toggle file="config">}}
+[server]
+[[server.headers]]
+for = "/**"
+
+[server.headers.values]
+X-Frame-Options = "DENY"
+X-XSS-Protection = "1; mode=block"
+X-Content-Type-Options = "nosniff"
+Referrer-Policy = "strict-origin-when-cross-origin"
+Content-Security-Policy = "script-src localhost:1313"
+{{< /code-toggle >}}
+
+Since this is is "development only", it may make sense to put it below the `development` environment:
+
+
+{{< code-toggle file="config/development/server">}}
+[[headers]]
+for = "/**"
+
+[headers.values]
+X-Frame-Options = "DENY"
+X-XSS-Protection = "1; mode=block"
+X-Content-Type-Options = "nosniff"
+Referrer-Policy = "strict-origin-when-cross-origin"
+Content-Security-Policy = "script-src localhost:1313"
+{{< /code-toggle >}}
+
+
+{{< new-in "0.72.0" >}}
+
+You can also specify simple redirects rules for the server. The syntax is again similar to Netlify's.
+
+Note that a `status` code of 200 will trigger a [URL rewrite](https://docs.netlify.com/routing/redirects/rewrites-proxies/), which is what you want in SPA situations, e.g:
+
+{{< code-toggle file="config/development/server">}}
+[[redirects]]
+from = "/myspa/**"
+to = "/myspa/"
+status = 200
+force = false
+{{< /code-toggle >}}
+
+{{< new-in "0.76.0" >}} Setting `force=true` will make a redirect even if there is existing content in the path. Note that before Hugo 0.76 `force` was the default behaviour, but this is inline with how Netlify does it.
+
+## Configure Title Case
+
+Set `titleCaseStyle` to specify the title style used by the [title](/functions/title/) template function and the automatic section titles in Hugo. It defaults to [AP Stylebook](https://www.apstylebook.com/) for title casing, but you can also set it to `Chicago` or `Go` (every word starts with a capital letter).
+
+## Configuration Environment Variables
+
+HUGO_NUMWORKERMULTIPLIER
+: Can be set to increase or reduce the number of workers used in parallel processing in Hugo. If not set, the number of logical CPUs will be used.
+
+## Configuration Lookup Order
+
+Similar to the template [lookup order][], Hugo has a default set of rules for searching for a configuration file in the root of your website's source directory as a default behavior:
+
+1. `./config.toml`
+2. `./config.yaml`
+3. `./config.json`
+
+In your `config` file, you can direct Hugo as to how you want your website rendered, control your website's menus, and arbitrarily define site-wide parameters specific to your project.
+
+
+## Example Configuration
+
+The following is a typical example of a configuration file. The values nested under `params:` will populate the [`.Site.Params`][] variable for use in [templates][]:
+
+{{< code-toggle file="config">}}
+baseURL: "https://yoursite.example.com/"
+title: "My Hugo Site"
+permalinks:
+ posts: /:year/:month/:title/
+params:
+ Subtitle: "Hugo is Absurdly Fast!"
+ AuthorName: "Jon Doe"
+ GitHubUser: "spf13"
+ ListOfFoo:
+ - "foo1"
+ - "foo2"
+ SidebarRecentLimit: 5
+{{< /code-toggle >}}
+
+## Configure with Environment Variables
+
+In addition to the 3 config options already mentioned, configuration key-values can be defined through operating system environment variables.
+
+For example, the following command will effectively set a website's title on Unix-like systems:
+
+```
+$ env HUGO_TITLE="Some Title" hugo
+```
+
+This is really useful if you use a service such as Netlify to deploy your site. Look at the Hugo docs [Netlify configuration file](https://github.com/gohugoio/hugoDocs/blob/master/netlify.toml) for an example.
+
+{{% note "Setting Environment Variables" %}}
+Names must be prefixed with `HUGO_` and the configuration key must be set in uppercase when setting operating system environment variables.
+
+To set config params, prefix the name with `HUGO_PARAMS_`
+{{% /note %}}
+
+{{< new-in "0.79.0" >}} If you are using snake_cased variable names, the above will not work, so since Hugo 0.79.0 Hugo determines the delimiter to use by the first character after `HUGO`. This allows you to define environment variables on the form `HUGOxPARAMSxAPI_KEY=abcdefgh`, using any [allowed](https://stackoverflow.com/questions/2821043/allowed-characters-in-linux-environment-variable-names#:~:text=So%20names%20may%20contain%20any,not%20begin%20with%20a%20digit.) delimiter.
+
+{{< todo >}}
+Test and document setting params via JSON env var.
+{{< /todo >}}
+
+## Ignore Content and Data Files when Rendering
+
+To exclude specific files from the `content` and `data` directories when rendering your site, set `ignoreFiles` to one or more regular expressions to match against the absolute file path.
+
+To ignore files ending with `.foo` or `.boo`:
+
+{{< code-toggle copy="false" >}}
+ignoreFiles = ['\.foo$', '\.boo$']
+{{< /code-toggle >}}
+
+To ignore a file using the absolute file path:
+
+{{< code-toggle copy="false" >}}
+ignoreFiles = ['^/home/user/project/content/test\.md$']
+{{< /code-toggle >}}
+
+## Configure Front Matter
+
+### Configure Dates
+
+Dates are important in Hugo, and you can configure how Hugo assigns dates to your content pages. You do this by adding a `frontmatter` section to your `config.toml`.
+
+
+The default configuration is:
+
+{{< code-toggle file="config" >}}
+[frontmatter]
+date = ["date", "publishDate", "lastmod"]
+lastmod = [":git", "lastmod", "date", "publishDate"]
+publishDate = ["publishDate", "date"]
+expiryDate = ["expiryDate"]
+{{< /code-toggle >}}
+
+If you, as an example, have a non-standard date parameter in some of your content, you can override the setting for `date`:
+
+{{< code-toggle file="config" >}}
+[frontmatter]
+date = ["myDate", ":default"]
+{{< /code-toggle >}}
+
+The `:default` is a shortcut to the default settings. The above will set `.Date` to the date value in `myDate` if present, if not we will look in `date`,`publishDate`, `lastmod` and pick the first valid date.
+
+In the list to the right, values starting with ":" are date handlers with a special meaning (see below). The others are just names of date parameters (case insensitive) in your front matter configuration. Also note that Hugo have some built-in aliases to the above: `lastmod` => `modified`, `publishDate` => `pubdate`, `published` and `expiryDate` => `unpublishdate`. With that, as an example, using `pubDate` as a date in front matter, will, by default, be assigned to `.PublishDate`.
+
+The special date handlers are:
+
+
+`:fileModTime`
+: Fetches the date from the content file's last modification timestamp.
+
+An example:
+
+{{< code-toggle file="config" >}}
+[frontmatter]
+lastmod = ["lastmod", ":fileModTime", ":default"]
+{{< /code-toggle >}}
+
+
+The above will try first to extract the value for `.Lastmod` starting with the `lastmod` front matter parameter, then the content file's modification timestamp. The last, `:default` should not be needed here, but Hugo will finally look for a valid date in `:git`, `date` and then `publishDate`.
+
+
+`:filename`
+: Fetches the date from the content file's filename. For example, `2018-02-22-mypage.md` will extract the date `2018-02-22`. Also, if `slug` is not set, `mypage` will be used as the value for `.Slug`.
+
+An example:
+
+{{< code-toggle file="config" >}}
+[frontmatter]
+date = [":filename", ":default"]
+{{< /code-toggle >}}
+
+The above will try first to extract the value for `.Date` from the filename, then it will look in front matter parameters `date`, `publishDate` and lastly `lastmod`.
+
+
+`:git`
+: This is the Git author date for the last revision of this content file. This will only be set if `--enableGitInfo` is set or `enableGitInfo = true` is set in site config.
+
+## Configure Additional Output Formats
+
+Hugo v0.20 introduced the ability to render your content to multiple output formats (e.g., to JSON, AMP html, or CSV). See [Output Formats][] for information on how to add these values to your Hugo project's configuration file.
+
+## Configure Minify
+
+{{< new-in "0.68.0" >}}
+
+Default configuration:
+
+{{< code-toggle config="minify" />}}
+
+## Configure File Caches
+
+Since Hugo 0.52 you can configure more than just the `cacheDir`. This is the default configuration:
+
+{{< code-toggle >}}
+[caches]
+[caches.getjson]
+dir = ":cacheDir/:project"
+maxAge = -1
+[caches.getcsv]
+dir = ":cacheDir/:project"
+maxAge = -1
+[caches.getresource]
+dir = ":cacheDir/:project"
+maxAge = -1
+[caches.images]
+dir = ":resourceDir/_gen"
+maxAge = -1
+[caches.assets]
+dir = ":resourceDir/_gen"
+maxAge = -1
+[caches.modules]
+dir = ":cacheDir/modules"
+maxAge = -1
+{{< /code-toggle >}}
+
+You can override any of these cache settings in your own `config.toml`.
+
+### The keywords explained
+
+`:cacheDir`
+: This is the value of the `cacheDir` config option if set (can also be set via OS env variable `HUGO_CACHEDIR`). It will fall back to `/opt/build/cache/hugo_cache/` on Netlify, or a `hugo_cache` directory below the OS temp dir for the others. This means that if you run your builds on Netlify, all caches configured with `:cacheDir` will be saved and restored on the next build. For other CI vendors, please read their documentation. For an CircleCI example, see [this configuration](https://github.com/bep/hugo-sass-test/blob/6c3960a8f4b90e8938228688bc49bdcdd6b2d99e/.circleci/config.yml).
+
+`:project`
+: The base directory name of the current Hugo project. This means that, in its default setting, every project will have separated file caches, which means that when you do `hugo --gc` you will not touch files related to other Hugo projects running on the same PC.
+
+`:resourceDir`
+: This is the value of the `resourceDir` config option.
+
+maxAge
+: This is the duration before a cache entry will be evicted, -1 means forever and 0 effectively turns that particular cache off. Uses Go's `time.Duration`, so valid values are `"10s"` (10 seconds), `"10m"` (10 minutes) and `"10h"` (10 hours).
+
+dir
+: The absolute path to where the files for this cache will be stored. Allowed starting placeholders are `:cacheDir` and `:resourceDir` (see above).
+
+## Configuration Format Specs
+
+* [TOML Spec][toml]
+* [YAML Spec][yaml]
+* [JSON Spec][json]
+
+[`.Site.Params`]: /variables/site/
+[directory structure]: /getting-started/directory-structure
+[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf "Specification for JSON, JavaScript Object Notation"
+[lookup order]: /templates/lookup-order/
+[Output Formats]: /templates/output-formats/
+[templates]: /templates/
+[toml]: https://github.com/toml-lang/toml
+[yaml]: https://yaml.org/spec/
+[static-files]: /content-management/static-files/
--- /dev/null
- : Stores all the files which need be processed by [Hugo Pipes]({{< ref "/hugo-pipes" >}}). Only the files whose `.Permalink` or `.RelPermalink` are used will be published to the `public` directory. Note: assets directory is not created by default.
+---
+title: Directory Structure
+linktitle: Directory Structure
+description: Hugo's CLI scaffolds a project directory structure and then takes that single directory and uses it as the input to create a complete website.
+date: 2017-01-02
+publishdate: 2017-02-01
+lastmod: 2017-03-09
+categories: [getting started,fundamentals]
+keywords: [source, organization, directories]
+menu:
+ docs:
+ parent: "getting-started"
+ weight: 50
+weight: 50
+sections_weight: 50
+draft: false
+aliases: [/overview/source-directory/]
+toc: true
+---
+
+## New Site Scaffolding
+
+{{< youtube sB0HLHjgQ7E >}}
+
+Running the `hugo new site` generator from the command line will create a directory structure with the following elements:
+
+```
+.
+├── archetypes
+├── config.toml
+├── content
+├── data
+├── layouts
++├── public
+├── static
+└── themes
+```
+
+
+## Directory Structure Explained
+
+The following is a high-level overview of each of the directories with links to each of their respective sections within the Hugo docs.
+
+[`archetypes`](/content-management/archetypes/)
+: You can create new content files in Hugo using the `hugo new` command.
+By default, Hugo will create new content files with at least `date`, `title` (inferred from the file name), and `draft = true`. This saves time and promotes consistency for sites using multiple content types. You can create your own [archetypes][] with custom preconfigured front matter fields as well.
+
+[`assets`][]
- resources
++: Stores all the files which need be processed by [Hugo Pipes](/hugo-pipes/). Only the files whose `.Permalink` or `.RelPermalink` are used will be published to the `public` directory. Note: assets directory is not created by default.
+
+[`config`](/getting-started/configuration/)
+: Hugo ships with a large number of [configuration directives][].
+The [config directory](/getting-started/configuration/#configuration-directory) is where those directives are stored as JSON, YAML, or TOML files. Every root setting object can stand as its own file and structured by environments.
+Projects with minimal settings and no need for environment awareness can use a single `config.toml` file at its root.
+
+Many sites may need little to no configuration, but Hugo ships with a large number of [configuration directives][] for more granular directions on how you want Hugo to build your website. Note: config directory is not created by default.
+
+[`content`][]
+: All content for your website will live inside this directory. Each top-level folder in Hugo is considered a [content section][]. For example, if your site has three main sections---`blog`, `articles`, and `tutorials`---you will have three directories at `content/blog`, `content/articles`, and `content/tutorials`. Hugo uses sections to assign default [content types][].
+
+[`data`](/templates/data-templates/)
+: This directory is used to store configuration files that can be
+used by Hugo when generating your website. You can write these files in YAML, JSON, or TOML format. In addition to the files you add to this folder, you can also create [data templates][] that pull from dynamic content.
+
+[`layouts`][]
+: Stores templates in the form of `.html` files that specify how views of your content will be rendered into a static website. Templates include [list pages][lists], your [homepage][], [taxonomy templates][], [partials][], [single page templates][singles], and more.
+
+[`static`][]
+: Stores all the static content: images, CSS, JavaScript, etc. When Hugo builds your site, all assets inside your static directory are copied over as-is. A good example of using the `static` folder is for [verifying site ownership on Google Search Console][searchconsole], where you want Hugo to copy over a complete HTML file without modifying its content.
+
+{{% note %}}
+From **Hugo 0.31** you can have multiple static directories.
+{{% /note %}}
+
-
++[`resources`][]
+: Caches some files to speed up generation. Can be also used by template authors to distribute built SASS files, so you don't have to have the preprocessor installed. Note: resources directory is not created by default.
+
- [`assets`]: {{< ref "/hugo-pipes/introduction#asset-directory" >}}
+[archetypes]: /content-management/archetypes/
++[`assets`]: /hugo-pipes/introduction#asset-directory/
+[configuration directives]: /getting-started/configuration/#all-configuration-settings
+[`content`]: /content-management/organization/
+[content section]: /content-management/sections/
+[content types]: /content-management/types/
+[data templates]: /templates/data-templates/
+[homepage]: /templates/homepage/
+[`layouts`]: /templates/
+[`static`]: /content-management/static-files/
++[`resources`]: /getting-started/configuration/#configure-file-caches
+[lists]: /templates/list/
+[pagevars]: /variables/page/
+[partials]: /templates/partials/
+[searchconsole]: https://support.google.com/analytics/answer/1142414?hl=en
+[singles]: /templates/single-page-templates/
+[starters]: /tools/starter-kits/
+[taxonomies]: /content-management/taxonomies/
+[taxonomy templates]: /templates/taxonomy-templates/
+[types]: /content-management/types/
--- /dev/null
+---
+title: External Learning Resources
+linktitle: External Learning Resources
+description: A list of tutorials and books on Hugo.
+date: 2019-10-20
+publishdate: 2019-10-20
+lastmod: 2019-10-20
+keywords: [books, tutorials, learning, usage]
+menu:
+ docs:
+ parent: "getting-started"
+ weight: 70
+weight: 70
+sections_weight: 70
+draft: false
+toc: false
+---
+
+## Books
+
+### Hugo In Action
+
+[](https://www.manning.com/books/hugo-in-action)
+
+Hugo in Action is a step-by-step guide to using Hugo to create static websites. Working with a complete example website and source code samples, you’ll learn how to build and host a low-maintenance, high-performance site that will wow your users and stay stable without relying on a third-party server.
+
+[Hugo In Action Home Page](https://www.manning.com/books/hugo-in-action)
+
+### Build Websites with Hugo
+
+[Build Websites with Hugo - Fast Web Development with Markdown (2020)](https://pragprog.com/titles/bhhugo/) by Brian P. Hogan.
+
++## Beginner tutorials
++
++### Hugo tutorial by CloudCannon
++
++[Step-by-step written tutorial](https://cloudcannon.com/community/learn/hugo-101/) to teach you the basics of creating a Hugo site.
++
+## Video tutorials
+
+### Video Playlist by Mike Dane
+
+Mike Dane explains the various features of Hugo via dedicated tutorials on [YouTube](https://www.youtube.com/watch?list=PLLAZ4kZ9dFpOnyRlyS-liKL5ReHDcj4G3&v=qtIqKaDlqXo).
--- /dev/null
- If you are a Windows user, substitute the `$HOME` environment variable above with `%USERPROFILE%`.
+---
+title: Install Hugo
+linktitle: Install Hugo
+description: Install Hugo on macOS, Windows, Linux, OpenBSD, FreeBSD, and on any machine where the Go compiler tool chain can run.
+date: 2016-11-01
+publishdate: 2016-11-01
+lastmod: 2018-01-02
+categories: [getting started,fundamentals]
+authors: ["Michael Henderson"]
+keywords: [install,pc,windows,linux,macos,binary,tarball]
+menu:
+ docs:
+ parent: "getting-started"
+ weight: 30
+weight: 30
+sections_weight: 30
+draft: false
+aliases: [/tutorials/installing-on-windows/,/tutorials/installing-on-mac/,/overview/installing/,/getting-started/install,/install/]
+toc: true
+---
+
+
+{{% note %}}
+There is lots of talk about "Hugo being written in Go", but you don't need to install Go to enjoy Hugo. Just grab a precompiled binary!
+{{% /note %}}
+
+Hugo is written in [Go](https://golang.org/) with support for multiple platforms. The latest release can be found at [Hugo Releases][releases].
+
+Hugo currently provides pre-built binaries for the following:
+
+* macOS (Darwin) for x64, i386, and ARM architectures
+* Windows
+* Linux
+* OpenBSD
+* FreeBSD
+
+Hugo may also be compiled from source wherever the Go toolchain can run; e.g., on other operating systems such as DragonFly BSD, OpenBSD, Plan 9, Solaris, and others. See <https://golang.org/doc/install/source> for the full set of supported combinations of target operating systems and compilation architectures.
+
+## Quick Install
+
+### Binary (Cross-platform)
+
+Download the appropriate version for your platform from [Hugo Releases][releases]. Once downloaded, the binary can be run from anywhere. You don't need to install it into a global location. This works well for shared hosts and other systems where you don't have a privileged account.
+
+Ideally, you should install it somewhere in your `PATH` for easy use. `/usr/local/bin` is the most probable location.
+
+### Docker
+
+We currently do not offer official Hugo images for Docker, but we do recommend these up to date distributions: https://hub.docker.com/r/klakegg/hugo/
+
+### Homebrew (macOS)
+
+If you are on macOS and using [Homebrew][brew], you can install Hugo with the following one-liner:
+
+{{< code file="install-with-homebrew.sh" >}}
+brew install hugo
+{{< /code >}}
+
+For more detailed explanations, read the installation guides that follow for installing on macOS and Windows.
+
+### MacPorts (macOS)
+
+If you are on macOS and using [MacPorts][macports], you can install Hugo with the following one-liner:
+
+{{< code file="install-with-macports.sh" >}}
+port install hugo
+{{< /code >}}
+
+### Homebrew (Linux)
+
+If you are using [Homebrew][linuxbrew] on Linux, you can install Hugo with the following one-liner:
+
+{{< code file="install-with-linuxbrew.sh" >}}
+brew install hugo
+{{< /code >}}
+
+Installation guides for Homebrew on Linux are available on their [website][linuxbrew].
+
+### Chocolatey (Windows)
+
+If you are on a Windows machine and use [Chocolatey][] for package management, you can install Hugo with the following one-liner:
+
+{{< code file="install-with-chocolatey.ps1" >}}
+choco install hugo -confirm
+{{< /code >}}
+
+Or if you need the “extended” Sass/SCSS version:
+
+{{< code file="install-extended-with-chocolatey.ps1" >}}
+choco install hugo-extended -confirm
+{{< /code >}}
+
+### Scoop (Windows)
+
+If you are on a Windows machine and use [Scoop][] for package management, you can install Hugo with the following one-liner:
+
+```bash
+scoop install hugo
+```
+
+Or install the extended version with:
+
+```bash
+scoop install hugo-extended
+```
+
+### Source
+
+#### Prerequisite Tools
+
+* [Git][installgit]
++* [GCC][] (For Windows users only)
+* [Go (at least Go 1.11)](https://golang.org/dl/)
+
+#### Fetch from GitHub
+
+Since Hugo 0.48, Hugo uses the Go Modules support built into Go 1.11 to build. The easiest way to get started is to clone Hugo in a directory outside of the GOPATH, as in the following example:
+
+{{< code file="from-gh.sh" >}}
+mkdir $HOME/src
+cd $HOME/src
+git clone https://github.com/gohugoio/hugo.git
+cd hugo
+go install --tags extended
+{{< /code >}}
+
+Remove `--tags extended` if you do not want/need Sass/SCSS support.
+
+{{% note %}}
- ```
- nano ~/.zprofile
- ```
-
- If your default shell is bash:
-
- ```
- nano ~/.bash_profile
- ```
++
++##### For installation on Windows
++
++* Substitute the `$HOME` environment variable above with `%USERPROFILE%`.
++* If you install `--tags extended` version, you may encounter this error `"gcc": executable file not found in %PATH%`
++ * Please make sure you have installed `gcc` command and add it to `%PATH%`.
++ * "MinGW" is recommended, it has been tested and built successfully
++
+{{% /note %}}
+
+## macOS
+
+### Assumptions
+
+1. You know how to open the macOS terminal.
+2. You're running a modern 64-bit Mac.
+3. You will use `~/Sites` as the starting point for your site. (`~/Sites` is used for example purposes. If you are familiar enough with the command line and file system, you should have no issues following along with the instructions.)
+
+### Pick Your Method
+
+There are three ways to install Hugo on your Mac
+
+1. A package manager, like [Homebrew][brew] (`brew`) or [MacPorts][macports] (`port`)
+2. Distribution (i.e., tarball)
+3. Building from Source
+
+There is no "best" way to install Hugo on your Mac. You should use the method that works best for your use case.
+
+#### Pros and Cons
+
+There are pros and cons to each of the aforementioned methods:
+
+1. **Package Manager.** Using a package manager is the simplest method and will require the least amount of work to maintain. The drawbacks aren't severe. The default package will be for the most recent release, so it will not have bug fixes until the next release (i.e., unless you install it with the `--HEAD` option in Homebrew). Releases may lag a few days behind because it has to be coordinated with another team. Nevertheless, this is the recommended installation method if you want to work from a stable, widely used source. Package managers work well and they are easy to update.
+
+2. **Tarball.** Downloading and installing from the tarball is also easy, although it requires a few more command line skills than does Homebrew. Updates are easy as well: you just repeat the process with the new binary. This gives you the flexibility to have multiple versions on your computer. If you don't want to use `brew`, then the tarball/binary is a good choice.
+
+3. **Building from Source.** Building from source is the most work. The advantage of building from source is that you don't have to wait for a release to add features or bug fixes. The disadvantage is that you need to spend more time managing the setup, which is manageable but requires more time than the preceding two options.
+
+{{% note %}}
+Since building from source is appealing to more seasoned command line users, this guide will focus more on installing Hugo via Homebrew and Tarball.
+{{% /note %}}
+
+### Install Hugo with Brew
+
+{{< youtube WvhCGlLcrF8 >}}
+
+#### Step 1: Install `brew` if you haven't already
+
+Go to the `brew` website, <https://brew.sh/>, and follow the directions there. The most important step is the installation from the command line:
+
+{{< code file="install-brew.sh" >}}
+ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+{{< /code >}}
+
+#### Step 2: Run the `brew` Command to Install `hugo`
+
+Installing Hugo using `brew` is as easy as the following:
+
+{{< code file="install-brew.sh" >}}
+brew install hugo
+{{< /code >}}
+
+If Homebrew is working properly, you should see something similar to the following:
+
+```
+==> Downloading https://homebrew.bintray.com/bottles/hugo-0.21.sierra.bottle.tar.gz
+######################################################################### 100.0%
+==> Pouring hugo-0.21.sierra.bottle.tar.gz
+🍺 /usr/local/Cellar/hugo/0.21: 32 files, 17.4MB
+```
+
+{{% note "Installing the Latest Hugo with Brew" %}}
+Replace `brew install hugo` with `brew install hugo --HEAD` if you want the absolute latest in-development version.
+{{% /note %}}
+
+`brew` should have updated your path to include Hugo. You can confirm by opening a new terminal window and running a few commands:
+
+```
+$ # show the location of the hugo executable
+which hugo
+/usr/local/bin/hugo
+
+# show the installed version
+ls -l $( which hugo )
+lrwxr-xr-x 1 mdhender admin 30 Mar 28 22:19 /usr/local/bin/hugo -> ../Cellar/hugo/0.13_1/bin/hugo
+
+# verify that hugo runs correctly
+hugo version
+Hugo Static Site Generator v0.13 BuildDate: 2015-03-09T21:34:47-05:00
+```
+
+### Install Hugo from Tarball
+
+#### Step 1: Decide on the location
+
+When installing from the tarball, you have to decide if you're going to install the binary in `/usr/local/bin` or in your home directory. There are three camps on this:
+
+1. Install it in `/usr/local/bin` so that all the users on your system have access to it. This is a good idea because it's a fairly standard place for executables. The downside is that you may need elevated privileges to put software into that location. Also, if there are multiple users on your system, they will all run the same version. Sometimes this can be an issue if you want to try out a new release.
+
+2. Install it in `~/bin` so that only you can execute it. This is a good idea because it's easy to do, easy to maintain, and doesn't require elevated privileges. The downside is that only you can run Hugo. If there are other users on your site, they have to maintain their own copies. That can lead to people running different versions. Of course, this does make it easier for you to experiment with different releases.
+
+3. Install it in your `Sites` directory. This is not a bad idea if you have only one site that you're building. It keeps every thing in a single place. If you want to try out new releases, you can make a copy of the entire site and update the Hugo executable.
+
+All three locations will work for you. In the interest of brevity, this guide focuses on option #2.
+
+#### Step 2: Download the Tarball
+
+1. Open <https://github.com/gohugoio/hugo/releases> in your browser.
+
+2. Find the current release by scrolling down and looking for the green tag that reads "Latest Release."
+
+3. Download the current tarball for the Mac. The name will be something like `hugo_X.Y_osx-64bit.tgz`, where `X.YY` is the release number.
+
+4. By default, the tarball will be saved to your `~/Downloads` directory. If you choose to use a different location, you'll need to change that in the following steps.
+
+#### Step 3: Confirm your download
+
+Verify that the tarball wasn't corrupted during the download:
+
+```
+tar tvf ~/Downloads/hugo_X.Y_osx-64bit.tgz
+-rwxrwxrwx 0 0 0 0 Feb 22 04:02 hugo_X.Y_osx-64bit/hugo_X.Y_osx-64bit.tgz
+-rwxrwxrwx 0 0 0 0 Feb 22 03:24 hugo_X.Y_osx-64bit/README.md
+-rwxrwxrwx 0 0 0 0 Jan 30 18:48 hugo_X.Y_osx-64bit/LICENSE.md
+```
+
+The `.md` files are documentation for Hugo. The other file is the executable.
+
+#### Step 4: Install Into Your `bin` Directory
+
+```
+# create the directory if needed
+mkdir -p ~/bin
+
+# make it the working directory
+cd ~/bin
+
+# extract the tarball
+tar -xvzf ~/Downloads/hugo_X.Y_osx-64bit.tgz
+Archive: hugo_X.Y_osx-64bit.tgz
+ x ./
+ x ./hugo
+ x ./LICENSE.md
+ x ./README.md
+
+# verify that it runs
+./hugo version
+Hugo Static Site Generator v0.13 BuildDate: 2015-02-22T04:02:30-06:00
+```
+
+You may need to add your bin directory to your `PATH` environment variable. The `which` command will check for us. If it can find `hugo`, it will print the full path to it. Otherwise, it will not print anything.
+
+```
+# check if hugo is in the path
+which hugo
+/Users/USERNAME/bin/hugo
+```
+
+If `hugo` is not in your `PATH`:
+
+1. Determine your default shell (zsh or bash).
+
+ ```
+ echo $SHELL
+ ```
+
+2. Edit your profile.
+
+ If your default shell is zsh:
+
- ```
- export PATH=$PATH:$HOME/bin
- ```
++ ```
++ nano ~/.zprofile
++ ```
++
++ If your default shell is bash:
++
++ ```
++ nano ~/.bash_profile
++ ```
+
+3. Insert a line to add `$HOME/bin` to your existing `PATH`.
+
- ### Assumptions
++ ```
++ export PATH=$PATH:$HOME/bin
++ ```
+
+4. Save the file by pressing Control-X, then Y.
+
+5. Close the terminal and open a new terminal to pick up the changes to your profile. Verify the change by running the `which hugo` command again.
+
+You've successfully installed Hugo.
+
+### Build from Source on Mac
+
+If you want to compile Hugo yourself, you'll need to install Go (aka Golang). You can [install Go directly from the Go website](https://golang.org/dl/) or via Homebrew using the following command:
+
+```
+brew install go
+```
+
+#### Step 1: Get the Source
+
+If you want to compile a specific version of Hugo, go to <https://github.com/gohugoio/hugo/releases> and download the source code for the version of your choice. If you want to compile Hugo with all the latest changes (which might include bugs), clone the Hugo repository:
+
+```
+git clone https://github.com/gohugoio/hugo
+```
+
+{{% warning "Sometimes \"Latest\" = \"Bugs\""%}}
+Cloning the Hugo repository directly means taking the good with the bad. By using the bleeding-edge version of Hugo, you make your development susceptible to the latest features, as well as the latest bugs. Your feedback is appreciated. If you find a bug in the latest release, [please create an issue on GitHub](https://github.com/gohugoio/hugo/issues/new).
+{{% /warning %}}
+
+#### Step 2: Compiling
+
+Make the directory containing the source your working directory and then fetch Hugo's dependencies:
+
+```
+mkdir -p src/github.com/gohugoio
+ln -sf $(pwd) src/github.com/gohugoio/hugo
+
+go get
+```
+
+This will fetch the absolute latest version of the dependencies. If Hugo fails to build, it may be the result of a dependency's author introducing a breaking change.
+
+Once you have properly configured your directory, you can compile Hugo using the following command:
+
+```
+go build -o hugo main.go
+```
+
+Then place the `hugo` executable somewhere in your `$PATH`. You're now ready to start using Hugo.
+
+## Windows
+
+The following aims to be a complete guide to installing Hugo on your Windows PC.
+
+{{< youtube G7umPCU-8xc >}}
+
- 3. In PowerShell or your preferred CLI, add the `hugo.exe` executable to your PATH by navigating to `C:\Hugo\bin` (or the location of your hugo.exe file) and use the command `set PATH=%PATH%;C:\Hugo\bin`. If the `hugo` command does not work after a reboot, you may have to run the command prompt as administrator.
++### Assumptions for Windows
+
+1. You will use `C:\Hugo\Sites` as the starting point for your new project.
+2. You will use `C:\Hugo\bin` to store executable files.
+
+### Set up Your Directories
+
+You'll need a place to store the Hugo executable, your [content][], and the generated Hugo website:
+
+1. Open Windows Explorer.
+2. Create a new folder: `C:\Hugo`, assuming you want Hugo on your C drive, although this can go anywhere
+3. Create a subfolder in the Hugo folder: `C:\Hugo\bin`
+4. Create another subfolder in Hugo: `C:\Hugo\Sites`
+
+### Technical Users
+
+1. Download the latest zipped Hugo executable from [Hugo Releases][releases].
+2. Extract all contents to your `..\Hugo\bin` folder.
- snap install hugo --channel=extended
++3. Open Windows Command Line (cmd, "DOS") to add the `hugo.exe` executable to your PATH
++ * do `set PATH=%PATH%;C:\Hugo\bin` to have hugo in PATH for the currently opened cmd box
++ * do `setx PATH "%PATH%;C:\Hugo\bin"` to have hugo in PATH for every newly opened cmd box
++ * note: "setx", not "set", plus syntax 'key "val"', not 'key=val'
++
++> You may also use "Git CMD" from the [Git for Windows package](https://gitforwindows.org/) for the native Windows commands [set](https://ss64.com/nt/set.html) and [setx](https://ss64.com/nt/setx.html), but not "Git Bash", PowerShell, or any other "CLI" with different commands
+
+### Less-technical Users
+
+1. Go to the [Hugo Releases][releases] page.
+2. The latest release is announced on top. Scroll to the bottom of the release announcement to see the downloads. They're all ZIP files.
+3. Find the Windows files near the bottom (they're in alphabetical order, so Windows is last) – download either the 32-bit or 64-bit file depending on whether you have 32-bit or 64-bit Windows. (If you don't know, [see here](https://esupport.trendmicro.com/en-us/home/pages/technical-support/1038680.aspx).)
+4. Move the ZIP file into your `C:\Hugo\bin` folder.
+5. Double-click on the ZIP file and extract its contents. Be sure to extract the contents into the same `C:\Hugo\bin` folder – Windows will do this by default unless you tell it to extract somewhere else.
+6. You should now have three new files: The hugo executable (`hugo.exe`), `LICENSE`, and `README.md`.
+
+Now you need to add Hugo to your Windows PATH settings:
+
+#### For Windows 10 Users:
+
+* Right click on the **Start** button.
+* Click on **System**.
+* Click on **Advanced System Settings** on the right.
+* Click on the **Environment Variables...** button on the bottom.
+* In the User variables section, select the row labeled "Path" and click the **Edit...** button.
+* Click the **Browse...** button and select the directory to which `hugo.exe` was extracted, which is `C:\Hugo\bin` if you went by the instructions above. *The path entry should be the folder where Hugo lives and not the binary itself.*
+* Click OK at every window to exit.
+
+#### For Windows 7 and 8.x users:
+
+Windows 7 and 8.1 do not include the easy path editor included in Windows 10, so non-technical users on those platforms are advised to install a free third-party path editor like [Windows Environment Variables Editor].
+
+### Verify the Executable
+
+Run a few commands to verify that the executable is ready to run, and then build a sample site to get started.
+
+#### 1. Open a Command Prompt
+
+At the prompt, type `hugo help` and press the <kbd>Enter</kbd> key. You should see output that starts with:
+
+```
+hugo is the main command, used to build your Hugo site.
+
+Hugo is a Fast and Flexible Static Site Generator
+built with love by spf13 and friends in Go.
+
+Complete documentation is available at https://gohugo.io/.
+```
+
+If you do, then the installation is complete. If you don't, double-check the path that you placed the `hugo.exe` file in and that you typed that path correctly when you added it to your `PATH` variable. If you're still not getting the output, search the [Hugo discussion forum][forum] to see if others have already figured out our problem. If not, add a note---in the "Support" category---and be sure to include your command and the output.
+
+At the prompt, change your directory to the `Sites` directory.
+
+```
+C:\Program Files> cd C:\Hugo\Sites
+C:\Hugo\Sites>
+```
+
+#### 2. Run the Command
+
+Run the command to generate a new site. I'm using `example.com` as the name of the site.
+
+```
+C:\Hugo\Sites> hugo new site example.com
+```
+
+You should now have a directory at `C:\Hugo\Sites\example.com`. Change into that directory and list the contents. You should get output similar to the following:
+
+```
+C:\Hugo\Sites> cd example.com
+C:\Hugo\Sites\example.com> dir
+Directory of C:\hugo\sites\example.com
+
+04/13/2015 10:44 PM <DIR> .
+04/13/2015 10:44 PM <DIR> ..
+04/13/2015 10:44 PM <DIR> archetypes
+04/13/2015 10:44 PM 83 config.toml
+04/13/2015 10:44 PM <DIR> content
+04/13/2015 10:44 PM <DIR> data
+04/13/2015 10:44 PM <DIR> layouts
+04/13/2015 10:44 PM <DIR> static
+ 1 File(s) 83 bytes
+ 7 Dir(s) 6,273,331,200 bytes free
+```
+
+### Troubleshoot Windows Installation
+
+[@dhersam][] has created a nice video on common issues:
+
+{{< youtube c8fJIRNChmU >}}
+
+## Linux
+
+### Snap Package
+
+In any of the [Linux distributions that support snaps][snaps], you may install the "extended" Sass/SCSS version with this command:
+
- snap install hugo
++```
++snap install hugo --channel=extended
++```
+
+To install the non-extended version without Sass/SCSS support:
+
- sudo apt-get install hugo
++```
++snap install hugo
++```
+
+To switch between the two, use either `snap refresh hugo --channel=extended` or `snap refresh hugo --channel=stable`.
+
+{{% note %}}
+Hugo installed via Snap can write only inside the user’s `$HOME` directory---and gvfs-mounted directories owned by the user---because of Snaps’ confinement and security model. More information is also available [in this related GitHub issue](https://github.com/gohugoio/hugo/issues/3143).
+{{% /note %}}
+
+### Debian and Ubuntu
+
+[@anthonyfok](https://github.com/anthonyfok) and friends in the [Debian Go Packaging Team](https://go-team.pages.debian.net/) maintains an official hugo [Debian package](https://packages.debian.org/hugo) which is shared with [Ubuntu](https://packages.ubuntu.com/hugo) and is installable via `apt-get`:
+
- sudo pacman -Syu hugo
++```
++sudo apt-get install hugo
++```
+
+What this installs depends on your Debian/Ubuntu version. On Ubuntu bionic (18.04), this installs the non-extended version without Sass/SCSS support. On Ubuntu disco (19.04), this installs the extended version with Sass/SCSS support.
+
+This option is not recommended because the Hugo in Linux package managers for Debian and Ubuntu is usually a few versions behind as described [here](https://github.com/gcushen/hugo-academic/issues/703)
+
+### Arch Linux
+
+You can also install Hugo from the Arch Linux [community](https://www.archlinux.org/packages/community/x86_64/hugo/) repository. Applies also to derivatives such as Manjaro.
+
+```
- sudo dnf install hugo
++sudo pacman -S hugo
+```
+
+### Fedora, Red Hat and CentOS
+
+Fedora maintains an [official package for Hugo](https://packages.fedoraproject.org/pkgs/hugo/hugo) which may be installed with:
+
- doas pkg_add hugo
++```
++sudo dnf install hugo
++```
+
+For the latest version, the Hugo package maintained by [@daftaupe](https://github.com/daftaupe) at Fedora Copr is recommended:
+
+* <https://copr.fedorainfracloud.org/coprs/daftaupe/hugo/>
+
+See the [related discussion in the Hugo forums][redhatforum].
+
+### openSUSE Tumbleweed
+
+openSUSE maintains an [official package](https://software.opensuse.org/package/hugo) for the Tumbleweed rolling release distribution, it may be installed with:
+
+````
+sudo zypper install hugo
+````
+
+### Solus
+
+Solus includes Hugo in its package repository, it may be installed with:
+
+```
+sudo eopkg install hugo
+```
+
+## OpenBSD
+
+OpenBSD provides a package for Hugo via `pkg_add`:
+
++```
++doas pkg_add hugo
++```
+
+
+## Upgrade Hugo
+
+Upgrading Hugo is as easy as downloading and replacing the executable you’ve placed in your `PATH` or run `brew upgrade hugo` if using Homebrew.
+
+## Next Steps
+
+Now that you've installed Hugo, read the [Quick Start guide][quickstart] and explore the rest of the documentation. If you have questions, ask the Hugo community directly by visiting the [Hugo Discussion Forum][forum].
+
+[brew]: https://brew.sh/
+[macports]: https://www.macports.org/
+[Chocolatey]: https://chocolatey.org/
+[content]: /content-management/
+[@dhersam]: https://github.com/dhersam
+[forum]: https://discourse.gohugo.io
+[mage]: https://github.com/magefile/mage
+[dep]: https://github.com/golang/dep
+[highlight shortcode]: /content-management/shortcodes/#highlight
+[installgit]: https://git-scm.com/
++[GCC]: http://www.mingw.org/
+[installgo]: https://golang.org/dl/
+[linuxbrew]: https://docs.brew.sh/Homebrew-on-Linux
+[quickstart]: /getting-started/quick-start/
+[redhatforum]: https://discourse.gohugo.io/t/solved-fedora-copr-repository-out-of-service/2491
+[releases]: https://github.com/gohugoio/hugo/releases
+[Scoop]: https://scoop.sh/
+[snaps]: https://snapcraft.io/docs/installing-snapd
+[windowsarch]: https://esupport.trendmicro.com/en-us/home/pages/technical-support/1038680.aspx
+[Windows Environment Variables Editor]: https://eveditor.com/
--- /dev/null
--- /dev/null
++---
++title: Host on 21YunBox
++linktitle: Host on 21YunBox
++description: Host your Hugo site with 21YunBox's blazing fast Chinese CDN, fully-managed SSL and auto deploys from Gitee.
++date: 2021-01-06
++publishdate: 2021-01-06
++lastmod: 2021-01-06
++categories: [hosting and deployment]
++keywords: [21yunbox,hosting,deployment]
++authors: [Toby Glei]
++menu:
++ docs:
++ parent: "hosting-and-deployment"
++ weight: 10
++weight: 10
++sections_weight: 10
++draft: false
++aliases: []
++toc: true
++---
++
++[21YunBox](https://www.21yunbox.com) is a fully-managed cloud platform dedicated to make web deployment easy within the Chinese Great Firewall where you can host static sites, backend APIs, databases, cron jobs, and all your other apps in one place. It provides blazing fast Chinese CDN, continuous deployment, one-click HTTPS and [other services like managed databases and backend web services](https://www.21yunbox.com/docs/), providing an avenue to launch web projects in China.
++
++21YunBox includes the following features:
++
++- Continuous, automatic builds & deploys from GitHub and Gitee
++- Automatic SSL certificates through [Let's Encrypt](https://letsencrypt.org)
++- Instant cache invalidation with a blazing fast, Chinese CDN
++- Unlimited [custom domains](https://www.21yunbox.com/docs/#/custom-domains)
++- Automatic [Brotli compression](https://en.wikipedia.org/wiki/Brotli) for faster sites
++- Native HTTP/2 support
++- Automatic HTTP → HTTPS redirects
++- Custom URL redirects and rewrites
++
++## Prerequisites
++
++This guide assumes you already have a Hugo project to deploy. If you need a project, use the [Quick Start](/getting-started/quick-start/) to get started or fork 21YunBox's [Hugo Example](https://gitee.com/eryiyunbox-examples/hello-hugo) before continuing.
++
++## Setup
++
++You can set up a Hugo site on 21YunBox in two quick steps:
++
++1. Create a new web service on 21YunBox, and give 21YunBox permission to access your GitHub or Gitee repo.
++2. Use the following values during creation:
++
++ | Field | Value |
++ | --------------------- | ------------------------------------------------ |
++ | **Environment** | `Static Site` |
++ | **Build Command** | `hugo --gc --minify` (or your own build command) |
++ | **Publish Directory** | `./public` (or your own output directory) |
++
++That's it! Your site will be live on your 21YunBox URL (which looks like `yoursite.21yunbox.com`) as soon as the build is done.
++
++## Continuous deploys
++
++Now that 21YunBox is connected to your repo, it will automatically build and publish your site any time you push to GitHub.
++
++Every deploy automatically and instantly invalidates the CDN cache, so your users can always access the latest content on your site.
++
++## Custom domains
++
++Add your own domains to your site easily using 21YunBox's [custom domains](https://www.21yunbox.com/docs/#/custom-domains) guide.
++
++## Support
++Click [here](https://www.21yunbox.com/docs/#/contact) to contact with 21YunBox' experts if you need help.
--- /dev/null
--- /dev/null
++---
++title: Hosting on Azure Static Web Apps
++linktitle: Hosting on Azure Static Web Apps
++description: Learn how to deploy a Hugo application to Azure Static Web Apps.
++date: 2022-05-09
++publishdate: 2022-05-09
++categories: [hosting and deployment]
++keywords: [hosting,Azure Static Web Apps]
++authors: [Azure Static Web Apps]
++menu:
++ docs:
++ parent: "hosting-and-deployment"
++ weight: 200
++weight: 200
++sections_weight: 200
++draft: false
++toc: true
++aliases: []
++---
++
++You can create and deploy a Hugo web application to Azure Static Web Apps. The final result is a new Azure Static Web App with associated GitHub Actions that give you control over how the app is built and published. You'll learn how to create a Hugo app, setup an Azure Static Web App and deploy the Hugo app to Azure.
++
++Here's the tutorial on how to [Publish a Hugo site to Azure Static Web Apps](https://docs.microsoft.com/en-us/azure/static-web-apps/publish-hugo).
--- /dev/null
- GitHub executes your software development workflows. Everytime you push your code on the Github repository, Github Actions will build the site automatically.
+---
+title: Host on GitHub
+linktitle: Host on GitHub
+description: Deploy Hugo as a GitHub Pages project or personal/organizational site and automate the whole process with Github Action Workflow
+date: 2014-03-21
+publishdate: 2014-03-21
+categories: [hosting and deployment]
+keywords: [github,git,deployment,hosting]
+authors: [Spencer Lyon, Gunnar Morling]
+menu:
+ docs:
+ parent: "hosting-and-deployment"
+ weight: 30
+weight: 30
+sections_weight: 30
+toc: true
+aliases: [/tutorials/github-pages-blog/]
+---
+
+GitHub provides free and fast static hosting over SSL for personal, organization, or project pages directly from a GitHub repository via its [GitHub Pages service][] and automating development workflows and build with [GitHub Actions].
+
+## Assumptions
+
+1. You have Git 2.8 or greater [installed on your machine][installgit].
+2. You have a GitHub account. [Signing up][ghsignup] for GitHub is free.
+3. You have a ready-to-publish Hugo website or have at least completed the [Quick Start][].
+
+## Types of GitHub Pages
+
+There are two types of GitHub Pages:
+
+- User/Organization Pages (`https://<USERNAME|ORGANIZATION>.github.io/`)
+- Project Pages (`https://<USERNAME|ORGANIZATION>.github.io/<PROJECT>/`)
+
+Please refer to the [GitHub Pages documentation][ghorgs] to decide which type of site you would like to create as it will determine which of the below methods to use.
+
+## Branches for GitHub Actions
+
+The GitHub Actions used in these instructions pull source content from the `main` branch and then commit the generated content to the `gh-pages` branch. This applies regardless of what type of GitHub Pages you are using. This is a clean setup as your Hugo files are stored in one branch and your generated files are published into a separate branch.
+
+## GitHub User or Organization Pages
+
+As mentioned in the [GitHub Pages documentation][ghorgs], you can host a user/organization page in addition to project pages. Here are the key differences in GitHub Pages websites for Users and Organizations:
+
+1. You must create a repository named `<USERNAME>.github.io` or `<ORGANIZATION>.github.io` to host your pages
+2. By default, content from the `main` branch is used to publish GitHub Pages - rather than the `gh-pages` branch which is the default for project sites. However, the GitHub Actions in these instructions publish to the `gh-pages` branch. Therefore, if you are publishing Github pages for a user or organization, you will need to change the publishing branch to `gh-pages`. See the instructions later in this document.
+
+## Build Hugo With GitHub Action
+
- runs-on: ubuntu-20.04
++GitHub executes your software development workflows. Everytime you push your code on the GitHub repository, Github Actions will build the site automatically.
+
+Create a file in `.github/workflows/gh-pages.yml` containing the following content (based on [actions-hugo](https://github.com/marketplace/actions/hugo-setup)):
+
+```yml
+name: github pages
+
+on:
+ push:
+ branches:
+ - main # Set a branch to deploy
+ pull_request:
+
+jobs:
+ deploy:
- - uses: actions/checkout@v2
++ runs-on: ubuntu-22.04
+ steps:
- ## Github pages setting
++ - uses: actions/checkout@v3
+ with:
+ submodules: true # Fetch Hugo themes (true OR recursive)
+ fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
+
+ - name: Setup Hugo
+ uses: peaceiris/actions-hugo@v2
+ with:
+ hugo-version: 'latest'
+ # extended: true
+
+ - name: Build
+ run: hugo --minify
+
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v3
+ if: github.ref == 'refs/heads/main'
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./public
+```
+
+For more advanced settings [actions-hugo](https://github.com/marketplace/actions/hugo-setup) and [actions-gh-pages](https://github.com/marketplace/actions/github-pages-action).
+
++## GitHub pages setting
++
+By default, the GitHub action pushes the generated content to the `gh-pages` branch. This means GitHub has to serve your `gh-pages` branch as a GitHub Pages branch. You can change this setting by going to Settings > GitHub Pages, and change the source branch to `gh-pages`.
+
+## Change baseURL in config.toml
++
+Don't forget to rename your `baseURL` in `config.toml` with the value `https://<USERNAME>.github.io` for your user repository or `https://<USERNAME>.github.io/<REPOSITORY_NAME>` for a project repository.
+
+Unless this is present in your `config.toml`, your website won't work.
+
+## Use a Custom Domain
+
+If you'd like to use a custom domain for your GitHub Pages site, create a file `static/CNAME`. Your custom domain name should be the only contents inside `CNAME`. Since it's inside `static`, the published site will contain the CNAME file at the root of the published site, which is a requirement of GitHub Pages.
+
+Refer to the [official documentation for custom domains][domains] for further information.
+
+[config]: /getting-started/configuration/
+[domains]: https://help.github.com/articles/using-a-custom-domain-with-github-pages/
+[ghorgs]: https://help.github.com/articles/user-organization-and-project-pages/#user--organization-pages
+[ghpfromdocs]: https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/
+[ghsignup]: https://github.com/join
+[GitHub Pages service]: https://help.github.com/articles/what-is-github-pages/
+[installgit]: https://git-scm.com/downloads
+[orphan branch]: https://git-scm.com/docs/git-checkout/#Documentation/git-checkout.txt---orphanltnewbranchgt
+[Quick Start]: /getting-started/quick-start/
+[submodule]: https://github.com/blog/2104-working-with-submodules
+[worktree feature]: https://git-scm.com/docs/git-worktree
+[GitHub Actions]: https://docs.github.com/en/actions
--- /dev/null
+---
+title: Babel
+description: Hugo Pipes can process JS files with Babel.
+date: 2019-03-21
+publishdate: 2019-03-21
+lastmod: 2019-03-21
+categories: [asset management]
+keywords: []
+menu:
+ docs:
+ parent: "pipes"
+ weight: 48
+weight: 48
+sections_weight: 48
+draft: false
+---
+
+Any JavaScript resource file can be transpiled to another JavaScript version using `resources.Babel` which takes for argument the resource object and an optional dict of options listed below. Babel uses the [babel cli](https://babeljs.io/docs/en/babel-cli).
+
+
+{{% note %}}
+Hugo Pipe's Babel requires the `@babel/cli` and `@babel/core` JavaScript packages to be installed in the project or globally (`npm install -g @babel/cli @babel/core`) along with any Babel plugin(s) or preset(s) used (e.g., `npm install @babel/preset-env --save-dev`).
+
+If you are using the Hugo Snap package, Babel and plugin(s) need to be installed locally within your Hugo site directory, e.g., `npm install @babel/cli @babel/core --save-dev` without the `-g` flag.
+{{% /note %}}
+
+
+### Config
+
+{{< new-in "v0.75.0" >}}
+
+In Hugo `v0.75` we improved the way we resolve JS configuration and dependencies. One of them is that we now add the main project's `node_modules` to `NODE_PATH` when running Babel and similar tools. There are some known [issues](https://github.com/babel/babel/issues/5618) with Babel in this area, so if you have a `babel.config.js` living in a Hugo Module (and not in the project itself), we recommend using `require` to load the presets/plugins, e.g.:
+
+
+```js
+module.exports = {
+ presets: [
+ [
+ require('@babel/preset-env'),
+ {
+ useBuiltIns: 'entry',
+ corejs: 3
+ }
+ ]
+ ]
+};
+```
+
+
+
+### Options
+
+config [string]
+: Path to the Babel configuration file. Hugo will, by default, look for a `babel.config.js` in your project. More information on these configuration files can be found here: [babel configuration](https://babeljs.io/docs/en/configuration).
+
+minified [bool]
+: Save as much bytes as possible when printing
+
+noComments [bool]
+: Write comments to generated output (true by default)
+
+compact [bool]
+: Do not include superfluous whitespace characters and line terminators. Defaults to `auto` if not set.
+
+verbose [bool]
+: Log everything
+
++sourceMap [string]
++: Output `inline` or `external` sourcemap from the babel compile. External sourcemaps will be written to the target with the output file name + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.
++
++
+### Examples
+
+```go-html-template
+{{- $transpiled := resources.Get "scripts/main.js" | babel -}}
+```
+
+Or with options:
+
+```go-html-template
+{{ $opts := dict "noComments" true }}
+{{- $transpiled := resources.Get "scripts/main.js" | babel $opts -}}
+```
--- /dev/null
- : Whether to generate source maps. Enum, currently only `inline` (we will improve that).
+---
+title: JavaScript Building
+description: Hugo Pipes can process JavaScript files with [ESBuild](https://github.com/evanw/esbuild).
+date: 2020-07-20
+publishdate: 2020-07-20
+lastmod: 2020-07-20
+categories: [asset management]
+keywords: []
+menu:
+ docs:
+ parent: "pipes"
+ weight: 45
+weight: 45
+sections_weight: 45
+draft: false
+---
+
+Any JavaScript resource file can be transpiled and "tree shaken" using `js.Build` which takes for argument either a string for the filepath or a dict of options listed below.
+
+### Options
+
+targetPath [string]
+: If not set, the source path will be used as the base target path.
+Note that the target path's extension may change if the target MIME type is different, e.g. when the source is TypeScript.
+
+params [map or slice] {{< new-in "0.78.0" >}}
+: Params that can be imported as JSON in your JS files, e.g.:
+
+```go-html-template
+{{ $js := resources.Get "js/main.js" | js.Build (dict "params" (dict "api" "https://example.org/api")) }}
+```
+And then in your JS file:
+
+```js
+import * as params from '@params';
+```
+
+Note that this is meant for small data sets, e.g. config settings. For larger data, please put/mount the files into `/assets` and import them directly.
+
+minify [bool]
+: Let `js.Build` handle the minification.
+
+inject [slice] {{< new-in "0.81.0" >}}
+: This option allows you to automatically replace a global variable with an import from another file. The path names must be relative to `assets`. See https://esbuild.github.io/api/#inject
+
+shims {{< new-in "0.81.0" >}}
+: This option allows swapping out a component with another. A common use case is to load dependencies like React from a CDN (with _shims_) when in production, but running with the full bundled `node_modules` dependency during development:
+
+```
+{{ $shims := dict "react" "js/shims/react.js" "react-dom" "js/shims/react-dom.js" }}
+{{ $js = $js | js.Build dict "shims" $shims }}
+```
+
+The _shim_ files may look like these:
+
+```js
+// js/shims/react.js
+module.exports = window.React;
+```
+
+```js
+// js/shims/react-dom.js
+module.exports = window.ReactDOM;
+```
+
+
+With the above, these imports should work in both scenarios:
+
+```js
+import * as React from 'react'
+import * as ReactDOM from 'react-dom';
+```
++sourceMap [string, bool] {{< new-in "0.75.0" >}}
++: Let `js.Build` output sourceMap. Current only inline is supported. true defaults to inline.
++ One of: '`inline`, `external`
++ Default is "" (disabled)
+
+target [string]
+: The language target.
+ One of: `es5`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020` or `esnext`.
+ Default is `esnext`.
+
+externals [slice]
+: External dependencies. Use this to trim dependencies you know will never be executed. See https://esbuild.github.io/api/#external
+
+
+defines [map]
+: Allow to define a set of string replacement to be performed when building. Should be a map where each key is to be replaced by its value.
+
+```go-html-template
+{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
+```
+
+format [string] {{< new-in "0.74.3" >}}
+: The output format.
+ One of: `iife`, `cjs`, `esm`.
+ Default is `iife`, a self-executing function, suitable for inclusion as a <script> tag.
+
+sourceMap
++: Whether to generate `inline` or `external` sourcemap from esbuild. External sourcemaps will be written to the target with the output file name + ".map". Input sourcemaps can be read from js.Build and node modules and combined into the output sourcemaps.
+
+### Import JS code from /assets
+
+{{< new-in "0.78.0" >}}
+
+Since Hugo `v0.78.0` `js.Build` has full support for the virtual union file system in [Hugo Modules](/hugo-modules/). You can see some simple examples in this [test project](https://github.com/gohugoio/hugoTestProjectJSModImports), but in short this means that you can do this:
+
+```js
+import { hello } from 'my/module';
+```
+
+And it will resolve to the top-most `index.{js,ts,tsx,jsx}` inside `assets/my/module` in the layered file system.
+
+```js
+import { hello3 } from 'my/module/hello3';
+```
+
+Will resolve to `hello3.{js,ts,tsx,jsx}` inside `assets/my/module`.
+
+Any imports starting with `.` is resolved relative to the current file:
+
+```js
+import { hello4 } from './lib';
+```
+
+For other files (e.g. `JSON`, `CSS`) you need to use the relative path including any extension, e.g:
+
+```js
+import * as data from 'my/module/data.json';
+```
+
+Any imports in a file outside `/assets` or that does not resolve to a component inside `/assets` will be resolved by [ESBuild](https://esbuild.github.io/) with the **project directory** as the resolve directory (used as the starting point when looking for `node_modules` etc.). Also see [hugo mod npm pack](/commands/hugo_mod_npm_pack/). If you have any imported NPM dependencies in your project, you need to make sure to run `npm install` before you run `hugo`.
+
+Also note the new `params` option that can be passed from template to your JS files, e.g.:
+
+```go-html-template
+{{ $js := resources.Get "js/main.js" | js.Build (dict "params" (dict "api" "https://example.org/api")) }}
+```
+And then in your JS file:
+
+```js
+import * as params from '@params';
+```
+
+Hugo will, by default, generate a `assets/jsconfig.json` file that maps the imports. This is useful for navigation/intellisense help inside code editors, but if you don't need/want it, you can [turn it off](/getting-started/configuration/#configure-build).
+
+
+
+### Include Dependencies In package.json / node_modules
+
+Any imports in a file outside `/assets` or that does not resolve to a component inside `/assets` will be resolved by [ESBuild](https://esbuild.github.io/) with the **project directory** as the resolve directory (used as the starting point when looking for `node_modules` etc.). Also see [hugo mod npm pack](/commands/hugo_mod_npm_pack/). If you have any imported NPM dependencies in your project, you need to make sure to run `npm install` before you run `hugo`.
+
+{{< new-in "0.78.1" >}} From Hugo `0.78.1` the start directory for resolving NPM packages (aka. packages that live inside a `node_modules` folder) is always the main project folder.
+
+**Note:** If you're developing a theme/component that is supposed to be imported and depends on dependencies inside `package.json`, we recommend reading about [hugo mod npm pack](/commands/hugo_mod_npm_pack/), a tool to consolidate all the NPM dependencies in a project.
+
+
+### Examples
+
+```go-html-template
+{{ $built := resources.Get "js/index.js" | js.Build "main.js" }}
+```
+
+Or with options:
+
+```go-html-template
+{{ $externals := slice "react" "react-dom" }}
+{{ $defines := dict "process.env.NODE_ENV" `"development"` }}
+
+{{ $opts := dict "targetPath" "main.js" "externals" $externals "defines" $defines }}
+{{ $built := resources.Get "scripts/main.js" | js.Build $opts }}
+<script type="text/javascript" src="{{ $built.RelPermalink }}" defer></script>
+```
+
+
--- /dev/null
- : Path to the PostCSS configuration file
+---
+title: PostCSS
+description: Hugo Pipes can process CSS files with PostCSS.
+date: 2018-07-14
+publishdate: 2018-07-14
+lastmod: 2018-07-14
+categories: [asset management]
+keywords: []
+menu:
+ docs:
+ parent: "pipes"
+ weight: 40
+weight: 40
+sections_weight: 40
+draft: false
+---
+
+Any asset file can be processed using `resources.PostCSS` which takes for argument the resource object and a slice of options listed below.
+
+The resource will be processed using the project's or theme's own `postcss.config.js` or any file set with the `config` option.
+
+```go-html-template
+{{ $css := resources.Get "css/main.css" }}
+{{ $style := $css | resources.PostCSS }}
+```
+
+{{% note %}}
+Hugo Pipe's PostCSS requires the `postcss-cli` JavaScript package to be installed in the environment (`npm install -g postcss postcss-cli`) along with any PostCSS plugin(s) used (e.g., `npm install -g autoprefixer`).
+
+If you are using the Hugo Snap package, PostCSS and plugin(s) need to be installed locally within your Hugo site directory, e.g., `npm install postcss-cli` without the `-g` flag.
+{{% /note %}}
+
+### Options
+
+config [string]
- {{ $options := dict "config" "customPostCSS.js" "noMap" true }}
++: Set a custom directory to look for a config file
+
+noMap [bool]
+: Default is `false`. Disable the default inline sourcemaps
+
+inlineImports [bool] {{< new-in "0.66.0" >}}
+: Default is `false`. Enable inlining of @import statements. It does so recursively, but will only import a file once.
+URL imports (e.g. `@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');`) and imports with media queries will be ignored.
+Note that this import routine does not care about the CSS spec, so you can have @import anywhere in the file.
+Hugo will look for imports relative to the module mount and will respect theme overrides.
+
+skipInlineImportsNotFound [bool] {{< new-in "0.99.0" >}}
+
+Before Hugo 0.99.0 when `inlineImports` was enabled and we failed to resolve an import, we logged it as a warning. We now fail the build. If you have regular CSS imports in your CSS that you want to preserve, you can either use imports with URL or media queries (Hugo does not try to resolve those) or set `skipInlineImportsNotFound` to true.
+
+_If no configuration file is used:_
+
+use [string]
+: Space-delimited list of PostCSS plugins to use
+
+parser [string]
+: Custom PostCSS parser
+
+stringifier [string]
+: Custom PostCSS stringifier
+
+syntax [string]
+: Custom postcss syntax
+
+```go-html-template
++{{ $options := dict "config" "/path/to/custom-config-directory" "noMap" true }}
+{{ $style := resources.Get "css/main.css" | resources.PostCSS $options }}
+
+{{ $options := dict "use" "autoprefixer postcss-color-alpha" }}
+{{ $style := resources.Get "css/main.css" | resources.PostCSS $options }}
+```
+
+## Check Hugo Environment from postcss.config.js
+
+{{< new-in "0.66.0" >}}
+
+The current Hugo environment name (set by `--environment` or in config or OS environment) is available in the Node context, which allows constructs like this:
+
+```js
+module.exports = {
+ plugins: [
+ require('autoprefixer'),
+ ...process.env.HUGO_ENVIRONMENT === 'production'
+ ? [purgecss]
+ : []
+ ]
+}
+```
--- /dev/null
- lastmod: 2017-03-31
+---
+title: Custom 404 Page
+linktitle: 404 Page
+description: If you know how to create a single page template, you have unlimited options for creating a custom 404.
+date: 2017-02-01
+publishdate: 2017-02-01
- <h1 id="title"><a href="{{ "/" | relURL }}">Go Home</a></h1>
+categories: [templates]
+keywords: [404, page not found]
+menu:
+ docs:
+ parent: "templates"
+ weight: 120
+weight: 120 #rem
+draft: false
+aliases: []
+toc: false
+---
+
+When using Hugo with [GitHub Pages](https://pages.github.com/), you can provide your own template for a [custom 404 error page](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-custom-404-page-for-your-github-pages-site) by creating a 404.html template file in your `/layouts` folder. When Hugo generates your site, the `404.html` file will be placed in the root.
+
+404 pages will have all the regular [page variables][pagevars] available to use in the templates.
+
+In addition to the standard page variables, the 404 page has access to all site content accessible from `.Pages`.
+
+```
+▾ layouts/
+ 404.html
+```
+
+## 404.html
+
+This is a basic example of a 404.html template:
+
+{{< code file="layouts/404.html" download="404.html" >}}
+{{ define "main"}}
+ <main id="main">
+ <div>
- * DigitalOcean App Platform. You can specify `error_document` in your app specification file or use control panel to set up error document. [Details here](https://docs.digitalocean.com/products/app-platform/references/app-specification-reference/).
++ <h1 id="title"><a href="{{ "" | relURL }}">Go Home</a></h1>
+ </div>
+ </main>
+{{ end }}
+{{< /code >}}
+
+## Automatic Loading
+
+Your 404.html file can be set to load automatically when a visitor enters a mistaken URL path, dependent upon the web serving environment you are using. For example:
+
+* [GitHub Pages](/hosting-and-deployment/hosting-on-github/) and [GitLab Pages](/hosting-and-deployment/hosting-on-gitlab/). The 404 page is automatic.
+* Apache. You can specify `ErrorDocument 404 /404.html` in an `.htaccess` file in the root of your site.
+* Nginx. You might specify `error_page 404 /404.html;` in your `nginx.conf` file. [Details here](https://nginx.org/en/docs/http/ngx_http_core_module.html#error_page).
+* Amazon AWS S3. When setting a bucket up for static web serving, you can specify the error file from within the S3 GUI.
+* Amazon CloudFront. You can specify the page in the Error Pages section in the CloudFront Console. [Details here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
+* Caddy Server. Use the `handle_errors` directive to specify error pages for one or more status codes. [Details here](https://caddyserver.com/docs/caddyfile/directives/handle_errors)
+* Netlify. Add `/* /404.html 404` to `content/_redirects`. [Details Here](https://www.netlify.com/docs/redirects/#custom-404)
+* Azure Static website. You can specify the `Error document path` in the Static website configuration page of the Azure portal. [More details are available in the Static website documentation](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website).
++* DigitalOcean App Platform. You can specify `error_document` in your app specification file or use control panel to set up error document. [Details here](https://docs.digitalocean.com/products/app-platform/how-to/manage-static-sites/#configure-a-static-site).
++* [Firebase Hosting](https://firebase.google.com/docs/hosting/full-config#404): `/404.html` automatically gets used as the 404 page.
+
+{{% note %}}
+`hugo server` will not automatically load your custom `404.html` file, but you
+can test the appearance of your custom "not found" page by navigating your
+browser to `/404.html`.
+{{% /note %}}
+
+[pagevars]: /variables/page/
--- /dev/null
- The menu name can be anything, but take a note of what it is.
+---
+title: Menu Templates
+linktitle: Menu Templates
+description: Menus are a powerful but simple feature for content management but can be easily manipulated in your templates to meet your design needs.
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-02-01
+categories: [templates]
+keywords: [lists,sections,menus]
+menu:
+ docs:
+ title: "how to use menus in templates"
+ parent: "templates"
+ weight: 130
+weight: 130
+sections_weight: 130
+draft: false
+aliases: [/templates/menus/]
+toc: false
+---
+
+Hugo makes no assumptions about how your rendered HTML will be
+structured. Instead, it provides all of the functions you will need to be
+able to build your menu however you want.
+
+The following is an example:
+
+{{< code file="layouts/partials/sidebar.html" download="sidebar.html" >}}
+<!-- sidebar start -->
+<aside>
+ <ul>
+ {{ $currentPage := . }}
+ {{ range .Site.Menus.main }}
+ {{ if .HasChildren }}
+ <li class="{{ if $currentPage.HasMenuCurrent "main" . }}active{{ end }}">
+ <a href="#">
+ {{ .Pre }}
+ <span>{{ .Name }}</span>
+ </a>
+ </li>
+ <ul class="sub-menu">
+ {{ range .Children }}
+ <li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }}">
+ <a href="{{ .URL }}">{{ .Name }}</a>
+ </li>
+ {{ end }}
+ </ul>
+ {{ else }}
+ <li>
+ <a href="{{ .URL }}">
+ {{ .Pre }}
+ <span>{{ .Name }}</span>
+ </a>
+ </li>
+ {{ end }}
+ {{ end }}
+ <li>
+ <a href="#" target="_blank">Hardcoded Link 1</a>
+ </li>
+ <li>
+ <a href="#" target="_blank">Hardcoded Link 2</a>
+ </li>
+ </ul>
+</aside>
+{{< /code >}}
+
+{{% note "`absLangURL` and `relLangURL`" %}}
+Use the [`absLangURL`](/functions/abslangurl) or [`relLangURL`](/functions/rellangurl) functions if your theme makes use of the [multilingual feature](/content-management/multilingual/). In contrast to `absURL` and `relURL`, these two functions add the correct language prefix to the url.
+{{% /note %}}
+
+## Section Menu for Lazy Bloggers
+
+To enable this menu, configure `sectionPagesMenu` in your site `config`:
+
+```
+sectionPagesMenu = "main"
+```
+
- This will create a menu with all the sections as menu items and all the sections' pages as "shadow-members". The _shadow_ implies that the pages isn't represented by a menu-item themselves, but this enables you to create a top-level menu like this:
++The menu name can be anything, but take a note of what it is.
+
- {{% /note %}}
++This will create a menu with all the sections as menu items and all the sections' pages as "shadow-members". Ensure that all first level directories that you would like to show up on this menu are [Branch Bundles](https://gohugo.io/content-management/sections/). Leaf Bundles do not form sections.
++
++The _shadow_ implies that the pages isn't represented by a menu-item themselves, but this enables you to create a top-level menu like this:
+
+```
+<nav class="sidebar-nav">
+ {{ $currentPage := . }}
+ {{ range .Site.Menus.main }}
+ <a class="sidebar-nav-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
+ {{ end }}
+</nav>
+```
+
+In the above, the menu item is marked as active if on the current section's list page or on a page in that section.
+
+
+## Site Config menus
+
+The above is all that's needed. But if you want custom menu items, e.g. changing weight, name, or link title attribute, you can define them manually in the site config file:
+
+{{< code-toggle file="config" >}}
+[[menu.main]]
+ name = "This is the blog section"
+ title = "blog section"
+ weight = -110
+ identifier = "blog"
+ url = "/blog/"
+{{</ code-toggle >}}
+
+{{% note %}}
+The `identifier` *must* match the section name.
+{{% /note %}}
+
+## Menu Entries from the Page's front matter
+
+It's also possible to create menu entries from the page (i.e. the `.md`-file).
+
+Here is a `yaml` example:
+
+```
+---
+title: Menu Templates
+linktitle: Menu Templates
+menu:
+ docs:
+ title: "how to use menus in templates"
+ parent: "templates"
+ weight: 130
+---
+...
+```
+
+{{% note %}}
+You can define more than one menu. It also doesn't have to be a complex value,
+`menu` can also be a string, an array of strings, or an array of complex values
+like in the example above.
+{{% /note %}}
+
+### Using .Page in Menus
+
+If you use the front matter method of defining menu entries, you'll get access to the `.Page` variable.
+This allows to use every variable that's reachable from the [page variable](/variables/page/).
+
+This variable is only set when the menu entry is defined in the page's front matter.
+Menu entries from the site config don't know anything about `.Page`.
+
+That's why you have to use the go template's `with` keyword or something similar in your templating language.
+
+Here's an example:
+
+```
+<nav class="sidebar-nav">
+ {{ range .Site.Menus.main }}
+ <a href="{{ .URL }}" title="{{ .Title }}">
+ {{- .Name -}}
+ {{- with .Page -}}
+ <span class="date">
+ {{- dateFormat " (2006-01-02)" .Date -}}
+ </span>
+ {{- end -}}
+ </a>
+ {{ end }}
+</nav>
+```
+
+## Using .Params in Menus
+
+User-defined content on menu items are accessible via `.Params`.
+
+Here's an example:
+
+```
+<nav class="sidebar-nav">
+ {{ range .Site.Menus.main }}
+ <a href="{{ .URL }}" title="{{ .Title }}" class="{{ with .Params.class }}{{ . }}{{ end }}">
+ {{- .Name -}}
+ </a>
+ {{ end }}
+</nav>
+```
+
+{{% note %}}
+With Menu-level .Params they can easily exist on one menu item but not another. It's recommended to access them gracefully using the [with function](/functions/with).
++{{% /note %}}
--- /dev/null
- Hugo's [`.Parent` shortcode variable][parent] returns a boolean value depending on whether the shortcode in question is called within the context of a *parent* shortcode. This provides an inheritance model for common shortcode parameters.
+---
+title: Create Your Own Shortcodes
+linktitle: Shortcode Templates
+description: You can extend Hugo's built-in shortcodes by creating your own using the same templating syntax as that for single and list pages.
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-02-01
+categories: [templates]
+keywords: [shortcodes,templates]
+menu:
+ docs:
+ parent: "templates"
+ weight: 100
+weight: 100
+sections_weight: 100
+draft: false
+aliases: []
+toc: true
+---
+
+Shortcodes are a means to consolidate templating into small, reusable snippets that you can embed directly inside of your content. In this sense, you can think of shortcodes as the intermediary between [page and list templates][templates] and [basic content files][].
+
+{{% note %}}
+Hugo also ships with built-in shortcodes for common use cases. (See [Content Management: Shortcodes](/content-management/shortcodes/).)
+{{% /note %}}
+
+## Create Custom Shortcodes
+
+Hugo's built-in shortcodes cover many common, but not all, use cases. Luckily, Hugo provides the ability to easily create custom shortcodes to meet your website's needs.
+
+{{< youtube Eu4zSaKOY4A >}}
+
+### File Location
+
+To create a shortcode, place an HTML template in the `layouts/shortcodes` directory of your [source organization][]. Consider the file name carefully since the shortcode name will mirror that of the file but without the `.html` extension. For example, `layouts/shortcodes/myshortcode.html` will be called with either `{{</* myshortcode /*/>}}` or `{{%/* myshortcode /*/%}}` depending on the type of parameters you choose.
+
+You can organize your shortcodes in subfolders, e.g. in `layouts/shortcodes/boxes`. These shortcodes would then be accessible with their relative path, e.g:
+
+```
+{{</* boxes/square */>}}
+```
+
+Note the forward slash.
+
+### Shortcode Template Lookup Order
+
+Shortcode templates have a simple [lookup order][]:
+
+1. `/layouts/shortcodes/<SHORTCODE>.html`
+2. `/themes/<THEME>/layouts/shortcodes/<SHORTCODE>.html`
+
+### Positional vs Named Parameters
+
+You can create shortcodes using the following types of parameters:
+
+* Positional parameters
+* Named parameters
+* Positional *or* named parameters (i.e, "flexible")
+
+In shortcodes with positional parameters, the order of the parameters is important. If a shortcode has a single required value (e.g., the `youtube` shortcode below), positional parameters work very well and require less typing from content authors.
+
+For more complex layouts with multiple or optional parameters, named parameters work best. While less terse, named parameters require less memorization from a content author and can be added in a shortcode declaration in any order.
+
+Allowing both types of parameters (i.e., a "flexible" shortcode) is useful for complex layouts where you want to set default values that can be easily overridden by users.
+
+### Access Parameters
+
+All shortcode parameters can be accessed via the `.Get` method. Whether you pass a key (i.e., string) or a number to the `.Get` method depends on whether you are accessing a named or positional parameter, respectively.
+
+To access a parameter by name, use the `.Get` method followed by the named parameter as a quoted string:
+
+```
+{{ .Get "class" }}
+```
+
+To access a parameter by position, use the `.Get` followed by a numeric position, keeping in mind that positional parameters are zero-indexed:
+
+```
+{{ .Get 0 }}
+```
+
+For the second position, you would just use:
+
+```
+{{ .Get 1 }}
+```
+
+`with` is great when the output depends on a parameter being set:
+
+```
+{{ with .Get "class" }} class="{{ . }}"{{ end }}
+```
+
+`.Get` can also be used to check if a parameter has been provided. This is
+most helpful when the condition depends on either of the values, or both:
+
+```
+{{ if or (.Get "title") (.Get "alt") }} alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "title" }}{{ end }}"{{ end }}
+```
+
+#### `.Inner`
+
+If a closing shortcode is used, the `.Inner` variable will be populated with all of the content between the opening and closing shortcodes. If a closing shortcode is required, you can check the length of `.Inner` as an indicator of its existence.
+
+A shortcode with content declared via the `.Inner` variable can also be declared without the
+content and without the closing
+by using the self-closing syntax:
+
+```
+{{</* innershortcode /*/>}}
+```
+
+#### `.Params`
+
+The `.Params` variable in shortcodes contains the list parameters passed to shortcode for more complicated use cases. You can also access higher-scoped parameters with the following logic:
+
+`$.Params`
+: these are the parameters passed directly into the shortcode declaration (e.g., a YouTube video ID)
+
+`$.Page.Params`
+: refers to the page's params; the "page" in this case refers to the content file in which the shortcode is declared (e.g., a `shortcode_color` field in a content's front matter could be accessed via `$.Page.Params.shortcode_color`).
+
+`$.Page.Site.Params`
+: refers to global variables as defined in your [site's configuration file][config].
+
+#### `.IsNamedParams`
+
+The `.IsNamedParams` variable checks whether the shortcode declaration uses named parameters and returns a boolean value.
+
+For example, you could create an `image` shortcode that can take either a `src` named parameter or the first positional parameter, depending on the preference of the content's author. Let's assume the `image` shortcode is called as follows:
+
+```
+{{</* image src="images/my-image.jpg" */>}}
+```
+
+You could then include the following as part of your shortcode templating:
+
+```
+{{ if .IsNamedParams }}
+<img src="{{ .Get "src" }}" alt="">
+{{ else }}
+<img src="{{ .Get 0 }}" alt="">
+{{ end }}
+```
+
+See the [example Vimeo shortcode][vimeoexample] below for `.IsNamedParams` in action.
+
+{{% warning %}}
+While you can create shortcode templates that accept both positional and named parameters, you *cannot* declare shortcodes in content with a mix of parameter types. Therefore, a shortcode declared like `{{</* image src="images/my-image.jpg" "This is my alt text" */>}}` will return an error.
+{{% /warning %}}
+
+You can also use the variable `.Page` to access all the normal [page variables][pagevars].
+
+A shortcodes can also be nested. In a nested shortcode, you can access the parent shortcode context with [`.Parent` variable][shortcodesvars]. This can be very useful for inheritance of common shortcode parameters from the root.
+
+### Checking for Existence
+
+You can check if a specific shortcode is used on a page by calling `.HasShortcode` in that page template, providing the name of the shortcode. This is sometimes useful when you want to include specific scripts or styles in the header that are only used by that shortcode.
+
+## Custom Shortcode Examples
+
+The following are examples of the different types of shortcodes you can create via shortcode template files in `/layouts/shortcodes`.
+
+### Single-word Example: `year`
+
+Let's assume you would like to keep mentions of your copyright year current in your content files without having to continually review your markdown. Your goal is to be able to call the shortcode as follows:
+
+```
+{{</* year */>}}
+```
+
+{{< code file="/layouts/shortcodes/year.html" >}}
+{{ now.Format "2006" }}
+{{< /code >}}
+
+### Single Positional Example: `youtube`
+
+Embedded videos are a common addition to markdown content that can quickly become unsightly. The following is the code used by [Hugo's built-in YouTube shortcode][youtubeshortcode]:
+
+```
+{{</* youtube 09jf3ow9jfw */>}}
+```
+
+Would load the template at `/layouts/shortcodes/youtube.html`:
+
+{{< code file="/layouts/shortcodes/youtube.html" >}}
+<div class="embed video-player">
+<iframe class="youtube-player" type="text/html" width="640" height="385" src="https://www.youtube.com/embed/{{ index .Params 0 }}" allowfullscreen frameborder="0">
+</iframe>
+</div>
+{{< /code >}}
+
+{{< code file="youtube-embed.html" copy="false" >}}
+<div class="embed video-player">
+ <iframe class="youtube-player" type="text/html"
+ width="640" height="385"
+ src="https://www.youtube.com/embed/09jf3ow9jfw"
+ allowfullscreen frameborder="0">
+ </iframe>
+</div>
+{{< /code >}}
+
+### Single Named Example: `image`
+
+Let's say you want to create your own `img` shortcode rather than use Hugo's built-in [`figure` shortcode][figure]. Your goal is to be able to call the shortcode as follows in your content files:
+
+{{< code file="content-image.md" >}}
+{{</* img src="/media/spf13.jpg" title="Steve Francia" */>}}
+{{< /code >}}
+
+You have created the shortcode at `/layouts/shortcodes/img.html`, which loads the following shortcode template:
+
+{{< code file="/layouts/shortcodes/img.html" >}}
+<!-- image -->
+<figure {{ with .Get "class" }}class="{{.}}"{{ end }}>
+ {{ with .Get "link" }}<a href="{{ . }}">{{ end }}
+ <img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" }}{{ end }}"{{ end }} />
+ {{ if .Get "link" }}</a>{{ end }}
+ {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") }}
+ <figcaption>{{ if isset .Params "title" }}
+ <h4>{{ .Get "title" }}</h4>{{ end }}
+ {{ if or (.Get "caption") (.Get "attr") }}<p>
+ {{ .Get "caption" }}
+ {{ with .Get "attrlink" }}<a href="{{ . }}"> {{ end }}
+ {{ .Get "attr" }}
+ {{ if .Get "attrlink" }}</a> {{ end }}
+ </p> {{ end }}
+ </figcaption>
+ {{ end }}
+</figure>
+<!-- image -->
+{{< /code >}}
+
+Would be rendered as:
+
+{{< code file="img-output.html" copy="false" >}}
+<figure>
+ <img src="/media/spf13.jpg" />
+ <figcaption>
+ <h4>Steve Francia</h4>
+ </figcaption>
+</figure>
+{{< /code >}}
+
+### Single Flexible Example: `vimeo`
+
+```
+{{</* vimeo 49718712 */>}}
+{{</* vimeo id="49718712" class="flex-video" */>}}
+```
+
+Would load the template found at `/layouts/shortcodes/vimeo.html`:
+
+{{< code file="/layouts/shortcodes/vimeo.html" >}}
+{{ if .IsNamedParams }}
+ <div class="{{ if .Get "class" }}{{ .Get "class" }}{{ else }}vimeo-container{{ end }}">
+ <iframe src="https://player.vimeo.com/video/{{ .Get "id" }}" allowfullscreen></iframe>
+ </div>
+{{ else }}
+ <div class="{{ if len .Params | eq 2 }}{{ .Get 1 }}{{ else }}vimeo-container{{ end }}">
+ <iframe src="https://player.vimeo.com/video/{{ .Get 0 }}" allowfullscreen></iframe>
+ </div>
+{{ end }}
+{{< /code >}}
+
+Would be rendered as:
+
+{{< code file="vimeo-iframes.html" copy="false" >}}
+<div class="vimeo-container">
+ <iframe src="https://player.vimeo.com/video/49718712" allowfullscreen></iframe>
+</div>
+<div class="flex-video">
+ <iframe src="https://player.vimeo.com/video/49718712" allowfullscreen></iframe>
+</div>
+{{< /code >}}
+
+### Paired Example: `highlight`
+
+The following is taken from `highlight`, which is a [built-in shortcode][] that ships with Hugo.
+
+{{< code file="highlight-example.md" >}}
+{{</* highlight html */>}}
+ <html>
+ <body> This HTML </body>
+ </html>
+{{</* /highlight */>}}
+{{< /code >}}
+
+The template for the `highlight` shortcode uses the following code, which is already included in Hugo:
+
+```
+{{ .Get 0 | highlight .Inner }}
+```
+
+The rendered output of the HTML example code block will be as follows:
+
+{{< code file="syntax-highlighted.html" copy="false" >}}
+<div class="highlight" style="background: #272822"><pre style="line-height: 125%"><span style="color: #f92672"><html></span>
+ <span style="color: #f92672"><body></span> This HTML <span style="color: #f92672"></body></span>
+<span style="color: #f92672"></html></span>
+</pre></div>
+{{< /code >}}
+
+### Nested Shortcode: Image Gallery
+
++Hugo's [`.Parent` shortcode variable][parent] provides access to the parent shortcode context when the shortcode in question is called within the context of a *parent* shortcode. This provides an inheritance model for common shortcode parameters.
+
+The following example is contrived but demonstrates the concept. Assume you have a `gallery` shortcode that expects one named `class` parameter:
+
+{{< code file="layouts/shortcodes/gallery.html" >}}
+<div class="{{ .Get "class" }}">
+ {{ .Inner }}
+</div>
+{{< /code >}}
+
+You also have an `img` shortcode with a single named `src` parameter that you want to call inside of `gallery` and other shortcodes, so that the parent defines the context of each `img`:
+
+{{< code file="layouts/shortcodes/img.html" >}}
+{{- $src := .Get "src" -}}
+{{- with .Parent -}}
+ <img src="{{$src}}" class="{{ .Get "class" }}-image">
+{{- else -}}
+ <img src="{{$src}}">
+{{- end -}}
+{{< /code >}}
+
+You can then call your shortcode in your content as follows:
+
+```
+{{</* gallery class="content-gallery" */>}}
+ {{</* img src="/images/one.jpg" */>}}
+ {{</* img src="/images/two.jpg" */>}}
+{{</* /gallery */>}}
+{{</* img src="/images/three.jpg" */>}}
+```
+
+This will output the following HTML. Note how the first two `img` shortcodes inherit the `class` value of `content-gallery` set with the call to the parent `gallery`, whereas the third `img` only uses `src`:
+
+```
+<div class="content-gallery">
+ <img src="/images/one.jpg" class="content-gallery-image">
+ <img src="/images/two.jpg" class="content-gallery-image">
+</div>
+<img src="/images/three.jpg">
+```
+
+
+## Error Handling in Shortcodes
+
+Use the [errorf](/functions/errorf) template func and [.Position](/variables/shortcodes/) variable to get useful error messages in shortcodes:
+
+```bash
+{{ with .Get "name" }}
+{{ else }}
+{{ errorf "missing value for param 'name': %s" .Position }}
+{{ end }}
+```
+
+When the above fails, you will see an `ERROR` log similar to the below:
+
+```bash
+ERROR 2018/11/07 10:05:55 missing value for param name: "/Users/bep/dev/go/gohugoio/hugo/docs/content/en/variables/shortcodes.md:32:1"
+```
+
+## More Shortcode Examples
+
+More shortcode examples can be found in the [shortcodes directory for spf13.com][spfscs] and the [shortcodes directory for the Hugo docs][docsshortcodes].
+
+
+## Inline Shortcodes
+
+{{< new-in "0.52" >}}
+
+Since Hugo 0.52, you can implement your shortcodes inline -- e.g. where you use them in the content file. This can be useful for scripting that you only need in one place.
+
+This feature is disabled by default, but can be enabled in your site config:
+
+{{< code-toggle file="config">}}
+enableInlineShortcodes = true
+{{< /code-toggle >}}
+
+It is disabled by default for security reasons. The security model used by Hugo's template handling assumes that template authors are trusted, but that the content files are not, so the templates are injection-safe from malformed input data. But in most situations you have full control over the content, too, and then `enableInlineShortcodes = true` would be considered safe. But it's something to be aware of: It allows ad-hoc [Go Text templates](https://golang.org/pkg/text/template/) to be executed from the content files.
+
+And once enabled, you can do this in your content files:
+
+ ```go-text-template
+ {{</* time.inline */>}}{{ now }}{{</* /time.inline */>}}
+ ```
+
+The above will print the current date and time.
+
+ Note that an inline shortcode's inner content is parsed and executed as a Go text template with the same context as a regular shortcode template.
+
+This means that the current page can be accessed via `.Page.Title` etc. This also means that there are no concept of "nested inline shortcodes".
+
+The same inline shortcode can be reused later in the same content file, with different params if needed, using the self-closing syntax:
+
+ ```go-text-template
+{{</* time.inline /*/>}}
+```
+
+
+[basic content files]: /content-management/formats/ "See how Hugo leverages markdown--and other supported formats--to create content for your website."
+[built-in shortcode]: /content-management/shortcodes/
+[config]: /getting-started/configuration/ "Learn more about Hugo's built-in configuration variables as well as how to us your site's configuration file to include global key-values that can be used throughout your rendered website."
+[Content Management: Shortcodes]: /content-management/shortcodes/#using-hugo-s-built-in-shortcodes "Check this section if you are not familiar with the definition of what a shortcode is or if you are unfamiliar with how to use Hugo's built-in shortcodes in your content files."
+[source organization]: /getting-started/directory-structure/#directory-structure-explained "Learn how Hugo scaffolds new sites and what it expects to find in each of your directories."
+[docsshortcodes]: https://github.com/gohugoio/hugo/tree/master/docs/layouts/shortcodes "See the shortcode source directory for the documentation site you're currently reading."
+[figure]: /content-management/shortcodes/#figure
+[hugosc]: /content-management/shortcodes/#using-hugo-s-built-in-shortcodes
+[lookup order]: /templates/lookup-order/ "See the order in which Hugo traverses your template files to decide where and how to render your content at build time"
+[pagevars]: /variables/page/ "See which variables you can leverage in your templating for page vs list templates."
+[parent]: /variables/shortcodes/
+[shortcodesvars]: /variables/shortcodes/ "Certain variables are specific to shortcodes, although most .Page variables can be accessed within your shortcode template."
+[spfscs]: https://github.com/spf13/spf13.com/tree/master/layouts/shortcodes "See more examples of shortcodes by visiting the shortcode directory of the source for spf13.com, the blog of Hugo's creator, Steve Francia."
+[templates]: /templates/ "The templates section of the Hugo docs."
+[vimeoexample]: #single-flexible-example-vimeo
+[youtubeshortcode]: /content-management/shortcodes/#youtube "See how to use Hugo's built-in YouTube shortcode."
--- /dev/null
+---
+title: Frontend Interfaces with Hugo
+linktitle: Frontends
+description: Do you prefer a graphical user interface over a text editor? Give these frontends a try.
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-02-01
+categories: [developer tools]
+keywords: [frontend,gui]
+menu:
+ docs:
+ parent: "tools"
+ weight: 40
+weight: 40
+sections_weight: 40
+draft: false
+aliases: []
+toc: false
+---
+
+* [enwrite](https://github.com/zzamboni/enwrite). Enwrite enables evernote-powered, statically generated blogs and websites. Now posting to your blog or updating your website is as easy as writing a new note in Evernote!
+* [Lipi](https://github.com/SohanChy/Lipi). Lipi is a native GUI frontend written in Java to manage your Hugo websites.
+* [Netlify CMS](https://netlifycms.org). Netlify CMS is an open source, serverless solution for managing Git based content in static sites, and it works on any platform that can host static sites. A [Hugo/Netlify CMS starter](https://github.com/netlify-templates/one-click-hugo-cms) is available to get new projects running quickly.
+* [Hokus CMS](https://github.com/julianoappelklein/hokus). Hokus CMS is an open source, multi-platform, easy to use, desktop application for Hugo. Build from simple to complex user interfaces for Hugo websites by choosing from a dozen ready-to-use components — all for free, with no vendor lock-in.
+
+
+## Commercial Services
+
+* [DATOCMS](https://www.datocms.com) DatoCMS is a fully customizable administrative area for your static websites. Use your favorite website generator, let your clients publish new content independently, and the host the site anywhere you like.
+* [Forestry.io](https://forestry.io/). Forestry is a git-backed CMS for Hugo, Gatsby, Jekyll and VuePress websites with support for GitHub, GitLab, Bitbucket and Azure Devops. Forestry provides a nice user interface to edit and model content for non technical editors. It supports S3, Cloudinary and Netlify Large Media integrations for storing media. Every time an update is made via the CMS, Forestry will commit changes back to your repo and vice-versa.
++* [CloudCannon](https://cloudcannon.com/hugo-cms/). The intuitive Git-based CMS for your Hugo website. CloudCannon syncs changes from your Git repository and pushes content changes back, so your development and content teams are always in sync. Edit all of your content on the page with visual editing, build entire pages with reusable custom components and then publish confidently.
+
--- /dev/null
- * [hugo-elasticsearch](https://www.npmjs.com/package/hugo-elasticsearch). Generate [Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html) indexes for Hugo static sites by parsing front matter. Hugo-Elasticsearch will generate a newline delimited JSON (NDJSON) file that can be bulk uploaded into Elasticsearch using any one of the available [clients](https://www.elastic.co/guide/en/elasticsearch/client/index.html).
+---
+title: Search for your Hugo Website
+linktitle: Search
+description: See some of the open-source and commercial search options for your newly created Hugo website.
+date: 2017-02-01
+publishdate: 2017-02-01
+lastmod: 2017-02-26
+categories: [developer tools]
+keywords: [search,tools]
+menu:
+ docs:
+ parent: "tools"
+ weight: 60
+weight: 60
+sections_weight: 60
+draft: false
+aliases: []
+toc: true
+---
+
+A static website with a dynamic search function? Yes, Hugo provides an alternative to embeddable scripts from Google or other search engines for static websites. Hugo allows you to provide your visitors with a custom search function by indexing your content files directly.
+
+* [GitHub Gist for Hugo Workflow](https://gist.github.com/sebz/efddfc8fdcb6b480f567). This gist contains a simple workflow to create a search index for your static website. It uses a simple Grunt script to index all your content files and [lunr.js](https://lunrjs.com/) to serve the search results.
++
+* [hugo-lunr](https://www.npmjs.com/package/hugo-lunr). A simple way to add site search to your static Hugo site using [lunr.js](https://lunrjs.com/). Hugo-lunr will create an index file of any html and markdown documents in your Hugo project.
+* [hugo-lunr-zh](https://www.npmjs.com/package/hugo-lunr-zh). A bit like Hugo-lunr, but Hugo-lunr-zh can help you separate the Chinese keywords.
+* [Github Gist for Fuse.js integration](https://gist.github.com/eddiewebb/735feb48f50f0ddd65ae5606a1cb41ae). This gist demonstrates how to leverage Hugo's existing build time processing to generate a searchable JSON index used by [Fuse.js](https://fusejs.io/) on the client side. Although this gist uses Fuse.js for fuzzy matching, any client side search tool capable of reading JSON indexes will work. Does not require npm, grunt or other build-time tools except Hugo!
+* [hugo-search-index](https://www.npmjs.com/package/hugo-search-index). A library containing Gulp tasks and a prebuilt browser script that implements search. Gulp generates a search index from project markdown files.
+* [hugofastsearch](https://gist.github.com/cmod/5410eae147e4318164258742dd053993). A usability and speed update to "GitHub Gist for Fuse.js integration" — global, keyboard-optimized search.
+
+## Commercial Search Services
+
+* [Algolia](https://www.algolia.com/)'s Search API makes it easy to deliver a great search experience in your apps and websites. Algolia Search provides hosted full-text, numerical, faceted, and geolocalized search.
+* [Bonsai](https://www.bonsai.io) is a fully-managed hosted Elasticsearch service that is fast, reliable, and simple to set up. Easily ingest your docs from Hugo into Elasticsearch following [this guide from the docs](https://docs.bonsai.io/docs/hugo).
+* [ExpertRec](https://www.expertrec.com/) is a hosted search-as-a-service solution that is fast and scalable. Set-up and integration is extremely easy and takes only a few minutes. The search settings can be modified without coding using a dashboard.
--- /dev/null
-
+---
+title: Starter Kits
+linktitle: Starter Kits
+description: A list of community-developed projects designed to help you get up and running with Hugo.
+date: 2017-02-22
+publishdate: 2017-02-01
+lastmod: 2018-08-11
+keywords: [starters,assets,pipeline]
+menu:
+ docs:
+ parent: "tools"
+ weight: 30
+weight: 30
+sections_weight: 30
+draft: false
+aliases: [/developer-tools/migrations/,/developer-tools/migrated/]
+toc: false
+---
+
+Know of a Hugo-related starter kit that isn't mentioned here? [Please add it to the list.][addkit]
+
+{{% note "Starter Kits are Not Maintained by the Hugo Team"%}}
+The following starter kits are developed by active members of the Hugo community. If you find yourself having issues with any of the projects, it's best to file an issue directly with the project's maintainer(s).
+{{% /note %}}
+
++* [Wowchemy][]. Wowchemy is the 5,500+ star open source Hugo starter kit and website builder trusted by 750,000+ sites since 2016. Create _any_ kind of site with [50+ templates, widgets, and extensions](https://wowchemy.com/). Translated into 35+ languages and backed by a large, active community of 150+ contributors.
+* [Hugo Wrapper][hugow]. Hugo Wrapper is a POSIX-style shell script which acts as a wrapper to download and run Hugo binary for your platform. It can be executed in variety of [Operating Systems][hugow-test] and [Command Shells][hugow-test].
+* [GOHUGO AMP][]. GoHugo AMP is a starter theme that aims to make it easy to adopt [Google's AMP Project][amp]. The starter kit comes with 40+ shortcodes and partials plus automatic structured data. The project also includes a [separate site with extensive documentation][gohugodocs].
+* [Hyas][]. Hyas is a Hugo starter helping you build modern websites that are secure, fast, and SEO-ready — by default. It is Netlify-ready (functions, redirects, headers) and comes with [documentation](https://gethyas.com/) to easily make it your own.
+
++[Wowchemy]: https://github.com/wowchemy/wowchemy-hugo-modules
+[addkit]: https://github.com/gohugoio/hugo/edit/master/docs/content/en/tools/starter-kits.md
+[amp]: https://amp.dev
+[GOHUGO AMP]: https://github.com/wildhaber/gohugo-amp
+[gohugodocs]: https://gohugo-amp.gohugohq.com/
+[hugow]: https://github.com/khos2ow/hugo-wrapper
+[hugow-test]: https://github.com/khos2ow/hugo-wrapper#tested-on
+[Hyas]: https://github.com/h-enk/hyas
--- /dev/null
- lastmod: 2017-03-12
+---
+title: Build Performance
+linktitle: Build Performance
+description: An overview of features used for diagnosing and improving performance issues in site builds.
+date: 2017-03-12
+publishdate: 2017-03-12
- {{% note %}}
- The example site used below is from https://github.com/gohugoio/hugo/tree/master/examples/blog
- {{% /note %}}
-
+keywords: [performance, build]
+categories: [troubleshooting]
+menu:
+ docs:
+ parent: "troubleshooting"
+weight: 3
+slug:
+aliases: []
+toc: true
+---
+
+## Template Metrics
+
+Hugo is a very fast static site generator, but it is possible to write
+inefficient templates. Hugo's *template metrics* feature is extremely helpful
+in pinpointing which templates are executed most often and how long those
+executions take **in terms of CPU time**.
+
+| Metric Name | Description |
+|---------------------|-------------|
+| cumulative duration | The cumulative time spent executing a given template. |
+| average duration | The average time spent executing a given template. |
+| maximum duration | The maximum time a single execution took for a given template. |
+| count | The number of times a template was executed. |
+| template | The template name. |
+
+```
+▶ hugo --templateMetrics
+Started building sites ...
+
+Built site for language en:
+0 draft content
+0 future content
+0 expired content
+2 regular pages created
+22 other pages created
+0 non-page files copied
+0 paginator pages created
+4 tags created
+3 categories created
+total in 18 ms
+
+Template Metrics:
+
+ cumulative average maximum
+ duration duration duration count template
+ ---------- -------- -------- ----- --------
+ 6.419663ms 583.605µs 994.374µs 11 _internal/_default/rss.xml
+ 4.718511ms 1.572837ms 3.880742ms 3 indexes/category.html
+ 4.642666ms 2.321333ms 3.282842ms 2 posts/single.html
+ 4.364445ms 396.767µs 2.451372ms 11 partials/header.html
+ 2.346069ms 586.517µs 903.343µs 4 indexes/tag.html
+ 2.330919ms 211.901µs 2.281342ms 11 partials/header.includes.html
+ 1.238976ms 103.248µs 446.084µs 12 posts/li.html
+ 972.16µs 972.16µs 972.16µs 1 _internal/_default/sitemap.xml
+ 953.597µs 953.597µs 953.597µs 1 index.html
+ 822.263µs 822.263µs 822.263µs 1 indexes/post.html
+ 567.498µs 51.59µs 112.205µs 11 partials/navbar.html
+ 348.22µs 31.656µs 88.249µs 11 partials/meta.html
+ 346.782µs 173.391µs 276.176µs 2 posts/summary.html
+ 235.184µs 21.38µs 124.383µs 11 partials/footer.copyright.html
+ 132.003µs 12µs 117.999µs 11 partials/menu.html
+ 72.547µs 6.595µs 63.764µs 11 partials/footer.html
+```
+
+{{% note %}}
+**A Note About Parallelism**
+
+Hugo builds pages in parallel where multiple pages are generated
+simultaneously. Because of this parallelism, the sum of "cumulative duration"
+values is usually greater than the actual time it takes to build a site.
+{{% /note %}}
+
+
+## Cached Partials
+
+Some `partial` templates such as sidebars or menus are executed many times
+during a site build. Depending on the content within the `partial` template and
+the desired output, the template may benefit from caching to reduce the number
+of executions. The [`partialCached`][partialCached] template function provides
+caching capabilities for `partial` templates.
+
+{{% tip %}}
+Note that you can create cached variants of each `partial` by passing additional
+parameters to `partialCached` beyond the initial context. See the
+`partialCached` documentation for more details.
+{{% /tip %}}
+
+
+[partialCached]:{{< ref "/functions/partialCached.md" >}}
--- /dev/null
+---
+title: Frequently Asked Questions
+linktitle: FAQ
+description: Solutions to some common Hugo problems.
+date: 2018-02-10
+categories: [troubleshooting]
+menu:
+ docs:
+ parent: "troubleshooting"
+keywords: [faqs]
+weight: 2
+toc: true
+aliases: [/faq/]
+---
+
+{{% note %}}
+**Note:** The answers/solutions presented below are short, and may not be enough to solve your problem. Visit [Hugo Discourse](https://discourse.gohugo.io/) and use the search. It that does not help, start a new topic and ask your questions.
+{{% /note %}}
+
+## I can't see my content!
+
+Is your markdown file [in draft mode](https://gohugo.io/content-management/front-matter/#front-matter-variables)? When testing, run `hugo server` with the `-D` or `--buildDrafts` [switch](https://gohugo.io/getting-started/usage/#draft-future-and-expired-content).
+
++Is your markdown file part of a [leaf bundle](/content-management/page-bundles/)? If there is an `index.md` file in the same or any parent directory then other markdown files will not be rendered as individual pages.
++
+## Can I set configuration variables via OS environment?
+
+Yes you can! See [Configure with Environment Variables](/getting-started/configuration/#configure-with-environment-variables).
+
+## How do I schedule posts?
+
+1. Set `publishDate` in the page [Front Matter](/content-management/front-matter/) to a datetime in the future. If you want the creation and publication datetime to be the same, it's also sufficient to only set `date`[^date-hierarchy].
+2. Build and publish at intervals.
+
+How to automate the "publish at intervals" part depends on your situation:
+
+* If you deploy from your own PC/server, you can automate with [Cron](https://en.wikipedia.org/wiki/Cron) or similar.
+* If your site is hosted on a service similar to [Netlify](https://www.netlify.com/) you can use a service such as [ifttt](https://ifttt.com/date_and_time) to schedule the updates.
+
+Also see this Twitter thread:
+
+{{< tweet user="ChrisShort" id="962380712027590657" >}}
+
+[^date-hierarchy]: See [Configure Dates](https://gohugo.io/getting-started/configuration/#configure-dates) for the order in which the different date variables are complemented by each other when not explicitly set.
+
+## Can I use the latest Hugo version on Netlify?
+
+Yes you can! Read [this](/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify).
+
+## I get "... this feature is not available in your current Hugo version"
+
+If you process `SCSS` or `SASS` to `CSS` in your Hugo project with `libsass` as the transpiler or if you convert images to the `webp` format, you need the Hugo `extended` version, or else you may see an error message similar to the below:
+
+```bash
+error: failed to transform resource: TOCSS: failed to transform "scss/main.scss" (text/x-scss): this feature is not available in your current Hugo version
+```
+
+We release two set of binaries for technical reasons. The extended version is not what you get by default for some installation methods. On the [release page](https://github.com/gohugoio/hugo/releases), look for archives with `extended` in the name. To build `hugo-extended`, use `go install --tags extended`
+
+To confirm, run `hugo version` and look for the word `extended`.
+
+## Do I need to install Git to create, deploy, and maintain a website with Hugo?
+
+>Technically, no.
+>
+>Practically, yes.
+
+* The primary installation method documented by most (perhaps all) themes is via Git or the Hugo Modules feature.
+* The Hugo Modules feature requires Go, and Go “gets” with Git.
+* A Git repository is required by CI/CD hosting (Bitbucket, Cloudflare, GitHub Pages, GitLab Pages, Netlify, et. al.).
+* The canonical “last modified” date for content is its Git committer date; using anything else is error-prone.
--- /dev/null
- require github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135 // indirect
+module github.com/gohugoio/hugoDocs
+
+go 1.16
+
++require github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d // indirect
--- /dev/null
+github.com/gohugoio/gohugoioTheme v0.0.0-20190808163145-07b3c0f73b02/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b h1:PWNjl46fvtz54PKO0BdiXOF6/4L/uCP0F3gtcCxGrJs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20191014144142-1f3a01deed7b/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d h1:D3DcaYkuJbotdWNNAQpQl37txX4HQ6R5uMHoxVmTw0w=
+github.com/gohugoio/gohugoioTheme v0.0.0-20191021162625-2e7250ca437d/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123151337-9475fd449324 h1:UZwHDYtGY0uOKIvcm2LWd+xfFxD3X5L222LIJdI5RE4=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123151337-9475fd449324/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123204146-589b4c309025 h1:ScYFARz+bHX1rEr1donVknhRdxGY/cwqK1hHvWEfrlc=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123204146-589b4c309025/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123205007-5d6620a0db26 h1:acXfduibbWxji9tW0WkLHbjcXFsnd5uIwXe0WfwOazg=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200123205007-5d6620a0db26/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200128164921-1d0bc5482051 h1:cS14MnUGS6xwWYfPNshimm8HdMCZiYBxWkCD0VnvgVw=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200128164921-1d0bc5482051/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200327225449-368f4cbef8d7 h1:cZ+ahAjSetbFv3aDJ9ipDbKyqaVlmkbSZ5cULgBTh+w=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200327225449-368f4cbef8d7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200327231942-7f80b3d02bfa h1:kG+O/wT9UXomzp5eQiUuFVZ0l7YylAW6EVPLyjMxi/c=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200327231942-7f80b3d02bfa/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200328100657-2bfd5f8c6aee h1:PJZhCwnuVLyafDWNPSHk9iJvk6gEIvPRnycy7Pq3peA=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200328100657-2bfd5f8c6aee/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200518164958-62cbad03c40f h1:Ge3JACszSUyJW2Az9cJzWdo4PUqdijJA1RxoQSVMBSI=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200518164958-62cbad03c40f/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7 h1:Sy0hlWyZmFtdSY0Cobvw1ZYm3G1aR5+4DuFNRbMkh48=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200518165806-0095b7b902a7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f h1:BWJyycs4HD7tUbaU8RIGeMay84bIBWRVVLE3yajPas4=
+github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 h1:ShqzOFeeg54FPSuS6q8HSeTVgj2xNZRe/YS0jNbi21g=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409065807-6383d8cbaf65 h1:EJzierSWKqwsrUXU6MaFe0J97c0e5pzl5dBNRRrV2Nc=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409065807-6383d8cbaf65/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7 h1:uRCgPslaBgLYy4ANXBoPbBQVM8aNiHoxIZTKUXpkuUA=
+github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20211211125852-b85e21c1f3d6 h1:lAgdWrn8VEg0PrNCPX4DflCg2msDKpSYV6E8RTNV3N0=
+github.com/gohugoio/gohugoioTheme v0.0.0-20211211125852-b85e21c1f3d6/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
+github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135 h1:6hVzfE9YhSsZP5t6jWjvVp7MoPm7Y5fEhH/ls4ahhKk=
+github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
++github.com/gohugoio/gohugoioTheme v0.0.0-20220905093719-cb8b64046950 h1:Ovlh3nuy/aNptYZHmIra2MP+ZUEqiihY0HxvhdaMqGg=
++github.com/gohugoio/gohugoioTheme v0.0.0-20220905093719-cb8b64046950/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
++github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d h1:UYJL6RmEepprvlgHvDnFCWtPOvjmqzFCQ90cRDRBO7U=
++github.com/gohugoio/gohugoioTheme v0.0.0-20220912070954-88dcaf003b4d/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs=
--- /dev/null
--- /dev/null
++project = "hugoDocs"
++
++[release_settings]
++ name = "${HUGORELEASER_TAG}"
++ type = "github"
++ repository = "hugoDocs"
++ repository_owner = "gohugoio"
++
++ draft = true
++ prerelease = false
++
++ [release_settings.release_notes_settings]
++ generate = true
++ generate_on_host = false
++ short_threshold = 10
++ short_title = "What's Changed"
++
++ groups = [
++ { regexp = "snapcraft:|Merge commit|Merge branch|netlify:|release:|Squashed", ignore = true },
++ { title = "Typo fixes", regexp = "typo", ordinal = 20 },
++ { title = "Dependency Updates", regexp = "deps", ordinal = 30 },
++ { title = "Improvements", regexp = ".*", ordinal = 10 },
++ ]
++
++[[releases]]
++ paths = ["archives/**"]
++ # In this file we have only one release, but path can be used to partition the release step, e.g.:
++ # hugoreleaser release -paths "releases/myrelease"
++ path = "myrelease"
--- /dev/null
- HUGO_VERSION = "0.101.0"
+[build]
+publish = "public"
+command = "hugo --gc --minify"
+
+[context.production.environment]
- HUGO_VERSION = "0.101.0"
++HUGO_VERSION = "0.102.3"
+HUGO_ENV = "production"
+HUGO_ENABLEGITINFO = "true"
+
+[context.split1]
+command = "hugo --gc --minify --enableGitInfo"
+
+[context.split1.environment]
- HUGO_VERSION = "0.101.0"
++HUGO_VERSION = "0.102.3"
+HUGO_ENV = "production"
+
+[context.deploy-preview]
+command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
+
+[context.deploy-preview.environment]
- HUGO_VERSION = "0.101.0"
++HUGO_VERSION = "0.102.3"
+
+[context.branch-deploy]
+command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
+
+[context.branch-deploy.environment]
++HUGO_VERSION = "0.102.3"
+
+[context.next.environment]
+HUGO_ENABLEGITINFO = "true"
+
+[[redirects]]
+from = "/npmjs/*"
+to = "/npmjs/"
+status = 200