diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-03-21 13:31:17 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-03-21 13:31:17 +0100 |
commit | c94aa5cf46f91d777a61595b37835c40f1bddff1 (patch) | |
tree | 61006006ed306e05a7f2a280fc675478f2216676 /docs | |
parent | df8bb8812f466bce563cdba297db3cd3f954a799 (diff) | |
parent | 81689af79901f0cdaff765cda6322dd4a9a7ccb3 (diff) |
Merge commit '81689af79901f0cdaff765cda6322dd4a9a7ccb3'
Diffstat (limited to 'docs')
22 files changed, 119 insertions, 65 deletions
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml b/docs/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml index 9261ffc78..0940da6d7 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/data/sponsors.toml @@ -1,10 +1,4 @@ [[banners]] -name = "Forestry.io" -link = "https://forestry.io/" -logo = "/images/sponsors/forestry-logotype.svg" -copy = "" - -[[banners]] name = "Linode" link = "https://www.linode.com/" logo = "/images/sponsors/linode-logo_standard_light_medium.png" @@ -14,4 +8,12 @@ copy = "" name = "eSolia" link = "https://esolia.com/post/why-did-esolia-choose-hugo/" logo = "/images/sponsors/esolia-logo.svg" +copy = "" + + +[[banners]] +name = "Brave" +link = "https://brave.com/" +logo = "/images/sponsors/brave-logo.svg" +bgcolor = "#5A2FA1" copy = ""
\ No newline at end of file diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html index a83d3f662..0de21a255 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html @@ -39,6 +39,8 @@ {{ $.Scratch.Set "stylesheet" . }} {{end}} + <meta name="description" + content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}"> {{ block "scripts" . }} {{- partial "site-scripts.html" . -}} @@ -53,9 +55,6 @@ {{ partial "gtag" . }} {{ end }} - - - </head> <body class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}"> @@ -69,4 +68,4 @@ </body> -</html>
\ No newline at end of file +</html> diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html index 48c015c51..8cd289624 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html @@ -1,31 +1,31 @@ {{ define "main" }} -<article class="w-100 ph4 pb5 pb6-ns pt1 pt5-ns"> - <div class="flex-l"> + <article class="w-100 ph4 pb5 pb6-ns pt1 pt5-ns"> + <div class="flex-l"> - <div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky"> + <div class="order-2 w-100 w-20-l ph5-m ph0-l mb4 sticky"> {{- partial "toc.html" . -}} - </div> + </div> - <div class="order-1 w-60-l mw7 ph0 ph5-ns mid-gray nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote mt0-ns" style="flex-grow:1;"> - <div class="documentation-copy center measure-wide-l"> - <div id="readout" class="fixed right-0 bottom-0"> + <div class="order-1 w-60-l mw7 ph0 ph5-ns mid-gray nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote mt0-ns" style="flex-grow:1;"> + <div class="documentation-copy center measure-wide-l"> + <div id="readout" class="fixed right-0 bottom-0"> + </div> + {{ .Render "page" }} + {{ partial "related.html" . }} </div> - {{ .Render "page" }} - {{ partial "related.html" . }} </div> - </div> - <div class="order-0 w-20 dn db-l"> - {{ partial "nav-links-docs.html" . }} - </div> + <div class="order-0 w-20 dn db-l"> + {{ partial "nav-links-docs.html" . }} + </div> - </div> -</article> + </div> + </article> -<div class="w-100 bg-light-gray"> - <div class="mw7 pa4 center nested-lh-copy lh-copy"> - {{ partial "docs/page-meta-data.html" . }} - {{ partial "page-edit.html" . }} - {{ partial "tags.html" . }} + <div class="w-100 bg-light-gray"> + <div class="mw7 pa4 center nested-lh-copy lh-copy"> + {{ partial "docs/page-meta-data.html" . }} + {{ partial "page-edit.html" . }} + {{ partial "tags.html" . }} + </div> </div> -</div> -{{ end }}
\ No newline at end of file +{{ end }} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html index 2cedc384a..fe9f4d2aa 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/gtag.html @@ -6,7 +6,7 @@ gtag('js', new Date()); {{ $site := $.Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }} - gtag('config', '{{ . }}', {'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'}); + gtag('config', '{{ . }}', {'anonymize_ip': true, 'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'}); /** * Function that tracks a click on an outbound link in Analytics. diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html index 4bea1a54a..a23cae11d 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/installation.html @@ -14,7 +14,7 @@ <div class="h4"> <img src="/images/gopher-hero.svg" alt="Hugo Gopher" class="h4"> </div> - <p class="f6 mid-gray m0 p0 pt3">Mac OS</p> + <p class="f6 mid-gray m0 p0 pt3">macOS</p> <div class="code f6 bg-black light-green lh-copy pv3 ph3 br2 w-100 w-50-ns center mb2 tl"> $ brew install hugo <br /> </div> @@ -35,5 +35,4 @@ <!-- TODO: Animate the gopher https://github.com/rdwatters/hugo-docs-concept/issues/3#issuecomment-287194777 --> - </div> diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html index f9f5ec588..a808655a6 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/home-page-sections/sponsors.html @@ -1,4 +1,4 @@ -{{$classes_box := "ba b--light-gray bg-light-gray br3 flex flex-column flex-wrap items-center justify-center ph3 pv4 mb4 w-100 w-30-l "}} +{{$classes_box := "ba b--dark-gray bg-light-gray br3 flex flex-column flex-wrap items-center justify-center ph3 pv4 mb4 w-100 w-30-l "}} {{$gtag := .gtag | default "unknown" }} {{ with .cx.Site.Data.sponsors }} <section class="{{ $.classes_section | default "bg-primary-color-dark b--dark-gray bb bt ph5 pv4 w-100"}}"> @@ -8,7 +8,7 @@ {{ range .banners }} {{ $banner := . }} {{if .logo}} - <div class="{{$classes_box}} o-100"> + <div class="{{$classes_box}} o-100"{{ with .bgcolor }} style="background-color: {{ . }};"{{ end}}> {{with .link -}} {{ $url := printf "%s?%s" . (querify "utm_source" "homepage" "utm_medium" "banner" "utm_campaign" "hugosponsor") | safeURL }} {{ if eq (getenv "HUGO_ENV") "production" | or (eq $.cx.Site.Params.env "production") }} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html index b0083fc0f..bff52ad8d 100644 --- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/showcase/list.html @@ -17,7 +17,7 @@ {{/* pagination.html: https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/template_embedded.go#L117 */}} {{ template "_internal/pagination.html" . }} </div> - <div class="dib f3 mt4">The Showcase articles are copyright the content authors. Any open source license will be attached.</div> + <div class="dib f3 mt4">The Showcase articles are copyrighted by their respective content authors. Any open source license will be attached.</div> </div> {{ end }} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/package.json b/docs/_vendor/github.com/gohugoio/gohugoioTheme/package.json new file mode 100644 index 000000000..daffbc0f0 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/package.json @@ -0,0 +1,43 @@ +{ + "name": "gohugo-default-styles", + "version": "1.1.0", + "description": "Default Theme for Hugo Sites", + "main": "index.js", + "homepage": "https://gohugo.io/", + "bugs": { + "url": "https://github.com/gohugoio/gohugoioTheme/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/gohugoio/gohugoioTheme.git" + }, + "author": "budparr", + "license": "MIT", + "scripts": { + "build": "NODE_ENV=production webpack", + "build-dev": "NODE_ENV=development webpack --progress --watch", + "start": "npm run build-dev" + }, + "devDependencies": { + "clean-webpack-plugin": "^1.0.0", + "clipboard": "^2.0.4", + "css-loader": "^4.3.0", + "docsearch.js": "^2.6.1", + "file-loader": "^2.0.0", + "glob-all": "^3.1.0", + "highlight.js": "^9.13.1", + "lazysizes": "^5.2.1", + "mini-css-extract-plugin": "^0.4.4", + "postcss": "^7.0.32", + "postcss-cssnext": "^3.1.0", + "postcss-import": "^12.0.1", + "postcss-loader": "^3.0.0", + "purgecss-webpack-plugin": "^1.3.1", + "scrolldir": "^1.4.0", + "tachyons": "^4.7.0", + "typeface-muli": "0.0.54", + "webpack": "^4.44.1", + "webpack-command": "^0.4.2" + }, + "dependencies": {} +} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg b/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg new file mode 100644 index 000000000..27cdd974d --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/static/images/sponsors/brave-logo.svg @@ -0,0 +1 @@ +<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 461.99 142.7"><defs><style>.cls-1{fill:#fff;}.cls-2{fill:url(#linear-gradient);}.cls-3{fill:#77777a;}</style><linearGradient id="linear-gradient" x1="168.37" y1="199.9" x2="289.96" y2="199.9" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f1562b"/><stop offset="0.3" stop-color="#f1542b"/><stop offset="0.41" stop-color="#f04d2a"/><stop offset="0.49" stop-color="#ef4229"/><stop offset="0.5" stop-color="#ef4029"/><stop offset="0.56" stop-color="#e83e28"/><stop offset="0.67" stop-color="#e13c26"/><stop offset="1" stop-color="#df3c26"/></linearGradient></defs><title>brave_logo_2color_reversed</title><path class="cls-1" d="M320.92,205.1V157h4.6a6.78,6.78,0,0,1,6.78,6.78v21.39c7.37-6.58,13.65-9.21,22-9.38,16-.33,30,11.58,31.28,27.56,1.58,19.1-12.31,33.47-30.4,33.47C335.33,236.82,320.92,224.5,320.92,205.1Zm11.2,3.78c1.12,9.94,10.62,18.15,20.63,18.31,13,.2,21.93-8.3,21.93-20.89S366,185.4,353.31,185.4C339.76,185.4,330.58,195.25,332.12,208.88Z" transform="translate(-168.37 -128.55)"/><path class="cls-1" d="M404.6,177v8.57c7.16-8,11.42-10.09,19.8-10.09a46.18,46.18,0,0,1,7.29.59v11.38a29.47,29.47,0,0,0-7.9-1.06c-6.07,0-11.17,2-14.94,5.75-3.28,3.29-4.25,5.87-4.25,11v31.69H392.82V177Z" transform="translate(-168.37 -128.55)"/><path class="cls-1" d="M434.48,196.12c.61-5.63,1.7-8.68,4.13-11.62,4.86-6,13.61-9,26-9,9.84,0,17,1.53,22,4.81,4.13,2.7,5.83,6.69,5.83,13.73v25.7c0,5.63,1.46,7.63,5.47,7.51a25,25,0,0,0,2.67-.24v7.75a17.53,17.53,0,0,1-6.2.94c-7.41,0-10.81-2.23-13.11-8.68-7.29,6.69-14.82,9.51-25.63,9.51-14.45,0-23.32-6.57-23.32-17.25a15.19,15.19,0,0,1,9.11-14.08c4.37-1.88,7-2.46,19.56-3.76,10.69-1.06,12.51-1.29,15.55-2.23,3.28-1.06,4.74-2.81,4.74-5.75,0-6.22-5.22-9-16.16-9-10.34,0-15.66,2-17.8,7.28a7,7,0,0,1-6.51,4.46ZM481.25,206a115.67,115.67,0,0,1-23,4.23c-10.57,1.06-13.85,3-13.85,8.33,0,5.87,4.86,8.92,14.45,8.92,7.9,0,13.85-2,18.1-5.87,3.4-3.17,4.25-5.4,4.25-10.92Z" transform="translate(-168.37 -128.55)"/><path class="cls-1" d="M529.08,234.84h-3a7,7,0,0,1-6.3-3.91L494.26,177h7.08a10.41,10.41,0,0,1,9.57,6.13l17,38.82L545.46,183a10.41,10.41,0,0,1,9.53-6h6.43l-26.07,54A7,7,0,0,1,529.08,234.84Z" transform="translate(-168.37 -128.55)"/><path class="cls-1" d="M569.41,209.26c1.21,11.15,10,18.07,23,18.07,7.38,0,12.88-2.19,16.35-6.58a10.53,10.53,0,0,1,8.25-4h6.85c-6,13.15-16.64,19.6-32.55,19.6-19.92,0-33.28-12.09-33.28-30.16s13.73-30.75,33.53-30.75c14.33,0,25.87,6.45,30.49,17.25,2.06,4.93,2.92,9.39,2.92,16.54Zm43.48-8.92c-2.67-10.21-10.57-16-21.5-16s-18.83,5.75-21.62,16Z" transform="translate(-168.37 -128.55)"/><path class="cls-2" d="M290,174.71l-4.4-11.95,3.06-6.86a2.35,2.35,0,0,0-.48-2.61l-8.32-8.41a13.43,13.43,0,0,0-14-3.25l-2.33.81-12.71-13.77-21.56-.12h-.14l-21.7.17-12.7,13.88-2.26-.8a13.47,13.47,0,0,0-14.09,3.28l-8.47,8.57a1.87,1.87,0,0,0-.38,2.08l3.19,7.12-4.38,11.94,2.83,10.77,12.91,49.08a25,25,0,0,0,9.67,14s15.67,11.05,31.13,21.09a6.9,6.9,0,0,0,8.61,0c17.37-11.38,31.11-21.13,31.11-21.13a25,25,0,0,0,9.66-14l12.84-49.1Z" transform="translate(-168.37 -128.55)"/><path class="cls-1" d="M232.72,217a18.42,18.42,0,0,0-2.54-.92h-1.53a18.42,18.42,0,0,0-2.54.92l-3.85,1.6c-1.22.51-3.18,1.42-4.35,2l-7.08,3.69a1.35,1.35,0,0,0-.17,2.5l6.15,4.34c1.08.76,2.78,2.1,3.78,3l1.73,1.49c1,.86,2.63,2.29,3.62,3.17l1.64,1.45a2.82,2.82,0,0,0,3.61,0l1.72-1.5,3.62-3.16,1.74-1.52c1-.87,2.69-2.21,3.77-3l6.15-4.4a1.34,1.34,0,0,0-.19-2.49l-7.07-3.59c-1.18-.6-3.14-1.5-4.37-2Z" transform="translate(-168.37 -128.55)"/><path class="cls-1" d="M276.32,177.38l.2-.64a16.84,16.84,0,0,0-.16-2.56,21.57,21.57,0,0,0-2.28-4.3l-4-5.87c-.74-1.1-2-2.84-2.85-3.87l-5.36-6.71a18.74,18.74,0,0,0-1.59-1.86h-.11s-1.08.19-2.38.44l-8.19,1.58-3.59.69a9.33,9.33,0,0,1-3.51-.51l-6.47-2.09c-1.26-.41-3.34-1-4.63-1.28a19.35,19.35,0,0,0-4.09,0c-1.29.3-3.37.88-4.63,1.29l-6.47,2.1a9.33,9.33,0,0,1-3.51.51l-3.59-.68-8.2-1.57c-1.3-.25-2.37-.45-2.38-.44h-.11a18.74,18.74,0,0,0-1.59,1.86l-5.35,6.71c-.82,1-2.11,2.78-2.85,3.87l-4,5.87a31.45,31.45,0,0,0-1.89,3.15,14.32,14.32,0,0,0-.54,3.72l.2.64a9.49,9.49,0,0,0,.37,1.21c.83,1,2.25,2.66,3.16,3.63l14,14.88a4,4,0,0,1,.71,4l-2.29,5.43a7.05,7.05,0,0,0-.11,4.47l.46,1.26a12.15,12.15,0,0,0,3.73,5.23l2.2,1.79a4.16,4.16,0,0,0,4,.48l7.82-3.73a19.88,19.88,0,0,0,4-2.65l6.26-5.65a2.51,2.51,0,0,0,.13-3.6l-14.13-9.52a2.74,2.74,0,0,1-.86-3.47l5.48-10.3a5.35,5.35,0,0,0,.27-4.09,6.25,6.25,0,0,0-3.11-2.82l-17.18-6.49c-1.24-.47-1.17-1,.14-1.08l10.09-1a15.57,15.57,0,0,1,4.71.42l8.78,2.45a2.69,2.69,0,0,1,1.88,3l-3.45,18.84a9.74,9.74,0,0,0-.17,3.18c.14.45,1.32,1,2.61,1.32l5.35,1.14a13,13,0,0,0,4.7,0l4.81-1.09c1.29-.29,2.46-.9,2.61-1.35a9.73,9.73,0,0,0-.18-3.18l-3.47-18.84a2.69,2.69,0,0,1,1.88-3l8.78-2.46a15.56,15.56,0,0,1,4.71-.42l10.09.94c1.32.12,1.38.61.15,1.08l-17.17,6.51a6.25,6.25,0,0,0-3.11,2.82,5.36,5.36,0,0,0,.27,4.09l5.49,10.3a2.74,2.74,0,0,1-.86,3.47l-14.12,9.54a2.51,2.51,0,0,0,.13,3.6l6.27,5.65a19.88,19.88,0,0,0,4,2.64l7.82,3.72a4.16,4.16,0,0,0,4-.49l2.2-1.8a12.14,12.14,0,0,0,3.73-5.24l.46-1.26a7.05,7.05,0,0,0-.11-4.47l-2.3-5.43a4,4,0,0,1,.71-4l14-14.9c.91-1,2.32-2.6,3.15-3.63A9.49,9.49,0,0,0,276.32,177.38Z" transform="translate(-168.37 -128.55)"/><path class="cls-3" d="M630.36,177.72a4.91,4.91,0,1,1-4.89-4.78A4.8,4.8,0,0,1,630.36,177.72Zm-8.59,0a3.7,3.7,0,0,0,3.73,3.82,3.66,3.66,0,0,0,3.64-3.79,3.69,3.69,0,1,0-7.37,0Zm2.94,2.51H623.6v-4.78a9.64,9.64,0,0,1,1.84-.15,3,3,0,0,1,1.66.35,1.33,1.33,0,0,1,.46,1,1.23,1.23,0,0,1-1,1.11v.06a1.41,1.41,0,0,1,.87,1.16,3.61,3.61,0,0,0,.35,1.19h-1.2a4.15,4.15,0,0,1-.38-1.16c-.09-.52-.38-.76-1-.76h-.52Zm0-2.71h.52c.61,0,1.11-.2,1.11-.7s-.32-.73-1-.73a2.6,2.6,0,0,0-.61.06Z" transform="translate(-168.37 -128.55)"/></svg>
\ No newline at end of file diff --git a/docs/_vendor/modules.txt b/docs/_vendor/modules.txt index 200400694..d3402db0b 100644 --- a/docs/_vendor/modules.txt +++ b/docs/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20200711112515-b0dfe471654f +# github.com/gohugoio/gohugoioTheme v0.0.0-20210301124928-2c15837dfec3 diff --git a/docs/content/en/content-management/image-processing/index.md b/docs/content/en/content-management/image-processing/index.md index ebd3362dc..a432b9851 100644 --- a/docs/content/en/content-management/image-processing/index.md +++ b/docs/content/en/content-management/image-processing/index.md @@ -33,11 +33,17 @@ To print all images paths in a [Page Bundle]({{< relref "/content-management/org The `image` resource can also be retrieved from a [global resource]({{< relref "/hugo-pipes/introduction#from-file-to-resource" >}}) +```go-html-template {{- $image := resources.Get "images/logo.jpg" -}} +``` ## Image Processing Methods -The `image` resource implements the methods `Resize`, `Fit` and `Fill`, each returning the transformed image using the specified dimensions and processing options. The `image` resource also, since Hugo 0.58, implements the method `Exif` and `Filter`. +The `image` resource implements the `Resize`, `Fit`, `Fill`, and `Filter` methods, each returning a transformed image using the specified dimensions and processing options. + +{{% note %}} +Metadata (EXIF, IPTC, XMP, etc.) is not preserved during image transformation. Use the [`Exif`](#exif) method with the _original_ image to extract EXIF metadata from JPEG or TIFF images. +{{% /note %}} ### Resize diff --git a/docs/content/en/content-management/multilingual.md b/docs/content/en/content-management/multilingual.md index e24c573c2..28bf6ab06 100644 --- a/docs/content/en/content-management/multilingual.md +++ b/docs/content/en/content-management/multilingual.md @@ -421,13 +421,14 @@ At the time of this writing, Go does not yet have support for internationalized ...then index the non-English date names in your templates like so: ~~~html -<time class="post-date" datetime="{{ .Date.Format '2006-01-02T15:04:05Z07:00' | safeHTML }}"> +<time class="post-date" datetime="{{ .Date.Format `2006-01-02T15:04:05Z07:00` | safeHTML }}"> Article publié le {{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }} (dernière modification le {{ .Lastmod.Day }} {{ index $.Site.Data.mois (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Year }}) </time> ~~~ This technique extracts the day, month and year by specifying ``.Date.Day``, ``.Date.Month``, and ``.Date.Year``, and uses the month number as a key, when indexing the month name data file. + ## 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: diff --git a/docs/content/en/content-management/taxonomies.md b/docs/content/en/content-management/taxonomies.md index e7aa67ea6..da29fa7be 100644 --- a/docs/content/en/content-management/taxonomies.md +++ b/docs/content/en/content-management/taxonomies.md @@ -109,7 +109,7 @@ When taxonomies are used---and [taxonomy templates][] are provided---Hugo will a * A single page at `example.com/categories/` that lists all the [terms within the taxonomy][] * [Individual taxonomy list pages][taxonomy templates] (e.g., `/categories/development/`) for each of the terms that shows a listing of all pages marked as part of that taxonomy within any content file's [front matter][] -## Configure Taxonomies {#configuring-taxonomies} +## Configure Taxonomies Custom taxonomies other than the [defaults](#default-taxonomies) must be defined in your [site config][config] before they can be used throughout the site. You need to provide both the plural and singular labels for each taxonomy. For example, `singular key = "plural value"` for TOML and `singular key: "plural value"` for YAML. diff --git a/docs/content/en/functions/intersect.md b/docs/content/en/functions/intersect.md index 9ab7f3c3a..004479531 100644 --- a/docs/content/en/functions/intersect.md +++ b/docs/content/en/functions/intersect.md @@ -1,7 +1,7 @@ --- title: intersect linktitle: intersect -description: Returns the common elements of two arrays or slices. +description: Returns the common elements of two arrays or slices, in the same order as the first array. godocref: date: 2017-02-01 publishdate: 2017-02-01 diff --git a/docs/content/en/functions/sort.md b/docs/content/en/functions/sort.md index b83e6b0bd..ca28f3ee3 100644 --- a/docs/content/en/functions/sort.md +++ b/docs/content/en/functions/sort.md @@ -22,42 +22,42 @@ aliases: [] A sorted array of map values will be returned with the keys eliminated. There are two optional arguments: `sortByField` and `sortAsc`. If left blank, sort will sort by keys (for maps) in ascending order as its default behavior. ``` -+++ -keywords: [ "tag3", "tag1", "tag2" ] -+++ +--- +tags: ["tag3", "tag1", "tag2"] +--- // Site config +++ [params.authors] - [params.authors.Derek] - "firstName" = "Derek" - "lastName" = "Perkins" [params.authors.Joe] - "firstName" = "Joe" - "lastName" = "Bergevin" + firstName = "Joe" + lastName = "Bergevin" + [params.authors.Derek] + firstName = "Derek" + lastName = "Perkins" [params.authors.Tanner] - "firstName" = "Tanner" - "lastName" = "Linsley" + firstName = "Tanner" + lastName = "Linsley" +++ ``` ``` -// Use default sort options - sort by key / ascending +// Sort by value, ascending (default for lists) Tags: {{ range sort .Params.tags }}{{ . }} {{ end }} → Outputs Tags: tag1 tag2 tag3 -// Sort by value / descending +// Sort by value, descending Tags: {{ range sort .Params.tags "value" "desc" }}{{ . }} {{ end }} → Outputs Tags: tag3 tag2 tag1 -// Use default sort options - sort by value / descending +// Sort by key, ascending (default for maps) Authors: {{ range sort .Site.Params.authors }}{{ .firstName }} {{ end }} → Outputs Authors: Derek Joe Tanner -// Use default sort options - sort by value / descending +// Sort by field, descending Authors: {{ range sort .Site.Params.authors "lastName" "desc" }}{{ .lastName }} {{ end }} → Outputs Authors: Perkins Linsley Bergevin diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md index 97763c002..1f8ad40c5 100644 --- a/docs/content/en/getting-started/configuration.md +++ b/docs/content/en/getting-started/configuration.md @@ -253,7 +253,7 @@ sectionPagesMenu ("") : See ["Section Menu for Lazy Bloggers"](/templates/menu-templates/#section-menu-for-lazy-bloggers). sitemap -: Default [sitemap configuration](/templates/sitemap-template/#configure-sitemap-xml). +: Default [sitemap configuration](/templates/sitemap-template/#configure-sitemapxml). staticDir ("static") : A directory or a list of directories from where Hugo reads [static files][static-files]. {{% module-mounts-note %}} diff --git a/docs/content/en/getting-started/quick-start.md b/docs/content/en/getting-started/quick-start.md index 28b6b039b..f2378f4a7 100644 --- a/docs/content/en/getting-started/quick-start.md +++ b/docs/content/en/getting-started/quick-start.md @@ -78,7 +78,7 @@ git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/anan Then, add the theme to the site configuration: ```bash -echo 'theme = "ananke"' >> config.toml +echo theme = \"ananke\" >> config.toml ``` {{< asciicast 7naKerRYUGVPj8kiDmdh5k5h9 >}} diff --git a/docs/content/en/hosting-and-deployment/hosting-on-github.md b/docs/content/en/hosting-and-deployment/hosting-on-github.md index 9cabdd938..9b318f45d 100644 --- a/docs/content/en/hosting-and-deployment/hosting-on-github.md +++ b/docs/content/en/hosting-and-deployment/hosting-on-github.md @@ -82,7 +82,7 @@ jobs: publish_dir: ./public ``` -For more advance settings https://github.com/marketplace/actions/hugo-setup +For more advanced settings https://github.com/marketplace/actions/hugo-setup ## Use a Custom Domain diff --git a/docs/content/en/templates/404.md b/docs/content/en/templates/404.md index 0916e2299..b7d62ec8f 100644 --- a/docs/content/en/templates/404.md +++ b/docs/content/en/templates/404.md @@ -50,7 +50,7 @@ Your 404.html file can be set to load automatically when a visitor enters a mist * 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. * Amazon AWS S3. When setting a bucket up for static web serving, you can specify the error file from within the S3 GUI. -* Amazon CloudFont. You can specify the page in the Error Pages section in the CloudFont Console. [Details here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) +* 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. Using `errors { 404 /404.html }`. [Details here](https://caddyserver.com/docs/errors) * Netlify. Add `/* /404.html 404` to `content/_redirects`. |