Squashed 'docs/' changes from 3f95a2ace..a393f4cf4

a393f4cf4 Add a Spellcheck GitHub Action and config
8b6b1c381 netlify: Bump to Hugo 0.93.3
84515c183 Delete deployment-with-nanobox.md
dd45f9899 Fix typos in docs
e69de81a9 Update build-options.md
7745b7891 netlify: Hubo 0.93.2
037d63364 Clarify GitHub Pages Branches
94660c34b add missing %s
325de15e2 fix link to latest release note since the release notes were moved to GitHub: https://gohugo.io/news/no-more-releasenotes-here/
dbff41d01 Update introduction.md
0ecd627f7 netlify: Hugo 0.93.1
a74e16582 Update diagrams.md
33e310956 Add Goat example to test styling
fa0100a5b Update diagrams.md
64ac75367 Adjust diagram docs
f1d600044 Update theme
95bedff1a netlify: Bump to Hugo 0.93.0
849a8437f Merge commit 'c1398b91a9f4c67876b31feb67516b252e654d3c'
c0c60c43c docs: Regenerate docs helper
2c63fe518 cod: Regen CLI docs
f33ba4e5a CodeblockContext method renames
979b47968 Move the Goat template to the correct place
2df37e9e8 Add Markdown diagrams and render hooks for code blocks
bd8037d43 Allow images to be cropped without being resized
8b2af4b49 modules: Add modules.Workspace config for Go 1.18
46b99dea1 Add --printUnusedTemplates
1285302c9 commands: Rename --i18n-warnings to printI18nWarnings
dea2242c6 commands: Rename --path-warnings, --print-men to --printPathWarnings, --printMemoryUsage
db782ea46 deps: Update github.com/alecthomas/chroma v0.9.4 => v0.10.0

git-subtree-dir: docs
git-subtree-split: a393f4cf43829011e96d109de2f039a9b05b2d16
This commit is contained in:
Bjørn Erik Pedersen 2022-03-08 19:37:17 +01:00
parent c1398b91a9
commit d706529720
37 changed files with 775 additions and 333 deletions

155
.cspell.json Normal file
View file

@ -0,0 +1,155 @@
{
"version": "0.2",
"words": [
"aabb",
"aabba",
"aabbaa",
"aabbaabb",
"abourget",
"adoc",
"algolia",
"anchorize",
"anthonyfok",
"asciidoctor",
"attrlink",
"Bjørn",
"blackfriday",
"blogue",
"bogem",
"Brotli",
"canonify",
"Catwoman",
"Cheatsheet",
"chromastyles",
"clockoon",
"Cloudinary",
"CNAME",
"Codecademy's",
"CODEOWNERS",
"Commento",
"Cond",
"Contentful",
"countrunes",
"countwords",
"crossreferences",
"digitalcraftsman",
"Disqus",
"dokuwiki",
"DRING",
"Emojify",
"Enwrite",
"eparis",
"errorf",
"firstpost",
"Francia",
"freenode",
"funcs",
"funcsig",
"Garen",
"Getenv",
"Gohugo",
"gohugoio",
"goldenbridge",
"Goldmark",
"gomodules",
"GOPATH",
"govendor",
"Gowans",
"Grayscale",
"Gruber",
"gtag",
"Hokus",
"hugodoc",
"hugolang",
"hugoversion",
"Hyvor",
"iframes",
"imgproc",
"indice",
"Intelli",
"interdoc",
"IPTC",
"Isset",
"Isso",
"Joomla",
"jsonify",
"katex",
"kubernetes",
"lastmod",
"linktitle",
"markdownified",
"markdownify",
"mathjax",
"mercredi",
"Mittwoch",
"mmark",
"monokai",
"Morling",
"Muut",
"mypartials",
"mypost",
"needsexample",
"nobr",
"nocopy",
"Norsk",
"novembre",
"Octopress",
"opengraph",
"OWASP",
"Pandoc",
"peaceiris",
"Pedersen",
"plainify",
"println",
"publishdate",
"Pygments",
"querify",
"readfile",
"REDIR",
"reftext",
"relatedfuncs",
"relref",
"remarkjs",
"rgba",
"rlimit",
"safejs",
"Samsa",
"Shortcode",
"Shortcodes",
"Sindre",
"Smartcrop",
"struct",
"Talkyard",
"taxo",
"tbody",
"tdewolff",
"testshortcodes",
"thead",
"Thinkful",
"TMPDIR",
"tojson",
"Torikian",
"totoml",
"toyaml",
"Unmarshal",
"urlize",
"vimrc",
"wanghc",
"Wappalyzer",
"warnf",
"webp",
"wibble",
"workson",
"zzbbaabb"
],
"language": "en,en-GB,en-US,de,fr",
"files": [
"**/*.md"
],
"ignorePaths": [
".cspell.json",
"**/node_modules/**",
"*.min.*"
],
"useGitignore": true
}

17
.github/workflows/spellcheck.yml vendored Normal file
View file

@ -0,0 +1,17 @@
name: 'Check spelling'
on: # rebuild any PRs and main branch changes
push:
branches-ignore:
- "dependabot/**"
pull_request:
jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: streetsidesoftware/cspell-action@3bc52c39528d0214a947ff7f8b5c23ad3273435b
with:
inline: warning
strict: false
incremental_files_only: true

View file

@ -58,6 +58,7 @@
</head> </head>
<body class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }} {{ . }}{{ end }}"> <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 "nav" . }}{{ partial "site-nav.html" . }}{{ end }}
{{ block "header" . }}{{ end }} {{ block "header" . }}{{ end }}
<main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns"> <main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns">
@ -65,6 +66,9 @@
</main> </main>
{{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }} {{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }}
{{ partial "hooks/before-body-end" . }}
</body> </body>

View file

@ -0,0 +1 @@
{{/* Deliberately empty */}}

View file

@ -0,0 +1 @@
{{/* Deliberately empty */}}

View file

@ -8,7 +8,7 @@
HUGO HUGO
</a> </a>
</h1> </h1>
<ul class="list ma0 pa0 dn dib-l"> <ul class="list ma0 pa0 dn dib-l" role="menu">
{{ range .Site.Menus.global }} {{ range .Site.Menus.global }}
<li class="f5 dib mr4" role="menuitem"> <li class="f5 dib mr4" role="menuitem">
{{/* TODO: Create an "Global" active class to show which site one is currently at */}} {{/* TODO: Create an "Global" active class to show which site one is currently at */}}

View file

@ -1 +1 @@
# github.com/gohugoio/gohugoioTheme v0.0.0-20211211134334-0fe25799bb58 # github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135

View file

@ -35,12 +35,11 @@ hugo [flags]
--debug debug output --debug debug output
-d, --destination string filesystem path to write files to -d, --destination string filesystem path to write files to
--disableKinds strings disable different kind of pages (home, RSS etc.) --disableKinds strings disable different kind of pages (home, RSS etc.)
--enableGitInfo add Git revision, date and author info to the pages --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
-e, --environment string build environment -e, --environment string build environment
--forceSyncStatic copy all files when static is changed. --forceSyncStatic copy all files when static is changed.
--gc enable to run some cleanup tasks (remove unused cache files) after the build --gc enable to run some cleanup tasks (remove unused cache files) after the build
-h, --help help for hugo -h, --help help for hugo
--i18n-warnings print missing translations
--ignoreCache ignores the cache directory --ignoreCache ignores the cache directory
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
-l, --layoutDir string filesystem path to layout directory -l, --layoutDir string filesystem path to layout directory
@ -50,9 +49,11 @@ hugo [flags]
--noChmod don't sync permission mode of files --noChmod don't sync permission mode of files
--noTimes don't sync modification time of files --noTimes don't sync modification time of files
--panicOnWarning panic on first WARNING log --panicOnWarning panic on first WARNING log
--path-warnings print warnings on duplicate target paths etc.
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
--print-mem print memory usage to screen at intervals --printI18nWarnings print missing translations
--printMemoryUsage print memory usage to screen at intervals
--printPathWarnings print warnings on duplicate target paths etc.
--printUnusedTemplates print warnings on unused templates.
--quiet build in quiet mode --quiet build in quiet mode
--renderToMemory render to memory (only useful for benchmark testing) --renderToMemory render to memory (only useful for benchmark testing)
-s, --source string filesystem path to read files relative from -s, --source string filesystem path to read files relative from
@ -68,7 +69,7 @@ hugo [flags]
### SEE ALSO ### SEE ALSO
* [hugo completion](/commands/hugo_completion/) - generate the autocompletion script for the specified shell * [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell
* [hugo config](/commands/hugo_config/) - Print the site configuration * [hugo config](/commands/hugo_config/) - Print the site configuration
* [hugo convert](/commands/hugo_convert/) - Convert your content to different formats * [hugo convert](/commands/hugo_convert/) - Convert your content to different formats
* [hugo deploy](/commands/hugo_deploy/) - Deploy your site to a Cloud provider. * [hugo deploy](/commands/hugo_deploy/) - Deploy your site to a Cloud provider.

View file

@ -5,11 +5,10 @@ url: /commands/hugo_completion/
--- ---
## hugo completion ## hugo completion
generate the autocompletion script for the specified shell Generate the autocompletion script for the specified shell
### Synopsis ### Synopsis
Generate the autocompletion script for hugo for the specified shell. Generate the autocompletion script for hugo for the specified shell.
See each sub-command's help for details on how to use the generated script. See each sub-command's help for details on how to use the generated script.
@ -40,8 +39,8 @@ See each sub-command's help for details on how to use the generated script.
### SEE ALSO ### SEE ALSO
* [hugo](/commands/hugo/) - hugo builds your site * [hugo](/commands/hugo/) - hugo builds your site
* [hugo completion bash](/commands/hugo_completion_bash/) - generate the autocompletion script for bash * [hugo completion bash](/commands/hugo_completion_bash/) - Generate the autocompletion script for bash
* [hugo completion fish](/commands/hugo_completion_fish/) - generate the autocompletion script for fish * [hugo completion fish](/commands/hugo_completion_fish/) - Generate the autocompletion script for fish
* [hugo completion powershell](/commands/hugo_completion_powershell/) - generate the autocompletion script for powershell * [hugo completion powershell](/commands/hugo_completion_powershell/) - Generate the autocompletion script for powershell
* [hugo completion zsh](/commands/hugo_completion_zsh/) - generate the autocompletion script for zsh * [hugo completion zsh](/commands/hugo_completion_zsh/) - Generate the autocompletion script for zsh

View file

@ -5,27 +5,31 @@ url: /commands/hugo_completion_bash/
--- ---
## hugo completion bash ## hugo completion bash
generate the autocompletion script for bash Generate the autocompletion script for bash
### Synopsis ### Synopsis
Generate the autocompletion script for the bash shell. Generate the autocompletion script for the bash shell.
This script depends on the 'bash-completion' package. This script depends on the 'bash-completion' package.
If it is not installed already, you can install it via your OS's package manager. If it is not installed already, you can install it via your OS's package manager.
To load completions in your current shell session: To load completions in your current shell session:
$ source <(hugo completion bash)
source <(hugo completion bash)
To load completions for every new session, execute once: To load completions for every new session, execute once:
Linux:
$ hugo completion bash > /etc/bash_completion.d/hugo #### Linux:
MacOS:
$ hugo completion bash > /usr/local/etc/bash_completion.d/hugo hugo completion bash > /etc/bash_completion.d/hugo
#### macOS:
hugo completion bash > /usr/local/etc/bash_completion.d/hugo
You will need to start a new shell for this setup to take effect. You will need to start a new shell for this setup to take effect.
``` ```
hugo completion bash hugo completion bash
@ -57,5 +61,5 @@ hugo completion bash
### SEE ALSO ### SEE ALSO
* [hugo completion](/commands/hugo_completion/) - generate the autocompletion script for the specified shell * [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell

View file

@ -5,18 +5,19 @@ url: /commands/hugo_completion_fish/
--- ---
## hugo completion fish ## hugo completion fish
generate the autocompletion script for fish Generate the autocompletion script for fish
### Synopsis ### Synopsis
Generate the autocompletion script for the fish shell. Generate the autocompletion script for the fish shell.
To load completions in your current shell session: To load completions in your current shell session:
$ hugo completion fish | source
hugo completion fish | source
To load completions for every new session, execute once: To load completions for every new session, execute once:
$ hugo completion fish > ~/.config/fish/completions/hugo.fish
hugo completion fish > ~/.config/fish/completions/hugo.fish
You will need to start a new shell for this setup to take effect. You will need to start a new shell for this setup to take effect.
@ -51,5 +52,5 @@ hugo completion fish [flags]
### SEE ALSO ### SEE ALSO
* [hugo completion](/commands/hugo_completion/) - generate the autocompletion script for the specified shell * [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell

View file

@ -5,15 +5,15 @@ url: /commands/hugo_completion_powershell/
--- ---
## hugo completion powershell ## hugo completion powershell
generate the autocompletion script for powershell Generate the autocompletion script for powershell
### Synopsis ### Synopsis
Generate the autocompletion script for powershell. Generate the autocompletion script for powershell.
To load completions in your current shell session: To load completions in your current shell session:
PS C:\> hugo completion powershell | Out-String | Invoke-Expression
hugo completion powershell | Out-String | Invoke-Expression
To load completions for every new session, add the output of the above command To load completions for every new session, add the output of the above command
to your powershell profile. to your powershell profile.
@ -49,5 +49,5 @@ hugo completion powershell [flags]
### SEE ALSO ### SEE ALSO
* [hugo completion](/commands/hugo_completion/) - generate the autocompletion script for the specified shell * [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell

View file

@ -5,23 +5,26 @@ url: /commands/hugo_completion_zsh/
--- ---
## hugo completion zsh ## hugo completion zsh
generate the autocompletion script for zsh Generate the autocompletion script for zsh
### Synopsis ### Synopsis
Generate the autocompletion script for the zsh shell. Generate the autocompletion script for the zsh shell.
If shell completion is not already enabled in your environment you will need If shell completion is not already enabled in your environment you will need
to enable it. You can execute the following once: to enable it. You can execute the following once:
$ echo "autoload -U compinit; compinit" >> ~/.zshrc echo "autoload -U compinit; compinit" >> ~/.zshrc
To load completions for every new session, execute once: To load completions for every new session, execute once:
# Linux:
$ hugo completion zsh > "${fpath[1]}/_hugo" #### Linux:
# macOS:
$ hugo completion zsh > /usr/local/share/zsh/site-functions/_hugo hugo completion zsh > "${fpath[1]}/_hugo"
#### macOS:
hugo completion zsh > /usr/local/share/zsh/site-functions/_hugo
You will need to start a new shell for this setup to take effect. You will need to start a new shell for this setup to take effect.
@ -56,5 +59,5 @@ hugo completion zsh [flags]
### SEE ALSO ### SEE ALSO
* [hugo completion](/commands/hugo_completion/) - generate the autocompletion script for the specified shell * [hugo completion](/commands/hugo_completion/) - Generate the autocompletion script for the specified shell

View file

@ -35,20 +35,21 @@ See https://gohugo.io/hugo-modules/ for more information.
-c, --contentDir string filesystem path to content directory -c, --contentDir string filesystem path to content directory
-d, --destination string filesystem path to write files to -d, --destination string filesystem path to write files to
--disableKinds strings disable different kind of pages (home, RSS etc.) --disableKinds strings disable different kind of pages (home, RSS etc.)
--enableGitInfo add Git revision, date and author info to the pages --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
--forceSyncStatic copy all files when static is changed. --forceSyncStatic copy all files when static is changed.
--gc enable to run some cleanup tasks (remove unused cache files) after the build --gc enable to run some cleanup tasks (remove unused cache files) after the build
-h, --help help for mod -h, --help help for mod
--i18n-warnings print missing translations
--ignoreCache ignores the cache directory --ignoreCache ignores the cache directory
-l, --layoutDir string filesystem path to layout directory -l, --layoutDir string filesystem path to layout directory
--minify minify any supported output format (HTML, XML etc.) --minify minify any supported output format (HTML, XML etc.)
--noChmod don't sync permission mode of files --noChmod don't sync permission mode of files
--noTimes don't sync modification time of files --noTimes don't sync modification time of files
--panicOnWarning panic on first WARNING log --panicOnWarning panic on first WARNING log
--path-warnings print warnings on duplicate target paths etc.
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
--print-mem print memory usage to screen at intervals --printI18nWarnings print missing translations
--printMemoryUsage print memory usage to screen at intervals
--printPathWarnings print warnings on duplicate target paths etc.
--printUnusedTemplates print warnings on unused templates.
--templateMetrics display metrics about template executions --templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
-t, --theme strings themes to use (located in /themes/THEMENAME/) -t, --theme strings themes to use (located in /themes/THEMENAME/)

View file

@ -35,11 +35,10 @@ hugo new [path] [flags]
-d, --destination string filesystem path to write files to -d, --destination string filesystem path to write files to
--disableKinds strings disable different kind of pages (home, RSS etc.) --disableKinds strings disable different kind of pages (home, RSS etc.)
--editor string edit new content with this editor, if provided --editor string edit new content with this editor, if provided
--enableGitInfo add Git revision, date and author info to the pages --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
--forceSyncStatic copy all files when static is changed. --forceSyncStatic copy all files when static is changed.
--gc enable to run some cleanup tasks (remove unused cache files) after the build --gc enable to run some cleanup tasks (remove unused cache files) after the build
-h, --help help for new -h, --help help for new
--i18n-warnings print missing translations
--ignoreCache ignores the cache directory --ignoreCache ignores the cache directory
-k, --kind string content type to create -k, --kind string content type to create
-l, --layoutDir string filesystem path to layout directory -l, --layoutDir string filesystem path to layout directory
@ -47,9 +46,11 @@ hugo new [path] [flags]
--noChmod don't sync permission mode of files --noChmod don't sync permission mode of files
--noTimes don't sync modification time of files --noTimes don't sync modification time of files
--panicOnWarning panic on first WARNING log --panicOnWarning panic on first WARNING log
--path-warnings print warnings on duplicate target paths etc.
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
--print-mem print memory usage to screen at intervals --printI18nWarnings print missing translations
--printMemoryUsage print memory usage to screen at intervals
--printPathWarnings print warnings on duplicate target paths etc.
--printUnusedTemplates print warnings on unused templates.
--templateMetrics display metrics about template executions --templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics --templateMetricsHints calculate some improvement hints when combined with --templateMetrics
-t, --theme strings themes to use (located in /themes/THEMENAME/) -t, --theme strings themes to use (located in /themes/THEMENAME/)

View file

@ -43,11 +43,10 @@ hugo server [flags]
--disableFastRender enables full re-renders on changes --disableFastRender enables full re-renders on changes
--disableKinds strings disable different kind of pages (home, RSS etc.) --disableKinds strings disable different kind of pages (home, RSS etc.)
--disableLiveReload watch without enabling live browser reload on rebuild --disableLiveReload watch without enabling live browser reload on rebuild
--enableGitInfo add Git revision, date and author info to the pages --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages
--forceSyncStatic copy all files when static is changed. --forceSyncStatic copy all files when static is changed.
--gc enable to run some cleanup tasks (remove unused cache files) after the build --gc enable to run some cleanup tasks (remove unused cache files) after the build
-h, --help help for server -h, --help help for server
--i18n-warnings print missing translations
--ignoreCache ignores the cache directory --ignoreCache ignores the cache directory
-l, --layoutDir string filesystem path to layout directory -l, --layoutDir string filesystem path to layout directory
--liveReloadPort int port for live reloading (i.e. 443 in HTTPS proxy situations) (default -1) --liveReloadPort int port for live reloading (i.e. 443 in HTTPS proxy situations) (default -1)
@ -59,10 +58,12 @@ hugo server [flags]
--noHTTPCache prevent HTTP caching --noHTTPCache prevent HTTP caching
--noTimes don't sync modification time of files --noTimes don't sync modification time of files
--panicOnWarning panic on first WARNING log --panicOnWarning panic on first WARNING log
--path-warnings print warnings on duplicate target paths etc.
--poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
-p, --port int port on which the server will listen (default 1313) -p, --port int port on which the server will listen (default 1313)
--print-mem print memory usage to screen at intervals --printI18nWarnings print missing translations
--printMemoryUsage print memory usage to screen at intervals
--printPathWarnings print warnings on duplicate target paths etc.
--printUnusedTemplates print warnings on unused templates.
--renderToDisk render to Destination path (default is render to memory & serve from there) --renderToDisk render to Destination path (default is render to memory & serve from there)
--templateMetrics display metrics about template executions --templateMetrics display metrics about template executions
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics --templateMetricsHints calculate some improvement hints when combined with --templateMetrics

View file

@ -18,12 +18,12 @@ toc: true
They are stored in a reserved Front Matter object named `_build` with the following defaults: They are stored in a reserved Front Matter object named `_build` with the following defaults:
```yaml {{< code-toggle >}}
_build: _build:
render: always render: always
list: always list: always
publishResources: true publishResources: true
``` {{< /code-toggle >}}
#### render #### render
If `always`, the page will be treated as a published page, holding its dedicated output files (`index.html`, etc...) and permalink. If `always`, the page will be treated as a published page, holding its dedicated output files (`index.html`, etc...) and permalink.

View file

@ -30,7 +30,7 @@ Hugo comes with all the code you need to load Disqus into your templates. Before
Disqus comments require you set a single value in your [site's configuration file][configuration] like so: Disqus comments require you set a single value in your [site's configuration file][configuration] like so:
{{< code-toggle copy="false" >}} {{< code-toggle copy="false" >}}
disqusShortname = "yourdiscussshortname" disqusShortname = "yourDisqusShortname"
{{</ code-toggle >}} {{</ 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: 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:

View file

@ -0,0 +1,277 @@
---
title: Diagrams
date: 2022-02-20
categories: [content management]
keywords: [diagrams,drawing]
menu:
docs:
parent: "content-management"
weight: 22
weight: 22
toc: true
---
{{< new-in "0.93.0" >}}
## GoAT Diagrams (Ascii)
Hugo supports [GoAT](https://github.com/bep/goat) natively. This means that this code block:
````
```goat
. . . .--- 1 .-- 1 / 1
/ \ | | .---+ .-+ +
/ \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2
+ + | | | | ---+ ---+ +
/ \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3
/ \ / \ | | | | | | | | '---+ '-+ +
1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4
```
````
Will be rendered as:
```goat
. . . .--- 1 .-- 1 / 1
/ \ | | .---+ .-+ +
/ \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2
+ + | | | | ---+ ---+ +
/ \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3
/ \ / \ | | | | | | | | '---+ '-+ +
1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4
```
## Mermaid Diagrams
Hugo currently does not provide default templates for Mermaid diagrams. But you can easily add your own. One way to do it would be to create ` layouts/_default/_markup/render-codeblock-mermaid.html`:
```go-html-template
<div class="mermaid">
{{- .Inner | safeHTML }}
</div>
{{ .Page.Store.Set "hasMermaid" true }}
```
And then include this snippet at the bottom of the content template (below `.Content`):
```go-html-template
{{ 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 }}
```
With that you can use the `mermaid` language in Markdown code blocks:
```mermaid
sequenceDiagram
participant Alice
participant Bob
Alice->>John: Hello John, how are you?
loop Healthcheck
John->>John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail!
John-->>Alice: Great!
John->>Bob: How about you?
Bob-->>John: Jolly good!
```
## Goat Ascii Diagram Examples
### Graphics
```goat
.
0 3 P * Eye / ^ /
*-------* +y \ +) \ / Reflection
1 /| 2 /| ^ \ \ \ v
*-------* | | v0 \ v3 --------*--------
| |4 | |7 | *----\-----*
| *-----|-* +-----> +x / v X \ .-.<-------- o
|/ |/ / / o \ | / | Refraction / \
*-------* v / \ +-' / \
5 6 +z v1 *------------------* v2 | o-----o
v
```
### Complex
```goat
+-------------------+ ^ .---.
| A Box |__.--.__ __.--> | .-. | |
| | '--' v | * |<--- | |
+-------------------+ '-' | |
Round *---(-. |
.-----------------. .-------. .----------. .-------. | | |
| Mixed Rounded | | | / Diagonals \ | | | | | |
| & Square Corners | '--. .--' / \ |---+---| '-)-' .--------.
'--+------------+-' .--. | '-------+--------' | | | | / Search /
| | | | '---. | '-------' | '-+------'
|<---------->| | | | v Interior | ^
' <---' '----' .-----------. ---. .--- v |
.------------------. Diag line | .-------. +---. \ / . |
| if (a > b) +---. .--->| | | | | Curved line \ / / \ |
| obj->fcn() | \ / | '-------' |<--' + / \ |
'------------------' '--' '--+--------' .--. .--. | .-. +Done?+-'
.---+-----. | ^ |\ | | /| .--+ | | \ /
| | | Join \|/ | | Curved | \| |/ | | \ | \ /
| | +----> o --o-- '-' Vertical '--' '--' '-- '--' + .---.
<--+---+-----' | /|\ | | 3 |
v not:line 'quotes' .-' '---'
.-. .---+--------. / A || B *bold* | ^
| | | Not a dot | <---+---<-- A dash--is not a line v |
'-' '---------+--' / Nor/is this. ---
```
### Process
```goat
.
.---------. / \
| START | / \ .-+-------+-. ___________
'----+----' .-------. A / \ B | |COMPLEX| | / \ .-.
| | END |<-----+CHOICE +----->| | | +--->+ PREPARATION +--->| X |
v '-------' \ / | |PROCESS| | \___________/ '-'
.---------. \ / '-+---+---+-'
/ INPUT / \ /
'-----+---' '
| ^
v |
.-----------. .-----+-----. .-.
| PROCESS +---------------->| PROCESS |<------+ X |
'-----------' '-----------' '-'
```
### File tree
Created from https://arthursonzogni.com/Diagon/#Tree
```goat { width=300 color="orange" }
───Linux─┬─Android
├─Debian─┬─Ubuntu─┬─Lubuntu
│ │ ├─Kubuntu
│ │ ├─Xubuntu
│ │ └─Xubuntu
│ └─Mint
├─Centos
└─Fedora
```
### Sequence Diagram
https://arthursonzogni.com/Diagon/#Sequence
```goat { class="w-40" }
┌─────┐ ┌───┐
│Alice│ │Bob│
└──┬──┘ └─┬─┘
│ │
│ Hello Bob! │
│───────────>│
│ │
│Hello Alice!│
<───────────│
┌──┴──┐ ┌─┴─┐
│Alice│ │Bob│
└─────┘ └───┘
```
### Flowchart
https://arthursonzogni.com/Diagon/#Flowchart
```goat
_________________
╲ ┌─────┐
DO YOU UNDERSTAND ╲____________________________________________________│GOOD!│
╲ FLOW CHARTS? yes └──┬──┘
╲_________________
│no │
_________▽_________ ______________________
╲ ┌────┐ │
OKAY, YOU SEE THE ╲________________ ... AND YOU CAN SEE ╲___│GOOD│ │
╲ LINE LABELED 'YES'? yes ╲ THE ONES LABELED 'NO'? yes└──┬─┘ │
╲___________________ ╲______________________ │ │
│no │no │ │
________▽_________ _________▽__________ │ │
╲ ┌───────────┐ ╲ │ │
BUT YOU SEE THE ╲___│WAIT, WHAT?│ BUT YOU JUST ╲___ │ │
╲ ONES LABELED 'NO'? yes└───────────┘ ╲ FOLLOWED THEM TWICE? yes│ │ │
╲__________________ ╲____________________ │ │ │
│no │no │ │ │
┌───▽───┐ │ │ │ │
│LISTEN.│ └───────┬───────┘ │ │
└───┬───┘ ┌──────▽─────┐ │ │
┌─────▽────┐ │(THAT WASN'T│ │ │
│I HATE YOU│ │A QUESTION) │ │ │
└──────────┘ └──────┬─────┘ │ │
┌────▽───┐ │ │
│SCREW IT│ │ │
└────┬───┘ │ │
└─────┬─────┘ │
│ │
└─────┬─────┘
┌───────▽──────┐
│LET'S GO DRING│
└───────┬──────┘
┌─────────▽─────────┐
│HEY, I SHOULD TRY │
│INSTALLING FREEBSD!│
└───────────────────┘
```
### Table
https://arthursonzogni.com/Diagon/#Table
```goat { class="w-80 dark-blue" }
┌────────────────────────────────────────────────┐
│ │
├────────────────────────────────────────────────┤
│SYNTAX = { PRODUCTION } . │
├────────────────────────────────────────────────┤
│PRODUCTION = IDENTIFIER "=" EXPRESSION "." . │
├────────────────────────────────────────────────┤
│EXPRESSION = TERM { "|" TERM } . │
├────────────────────────────────────────────────┤
│TERM = FACTOR { FACTOR } . │
├────────────────────────────────────────────────┤
│FACTOR = IDENTIFIER │
├────────────────────────────────────────────────┤
│ | LITERAL │
├────────────────────────────────────────────────┤
│ | "[" EXPRESSION "]" │
├────────────────────────────────────────────────┤
│ | "(" EXPRESSION ")" │
├────────────────────────────────────────────────┤
│ | "{" EXPRESSION "}" . │
├────────────────────────────────────────────────┤
│IDENTIFIER = letter { letter } . │
├────────────────────────────────────────────────┤
│LITERAL = """" character { character } """" .│
└────────────────────────────────────────────────┘
```

View file

@ -39,7 +39,7 @@ The `image` resource can also be retrieved from a [global resource]({{< relref "
## Image Processing Methods ## Image Processing Methods
The `image` resource implements the `Resize`, `Fit`, `Fill`, and `Filter` methods, each returning a transformed image using the specified dimensions and processing options. The `image` resource implements the `Resize`, `Fit`, `Fill`, `Crop`, and `Filter` methods, each returning a transformed image using the specified dimensions and processing options.
{{% note %}} {{% 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. 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.
@ -70,12 +70,20 @@ Scale down the image to fit the given dimensions while maintaining aspect ratio.
### Fill ### Fill
Resize and crop the image to match the given dimensions. Both height and width are required. Crop and resize the image to match the given dimensions. Both height and width are required.
```go ```go
{{ $image := $resource.Fill "600x400" }} {{ $image := $resource.Fill "600x400" }}
``` ```
### Crop
Crop the image to match the given dimensions without resizing. Both height and width are required.
```go
{{ $image := $resource.Crop "400x400" }}
```
### Filter ### Filter
Apply one or more filters to your image. See [Image Filters](/functions/images/#image-filters) for a full list. Apply one or more filters to your image. See [Image Filters](/functions/images/#image-filters) for a full list.
@ -203,7 +211,7 @@ Rotates an image by the given angle counter-clockwise. The rotation will be perf
### Anchor ### Anchor
Only relevant for the `Fill` method. This is useful for thumbnail generation where the main motive is located in, say, the left corner. Only relevant for the `Crop` and `Fill` methods. This is useful for thumbnail generation where the main motive is located in, say, the left corner.
Valid values are `Smart`, `Center`, `TopLeft`, `Top`, `TopRight`, `Left`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`. Valid values are `Smart`, `Center`, `TopLeft`, `Top`, `TopRight`, `Left`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`.
@ -249,6 +257,8 @@ _The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pe
{{< imgproc sunset Fit "90x90" />}} {{< imgproc sunset Fit "90x90" />}}
{{< imgproc sunset Crop "250x250 center" />}}
{{< imgproc sunset Resize "300x q10" />}} {{< imgproc sunset Resize "300x q10" />}}
This is the shortcode used in the examples above: This is the shortcode used in the examples above:
@ -286,7 +296,7 @@ quality = 75
# Valid values are "picture", "photo", "drawing", "icon", or "text". # Valid values are "picture", "photo", "drawing", "icon", or "text".
hint = "photo" hint = "photo"
# Anchor used when cropping pictures. # Anchor used when cropping pictures with either .Fill or .Crop
# Default is "smart" which does Smart Cropping, using https://github.com/muesli/smartcrop # Default is "smart" which does Smart Cropping, using https://github.com/muesli/smartcrop
# Smart Cropping is content aware and tries to find the best crop for each image. # Smart Cropping is content aware and tries to find the best crop for each image.
# Valid values are Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight # Valid values are Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
@ -323,12 +333,14 @@ disableLatLong = false
## Smart Cropping of Images ## Smart Cropping of Images
By default, Hugo will use [Smartcrop](https://github.com/muesli/smartcrop), a library created by [muesli](https://github.com/muesli), when cropping images with `.Fill`. You can set the anchor point manually, but in most cases the smart option will make a good choice. And we will work with the library author to improve this in the future. By default, Hugo will use [Smartcrop](https://github.com/muesli/smartcrop), a library created by [muesli](https://github.com/muesli), when cropping images with `.Fill` or `.Crop`. You can set the anchor point manually, but in most cases the smart option will make a good choice. And we will work with the library author to improve this in the future.
An example using the sunset image from above: Examples using the sunset image from above:
{{< imgproc sunset Fill "200x200 smart" />}} {{< imgproc sunset Fill "200x200 smart" />}}
{{< imgproc sunset Crop "200x200 smart" />}}
## Image Processing Performance Consideration ## Image Processing Performance Consideration
Processed images are stored below `<project-dir>/resources` (can be set with `resourceDir` config setting). This folder is deliberately placed in the project, as it is recommended to check these into source control as part of the project. These images are not "Hugo fast" to generate, but once generated they can be reused. Processed images are stored below `<project-dir>/resources` (can be set with `resourceDir` config setting). This folder is deliberately placed in the project, as it is recommended to check these into source control as part of the project. These images are not "Hugo fast" to generate, but once generated they can be reused.

View file

@ -1,249 +0,0 @@
---
title: Host-Agnostic Deploys with Nanobox
linktitle: Host-Agnostic Deploys with Nanobox
description: Easily deploy Hugo to AWS, DigitalOcean, Google, Azure, and more...
date: 2017-08-24
publishdate: 2017-08-24
lastmod: 2017-08-24
categories: [hosting and deployment]
keywords: [nanobox,deployment,hosting,aws,digitalocean,azure,google,linode]
authors: [Steve Domino]
menu:
docs:
parent: "hosting-and-deployment"
weight: 05
weight: 05
sections_weight: 05
draft: false
aliases: [/tutorials/deployment-with-nanobox/]
toc: true
---
![hugo with nanobox](/images/hosting-and-deployment/deployment-with-nanobox/hugo-with-nanobox.png)
Nanobox provides an entire end-to-end workflow for developing and deploying applications. Using Nanobox to deploy also means you'll use it to develop your application.
{{% note %}}
If you're already using Nanobox and just need deployment instructions, you can skip to [Deploying Hugo with Nanobox](#deploying-hugo-with-nanobox)
{{% /note %}}
## What You'll Need
With Nanobox you don't need to worry about having Go or Hugo installed. They'll be installed as part of the development environment created for you.
To get started you'll just need the following three items:
* [A Nanobox Account](https://nanobox.io) - Signup is free
* [Nanobox Desktop](https://dashboard.nanobox.io/download) - The free desktop development tool
* An account with a hosting provider such as:
- [AWS](https://docs.nanobox.io/providers/hosting-accounts/aws/)
- [Google](https://docs.nanobox.io/providers/hosting-accounts/gcp/)
- [Azure](https://docs.nanobox.io/providers/hosting-accounts/azure/)
- [DigitalOcean](https://docs.nanobox.io/providers/hosting-accounts/digitalocean/)
- [Linode](https://docs.nanobox.io/providers/hosting-accounts/linode/)
- [More...](https://docs.nanobox.io/providers/hosting-accounts/)
- [Roll Your Own](https://docs.nanobox.io/providers/create/)
### Before You Begin
There are a few things to get out of the way before diving into the guide. To deploy, you'll need to make sure you have connected a host account to your Nanobox account, and launched a new application.
#### Connect a Host Account
Nanobox lets you choose where to host your application (AWS, DigitalOcean, Google, Azure, etc.). In the [Hosting Accounts](https://dashboard.nanobox.io/provider_accounts) section of your Nanobox dashboard [link your Nanobox account with your host](https://docs.nanobox.io/providers/hosting-accounts/).
#### Launch a New Application on Nanobox
[Launching a new app on Nanobox](https://docs.nanobox.io/workflow/launch-app/) is very simple. Navigate to [Launch New App](https://dashboard.nanobox.io/apps/new) in the dashboard, and follow the steps there. You'll be asked to name your app, and to select a host and region.
With those out of the way you're ready to get started!
## Getting Started
{{% note %}}
If you already have a functioning Hugo app, you can skip to [Configure Hugo to run with Nanobox](#configure-hugo-to-run-with-nanobox)
{{% /note %}}
To get started, all you'll need is an empty project directory. Create a directory wherever you want your application to live and `cd` into it:
`mkdir path/to/project && cd path/to/project`
### Configure Hugo to run with Nanobox
Nanobox uses a simple config file known as a [boxfile.yml](https://docs.nanobox.io/boxfile/) to describe your application's infrastructure. In the root of your project add the following `boxfile.yml`:
{{< code file="boxfile.yml" >}}
run.config:
# use the static engine
engine: static
engine.config:
# tell the engine where to serve static assets from
rel_dir: public
# enable file watching for live reload
fs_watch: true
# install hugo
extra_steps:
- bash ./install.sh
deploy.config:
# generate site on deploy
extra_steps:
- hugo
{{< /code >}}
{{% note %}}
If you already have a functioning Hugo app, after adding the boxfile, you can skip to [Deploying Hugo with Nanobox](#deploying-hugo-with-nanobox).
{{% /note %}}
### Installing Hugo
Nanobox uses Docker to create instant, isolated, development environments. Because of this, you'll need to make sure that during development you have Hugo available.
Do this by adding a custom install script at the root of your project that will install Hugo automatically for you:
{{< code file="install.sh" >}}
#!/bin/bash
if [[ ! -f /data/bin/hugo ]]; then
cd /tmp
wget https://github.com/gohugoio/hugo/releases/download/v0.31.1/hugo_0.31.1_Linux-64bit.tar.gz
tar -xzf hugo_0.31.1_Linux-64bit.tar.gz
mv hugo /data/bin/hugo
cd -
rm -rf /tmp/*
fi
{{< /code >}}
{{% note %}}
If the install script fails during `nanobox run` you may need to make it executable with `chmod +x install.sh`
{{% /note %}}
{{% note %}}
Make sure to check the version of Hugo you have installed and update the install script to match.
{{% /note %}}
### Generating a New Hugo App
You'll generate your new application from inside the Nanobox VM (this is why you don't need to worry about having Go or Hugo installed).
Run the following command to drop into a Nanobox console (inside the VM) where your codebase is mounted:
```
nanobox run
```
![nanobox run](/images/hosting-and-deployment/deployment-with-nanobox/nanobox-run.png)
Once inside the console use the following steps to create a new Hugo application:
```
# cd into the /tmp dir to create an app
cd /tmp
# generate the hugo app
hugo new site app
# cd back into the /app dir
cd -
# copy the generated app into the project
shopt -s dotglob
cp -a /tmp/app/* .
```
### Install a theme
`cd` into the `themes` directory and clone the `nanobox-hugo-theme` repo:
```
cd themes
git clone https://github.com/sdomino/nanobox-hugo-theme
```
To use the theme *either* copy the entire `config.toml` that comes with the theme, or just add the theme to your existing `config.toml`
```
# copy the config.toml that comes with the theme
cp ./themes/nanobox-hugo-theme/config.toml config.toml
# or, add it to your existing config.toml
theme = "nanobox-hugo-theme"
```
{{% note %}}
It is not intended that you use the `nanobox-hugo-theme` as your actual theme. It's simply a theme to start with and should be replaced.
{{% /note %}}
### View Your App
To view your application simply run the following command from a Nanobox console:
```
hugo server --bind="0.0.0.0" --baseUrl=$APP_IP
```
![hugo server](/images/hosting-and-deployment/deployment-with-nanobox/hugo-server.png)
With that you should be able to visit your app at the given IP:1313 address
{{% note %}}
You can [add a custom DNS alias](https://docs.nanobox.io/cli/dns/#add) to make it easier to access your app. Run `nanobox dns add local hugo.dev`. After starting your server, visit your app at [hugo.dev:1313](http://hugo.dev:1313)
{{% /note %}}
### Develop, Develop, Develop
{{% note %}}
IMPORTANT: One issue we are aware of, and actively investigating, is livereload. Currently, livereload does not work when developing Hugo applications with Nanobox.
{{% /note %}}
With Hugo installed you're ready to go. Develop Hugo like you would normally (using all the generators, etc.). Once your app is ready to deploy, run `hugo` to generate your static assets and get ready to deploy!
## Deploying Hugo with Nanobox
{{% note %}}
If you haven't already, make sure to [connect a hosting account](#connect-a-host-account) to your Nanobox account, and [launch a new application](#launch-a-new-application-on-nanobox) in the Dashboard.
{{% /note %}}
To deploy your application to Nanobox you simply need to [link your local codebase](https://docs.nanobox.io/workflow/deploy-code/#add-your-live-app-as-a-remote) to an application you've created on Nanobox. That is done with the following command:
```
nanobox remote add <your-app-name>
```
{{% note %}}
You may be prompted to login using your ***Nanobox credentials*** at this time
{{% /note %}}
### Stage Your Application (optional)
Nanobox gives you the ability to [simulate your production environment locally](https://docs.nanobox.io/workflow/deploy-code/#preview-locally). While staging is optional it's always recommended, so there's no reason not to!
To stage your app simply run:
```
nanobox deploy dry-run
```
Now visit your application with the IP address provided.
![nanobox deploy dry-run](/images/hosting-and-deployment/deployment-with-nanobox/nanobox-deploy-dry-run.png)
### Deploy Your Application
Once everything checks out and you're [ready to deploy](https://docs.nanobox.io/workflow/deploy-code/#deploy-to-production), simply run:
```
nanobox deploy
```
Within minutes you're Hugo app will be deployed to your host and humming along smoothly. That's it!

View file

@ -34,14 +34,16 @@ There are two types of GitHub Pages:
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. 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 ## 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: 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 use a `<USERNAME>.github.io` to host your **generated** content 1. You must create a repository named `<USERNAME>.github.io` or `<ORGANIZATION>.github.io` to host your pages
2. Content from the `main` branch will be used to publish your GitHub Pages site 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.
This is a much simpler setup as your Hugo files and generated content are published into two different repositories.
## Build Hugo With GitHub Action ## Build Hugo With GitHub Action

View file

@ -23,6 +23,7 @@ proxy = "direct"
noProxy = "none" noProxy = "none"
private = "*.*" private = "*.*"
replacements = "" replacements = ""
workspace = ""
{{< /code-toggle >}} {{< /code-toggle >}}
@ -41,6 +42,9 @@ noProxy
private private
: Comma separated glob list matching paths that should be treated as private. : Comma separated glob list matching paths that should be treated as private.
workspace {{< new-in "0.83.0" >}}
The workspace file to use. This enables Go workspace mode. Note that this can also be set via OS env, e.g. `export HUGO_MODULE_WORKSPACE=/my/hugo.work` This only works with Go 1.18+.
replacements {{< new-in "0.77.0" >}} replacements {{< new-in "0.77.0" >}}
: A comma separated (or a slice) list of module path to directory replacement mapping, e.g. `github.com/bep/myprettytheme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary locally development of a module, and then it makes sense to set it as an OS environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/myprettytheme -> ../.."`. Any relative path is relate to [themesDir](https://gohugo.io/getting-started/configuration/#all-configuration-settings), and absolute paths are allowed. : A comma separated (or a slice) list of module path to directory replacement mapping, e.g. `github.com/bep/myprettytheme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary locally development of a module, and then it makes sense to set it as an OS environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/myprettytheme -> ../.."`. Any relative path is relate to [themesDir](https://gohugo.io/getting-started/configuration/#all-configuration-settings), and absolute paths are allowed.

View file

@ -18,6 +18,23 @@ toc: true
aliases: [/assets/] aliases: [/assets/]
--- ---
## Find Resources in /assets
This is about the global Resources mounted inside `/assets`. For the `.Page` scoped Resources, see [Page Resources](/content-management/page-resources/).
Note that you can mount any directory into Hugo's virtual `assets` folder using the [Mount Configuration](/hugo-modules/configuration/#module-config-mounts).
| Function | Description |
| ------------- | ------------- |
| `resources.Get` | Get locates the filename given in Hugo's assets filesystem and creates a `Resource` object that can be used for further transformations. See [Get Resource with resources.Get and resources.GetRemote](#get-resource-with-resourcesget-and-resourcesgetremote). |
| `resources.GetRemote` | Same as `Get`, but it accepts remote URLs. See [Get Resource with resources.Get and resources.GetRemote](#get-resource-with-resourcesget-and-resourcesgetremote).|
| `resources.GetMatch` | `GetMatch` finds the first Resource matching the given pattern, or nil if none found. See Match for a more complete explanation about the rules used. |
| `resources.Match` | `Match` gets all resources matching the given base path prefix, e.g "*.png" will match all png files. The "*" does not match path delimiters (/), so if you organize your resources in sub-folders, you need to be explicit about it, e.g.: "images/*.png". To match any PNG image anywhere in the bundle you can do "\*\*.png", and to match all PNG images below the images folder, use "images/\*\*.jpg". The matching is case insensitive. Match matches by using the files name with path relative to the file system root with Unix style slashes (/) and no leading slash, e.g. "images/logo.png". See https://github.com/gobwas/glob for the full rules set.|
See the [GoDoc Page](https://pkg.go.dev/github.com/gohugoio/hugo@v0.93.1/tpl/resources) for the `resources` package for an up to date overview of all template functions in this namespace.
## Get Resource with resources.Get and resources.GetRemote ## Get Resource with resources.Get and resources.GetRemote
In order to process an asset with Hugo Pipes, it must be retrieved as a `Resource` using `resources.Get` or `resources.GetRemote`. In order to process an asset with Hugo Pipes, it must be retrieved as a `Resource` using `resources.Get` or `resources.GetRemote`.

View file

@ -80,7 +80,7 @@ Huge thanks to all who participated in this release. A special thanks to [@bep](
## Bugfixes ## Bugfixes
- Fix data races in page sorting and page reversal. These operations are now also cached. [#1293](https://github.com/spf13/hugo/issues/1293) - Fix data races in page sorting and page reversal. These operations are now also cached. [#1293](https://github.com/spf13/hugo/issues/1293)
- `page.HasMenuCurrent()` and `node.HasMenuCurrent()` now work correctly in multi-level nested menus. - `page.HasMenuCurrent()` and `node.HasMenuCurrent()` now work correctly in multi-level nested menus.
- Support `Fish and Chips` style section titles. Previously, this would end up as `Fish And Chips`. Now, the first character is made toupper, but the rest are preserved as-is. [#1176](https://github.com/spf13/hugo/issues/1176) - Support `Fish and Chips` style section titles. Previously, this would end up as `Fish And Chips`. Now, the first character is made to upper, but the rest are preserved as-is. [#1176](https://github.com/spf13/hugo/issues/1176)
- Hugo now removes superfluous p-tags around shortcodes. [#1148](https://github.com/spf13/hugo/issues/1148) - Hugo now removes superfluous p-tags around shortcodes. [#1148](https://github.com/spf13/hugo/issues/1148)
## Notices ## Notices

View file

@ -42,7 +42,7 @@ Worth mentioning is also the ongoing work that [@rdwatters](//github.com/rdwatte
* Hugo `0.20` is built with Go 1.8.1. * Hugo `0.20` is built with Go 1.8.1.
* Add `.Site.Params.mainSections` that defaults to the section with the most pages. Plan is to get themes to use this instead of the hardcoded `blog` in `where` clauses. [#3206](//github.com/gohugoio/hugo/issues/3206) * Add `.Site.Params.mainSections` that defaults to the section with the most pages. Plan is to get themes to use this instead of the hardcoded `blog` in `where` clauses. [#3206](//github.com/gohugoio/hugo/issues/3206)
* File extension is now configurable. [#320](//github.com/gohugoio/hugo/issues/320) * File extension is now configurable. [#320](//github.com/gohugoio/hugo/issues/320)
* Impove `markdownify` template function performance. [#3292](//github.com/gohugoio/hugo/issues/3292) * Improve `markdownify` template function performance. [#3292](//github.com/gohugoio/hugo/issues/3292)
* Add taxonomy terms pages to `.Data.Pages` [#2826](//github.com/gohugoio/hugo/issues/2826) * Add taxonomy terms pages to `.Data.Pages` [#2826](//github.com/gohugoio/hugo/issues/2826)
* Change `RSS` description from full `.Content` to `.Summary`. * Change `RSS` description from full `.Content` to `.Summary`.
* Ignore “.” dirs in `hugo --cleanDestinationDir` [#3202](//github.com/gohugoio/hugo/issues/3202) * Ignore “.” dirs in `hugo --cleanDestinationDir` [#3202](//github.com/gohugoio/hugo/issues/3202)

View file

@ -74,7 +74,7 @@ Also, considerable work has been put into writing automated benchmark tests for
### Docs ### Docs
* Rewrite “Archetypes” article [@davidturnbull](https://github.com/davidturnbull) [#3543](https://github.com/gohugoio/hugo/pull/3543/) * Rewrite “Archetypes” article [@davidturnbull](https://github.com/davidturnbull) [#3543](https://github.com/gohugoio/hugo/pull/3543/)
* Remove Unmaintaned Frontends from Tools. [f41f7282](https://github.com/gohugoio/hugo/commit/f41f72822251c9a31031fd5b3dda585c57c8b028) [@onedrawingperday](https://github.com/onedrawingperday) * Remove Unmaintained Frontends from Tools. [f41f7282](https://github.com/gohugoio/hugo/commit/f41f72822251c9a31031fd5b3dda585c57c8b028) [@onedrawingperday](https://github.com/onedrawingperday)
## Fixes ## Fixes

View file

@ -38,7 +38,7 @@ Hugo now has:
## Enhancements ## Enhancements
* Add `templates.Exists` template function. This can be used to check if a template, e.g. a partial, exists in the project or any of the themes in use. [0ba19c57](https://github.com/gohugoio/hugo/commit/0ba19c57f180c33b41c64335ea1d1c89335d34c0) [@bep](https://github.com/bep) [#5010](https://github.com/gohugoio/hugo/issues/5010) * Add `templates.Exists` template function. This can be used to check if a template, e.g. a partial, exists in the project or any of the themes in use. [0ba19c57](https://github.com/gohugoio/hugo/commit/0ba19c57f180c33b41c64335ea1d1c89335d34c0) [@bep](https://github.com/bep) [#5010](https://github.com/gohugoio/hugo/issues/5010)
* Remove superflous loop [0afa2897](https://github.com/gohugoio/hugo/commit/0afa2897a0cf90f4348929ef432202efddc183a0) [@bep](https://github.com/bep) * Remove superfluous loop [0afa2897](https://github.com/gohugoio/hugo/commit/0afa2897a0cf90f4348929ef432202efddc183a0) [@bep](https://github.com/bep)
* Update Chroma [b5d13ca1](https://github.com/gohugoio/hugo/commit/b5d13ca16bf106c1bc29c2a5295cd231d1bf13fd) [@bep](https://github.com/bep) [#5019](https://github.com/gohugoio/hugo/issues/5019) * Update Chroma [b5d13ca1](https://github.com/gohugoio/hugo/commit/b5d13ca16bf106c1bc29c2a5295cd231d1bf13fd) [@bep](https://github.com/bep) [#5019](https://github.com/gohugoio/hugo/issues/5019)
* Make resources fetched via `resources.Get` and similar language agnostic [6b02f5c0](https://github.com/gohugoio/hugo/commit/6b02f5c0f4e0ba1730aebc5a590a111548233bd5) [@bep](https://github.com/bep) [#5017](https://github.com/gohugoio/hugo/issues/5017) * Make resources fetched via `resources.Get` and similar language agnostic [6b02f5c0](https://github.com/gohugoio/hugo/commit/6b02f5c0f4e0ba1730aebc5a590a111548233bd5) [@bep](https://github.com/bep) [#5017](https://github.com/gohugoio/hugo/issues/5017)
* Improve SCSS project vs themes import resolution [f219ac09](https://github.com/gohugoio/hugo/commit/f219ac09f6b7e26d84599401512233d77c1bdb4c) [@bep](https://github.com/bep) [#5008](https://github.com/gohugoio/hugo/issues/5008) * Improve SCSS project vs themes import resolution [f219ac09](https://github.com/gohugoio/hugo/commit/f219ac09f6b7e26d84599401512233d77c1bdb4c) [@bep](https://github.com/bep) [#5008](https://github.com/gohugoio/hugo/issues/5008)

View file

@ -167,6 +167,12 @@
"bibtex" "bibtex"
] ]
}, },
{
"Name": "Bicep",
"Aliases": [
"bicep"
]
},
{ {
"Name": "BlitzBasic", "Name": "BlitzBasic",
"Aliases": [ "Aliases": [
@ -971,6 +977,19 @@
"onesenterprise" "onesenterprise"
] ]
}, },
{
"Name": "OpenEdge ABL",
"Aliases": [
"abl",
"cls",
"i",
"openedge",
"openedgeabl",
"p",
"progress",
"w"
]
},
{ {
"Name": "OpenSCAD", "Name": "OpenSCAD",
"Aliases": [ "Aliases": [
@ -1049,6 +1068,13 @@
"txt" "txt"
] ]
}, },
{
"Name": "Plutus Core",
"Aliases": [
"plc",
"plutus-core"
]
},
{ {
"Name": "Pony", "Name": "Pony",
"Aliases": [ "Aliases": [
@ -1608,8 +1634,11 @@
{ {
"Name": "XML", "Name": "XML",
"Aliases": [ "Aliases": [
"csproj",
"fsproj",
"rss", "rss",
"svg", "svg",
"vcxproj",
"wsdl", "wsdl",
"wsf", "wsf",
"xml", "xml",
@ -1638,6 +1667,12 @@
"yang" "yang"
] ]
}, },
{
"Name": "Zed",
"Aliases": [
"zed"
]
},
{ {
"Name": "Zig", "Name": "Zig",
"Aliases": [ "Aliases": [
@ -1653,6 +1688,7 @@
"style": "monokai", "style": "monokai",
"codeFences": true, "codeFences": true,
"noClasses": true, "noClasses": true,
"noHl": false,
"lineNos": false, "lineNos": false,
"lineNumbersInTable": true, "lineNumbersInTable": true,
"anchorLineNos": false, "anchorLineNos": false,
@ -1815,7 +1851,8 @@
}, },
"js": { "js": {
"precision": 0, "precision": 0,
"keepVarNames": false "keepVarNames": false,
"noNullishOperator": false
}, },
"json": { "json": {
"precision": 0, "precision": 0,
@ -1870,7 +1907,9 @@
"type": "application/javascript", "type": "application/javascript",
"string": "application/javascript", "string": "application/javascript",
"suffixes": [ "suffixes": [
"js" "js",
"jsm",
"mjs"
] ]
}, },
{ {
@ -3169,8 +3208,8 @@
], ],
"Examples": [ "Examples": [
[ [
"{{ if eq .Section \"blog\" }}current{{ end }}", "{{ if eq .Section \"blog\" }}current-section{{ end }}",
"current" "current-section"
] ]
] ]
}, },
@ -3185,7 +3224,7 @@
], ],
"Examples": [ "Examples": [
[ [
"{{ if ge .Hugo.Version \"0.36\" }}Reasonable new Hugo version!{{ end }}", "{{ if ge hugo.Version \"0.80\" }}Reasonable new Hugo version!{{ end }}",
"Reasonable new Hugo version!" "Reasonable new Hugo version!"
] ]
] ]
@ -3708,6 +3747,14 @@
] ]
} }
}, },
"diagrams": {
"Goat": {
"Description": "",
"Args": null,
"Aliases": null,
"Examples": null
}
},
"encoding": { "encoding": {
"Base64Decode": { "Base64Decode": {
"Description": "Base64Decode returns the base64 decoding of the given content.", "Description": "Base64Decode returns the base64 decoding of the given content.",
@ -4218,6 +4265,12 @@
] ]
] ]
}, },
"Counter": {
"Description": "",
"Args": null,
"Aliases": null,
"Examples": null
},
"Div": { "Div": {
"Description": "Div divides two numbers.", "Description": "Div divides two numbers.",
"Args": [ "Args": [
@ -4468,8 +4521,9 @@
}, },
"partials": { "partials": {
"Include": { "Include": {
"Description": "Include executes the named partial.\nIf the partial contains a return statement, that value will be returned.\nElse, the rendered output will be returned:\nA string if the partial is a text/template, or template.HTML when html/template.", "Description": "Include executes the named partial.\nIf the partial contains a return statement, that value will be returned.\nElse, the rendered output will be returned:\nA string if the partial is a text/template, or template.HTML when html/template.\nNote that ctx is provided by Hugo, not the end user.",
"Args": [ "Args": [
"ctx",
"name", "name",
"contextList" "contextList"
], ],
@ -4484,8 +4538,9 @@
] ]
}, },
"IncludeCached": { "IncludeCached": {
"Description": "IncludeCached executes and caches partial templates. The cache is created with name+variants as the key.", "Description": "IncludeCached executes and caches partial templates. The cache is created with name+variants as the key.\nNote that ctx is provided by Hugo, not the end user.",
"Args": [ "Args": [
"ctx",
"name", "name",
"context", "context",
"variants" "variants"
@ -4810,6 +4865,12 @@
"Aliases": null, "Aliases": null,
"Examples": null "Examples": null
}, },
"Home": {
"Description": "",
"Args": null,
"Aliases": null,
"Examples": null
},
"Hugo": { "Hugo": {
"Description": "", "Description": "",
"Args": null, "Args": null,
@ -5381,6 +5442,12 @@
} }
}, },
"transform": { "transform": {
"CanHighlight": {
"Description": "",
"Args": null,
"Aliases": null,
"Examples": null
},
"Emojify": { "Emojify": {
"Description": "Emojify returns a copy of s with all emoji codes replaced with actual emojis.\n\nSee http://www.emoji-cheat-sheet.com/", "Description": "Emojify returns a copy of s with all emoji codes replaced with actual emojis.\n\nSee http://www.emoji-cheat-sheet.com/",
"Args": [ "Args": [
@ -5458,6 +5525,12 @@
], ],
"Examples": [] "Examples": []
}, },
"HighlightCodeBlock": {
"Description": "",
"Args": null,
"Aliases": null,
"Examples": null
},
"Markdownify": { "Markdownify": {
"Description": "Markdownify renders a given input from Markdown to HTML.", "Description": "Markdownify renders a given input from Markdown to HTML.",
"Args": [ "Args": [

3
go.mod
View file

@ -2,5 +2,4 @@ module github.com/gohugoio/hugoDocs
go 1.16 go 1.16
require github.com/gohugoio/gohugoioTheme v0.0.0-20211211134334-0fe25799bb58 // indirect require github.com/gohugoio/gohugoioTheme v0.0.0-20220228085601-7cfbda06d135 // indirect

2
go.sum
View file

@ -31,3 +31,5 @@ github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7 h1:uRCgPsla
github.com/gohugoio/gohugoioTheme v0.0.0-20210409071416-c88da48134b7/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= 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 h1:lAgdWrn8VEg0PrNCPX4DflCg2msDKpSYV6E8RTNV3N0=
github.com/gohugoio/gohugoioTheme v0.0.0-20211211125852-b85e21c1f3d6/go.mod h1:kpw3SS48xZvLQGEXKu8u5XHgXkPvL8DX3oGa07+z8Bs= 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=

View file

@ -0,0 +1,4 @@
<div class="mermaid">
{{- .Inner | safeHTML }}
</div>
{{ .Page.Store.Set "hasMermaid" true }}

View file

@ -0,0 +1,6 @@
{{ 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 }}

View file

@ -7,8 +7,10 @@
{{ .Scratch.Set "image" ($original.Resize $options) }} {{ .Scratch.Set "image" ($original.Resize $options) }}
{{ else if eq $command "Fill"}} {{ else if eq $command "Fill"}}
{{ .Scratch.Set "image" ($original.Fill $options) }} {{ .Scratch.Set "image" ($original.Fill $options) }}
{{ else if eq $command "Crop"}}
{{ .Scratch.Set "image" ($original.Crop $options) }}
{{ else }} {{ else }}
{{ errorf "Invalid image processing command: Must be one of Fit, Fill or Resize."}} {{ errorf "Invalid image processing command: Must be one of Crop, Fit, Fill or Resize."}}
{{ end }} {{ end }}
{{ $image := .Scratch.Get "image" }} {{ $image := .Scratch.Get "image" }}
<figure style="padding: 0.25rem; margin: 2rem 0; background-color: #cccc"> <figure style="padding: 0.25rem; margin: 2rem 0; background-color: #cccc">

View file

@ -4,5 +4,5 @@
{{ end }} {{ end }}
{{ $version = $version | strings.TrimPrefix "v" }} {{ $version = $version | strings.TrimPrefix "v" }}
<button class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 ml2 px-4 border border-gray-400 rounded shadow"> <button class="bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 mr2 ml2 px-4 border border-gray-400 rounded shadow">
<a href="{{ printf "https://gohugo.io/news/%s-relnotes/" $version }}" target="_blank">New in v{{$version}}</a> <a href="{{ printf "https://github.com/gohugoio/hugo/releases/tag/v%s" $version }}" target="_blank">New in v{{$version}}</a>
</button> </button>

View file

@ -3,7 +3,7 @@ publish = "public"
command = "hugo --gc --minify" command = "hugo --gc --minify"
[context.production.environment] [context.production.environment]
HUGO_VERSION = "0.92.2" HUGO_VERSION = "0.93.3"
HUGO_ENV = "production" HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true" HUGO_ENABLEGITINFO = "true"
@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --gc --minify --enableGitInfo" command = "hugo --gc --minify --enableGitInfo"
[context.split1.environment] [context.split1.environment]
HUGO_VERSION = "0.92.2" HUGO_VERSION = "0.93.3"
HUGO_ENV = "production" HUGO_ENV = "production"
[context.deploy-preview] [context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL" command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment] [context.deploy-preview.environment]
HUGO_VERSION = "0.92.2" HUGO_VERSION = "0.93.3"
[context.branch-deploy] [context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment] [context.branch-deploy.environment]
HUGO_VERSION = "0.92.2" HUGO_VERSION = "0.93.3"
[context.next.environment] [context.next.environment]
HUGO_ENABLEGITINFO = "true" HUGO_ENABLEGITINFO = "true"

View file

@ -0,0 +1,104 @@
<svg class='diagram' xmlns='http://www.w3.org/2000/svg' version='1.1' height='153' width='712'>
<defs>
<style>
svg {
color: black;
}
@media (prefers-color-scheme:dark) {
svg {
color: white;
}
}
</style>
</defs>
<g transform='translate(8,16)'>
<path d='M 472,16 L 496,16' fill='none' stroke='currentColor'></path>
<path d='M 608,16 L 616,16' fill='none' stroke='currentColor'></path>
<path d='M 440,32 L 472,32' fill='none' stroke='currentColor'></path>
<path d='M 584,32 L 592,32' fill='none' stroke='currentColor'></path>
<path d='M 176,48 L 208,48' fill='none' stroke='currentColor'></path>
<path d='M 208,48 L 240,48' fill='none' stroke='currentColor'></path>
<path d='M 328,48 L 344,48' fill='none' stroke='currentColor'></path>
<path d='M 344,48 L 360,48' fill='none' stroke='currentColor'></path>
<path d='M 472,48 L 496,48' fill='none' stroke='currentColor'></path>
<path d='M 608,48 L 616,48' fill='none' stroke='currentColor'></path>
<path d='M 416,64 L 440,64' fill='none' stroke='currentColor'></path>
<path d='M 544,64 L 568,64' fill='none' stroke='currentColor'></path>
<path d='M 160,80 L 176,80' fill='none' stroke='currentColor'></path>
<path d='M 176,80 L 192,80' fill='none' stroke='currentColor'></path>
<path d='M 224,80 L 240,80' fill='none' stroke='currentColor'></path>
<path d='M 240,80 L 256,80' fill='none' stroke='currentColor'></path>
<path d='M 472,80 L 496,80' fill='none' stroke='currentColor'></path>
<path d='M 608,80 L 616,80' fill='none' stroke='currentColor'></path>
<path d='M 440,96 L 472,96' fill='none' stroke='currentColor'></path>
<path d='M 584,96 L 592,96' fill='none' stroke='currentColor'></path>
<path d='M 472,112 L 496,112' fill='none' stroke='currentColor'></path>
<path d='M 608,112 L 616,112' fill='none' stroke='currentColor'></path>
<path d='M 160,80 L 160,96' fill='none' stroke='currentColor'></path>
<path d='M 176,48 L 176,80' fill='none' stroke='currentColor'></path>
<path d='M 192,80 L 192,96' fill='none' stroke='currentColor'></path>
<path d='M 208,16 L 208,48' fill='none' stroke='currentColor'></path>
<path d='M 224,80 L 224,96' fill='none' stroke='currentColor'></path>
<path d='M 240,48 L 240,80' fill='none' stroke='currentColor'></path>
<path d='M 256,80 L 256,96' fill='none' stroke='currentColor'></path>
<path d='M 312,64 L 312,80' fill='none' stroke='currentColor'></path>
<path d='M 344,16 L 344,48' fill='none' stroke='currentColor'></path>
<path d='M 376,64 L 376,80' fill='none' stroke='currentColor'></path>
<path d='M 440,32 L 440,64' fill='none' stroke='currentColor'></path>
<path d='M 440,64 L 440,96' fill='none' stroke='currentColor'></path>
<path d='M 472,16 L 472,32' fill='none' stroke='currentColor'></path>
<path d='M 472,32 L 472,48' fill='none' stroke='currentColor'></path>
<path d='M 472,80 L 472,96' fill='none' stroke='currentColor'></path>
<path d='M 472,96 L 472,112' fill='none' stroke='currentColor'></path>
<path d='M 568,48 L 568,64' fill='none' stroke='currentColor'></path>
<path d='M 568,64 L 568,80' fill='none' stroke='currentColor'></path>
<path d='M 40,96 L 56,64' fill='none' stroke='currentColor'></path>
<path d='M 56,64 L 80,16' fill='none' stroke='currentColor'></path>
<path d='M 88,96 L 104,64' fill='none' stroke='currentColor'></path>
<path d='M 656,64 L 672,32' fill='none' stroke='currentColor'></path>
<path d='M 672,32 L 680,16' fill='none' stroke='currentColor'></path>
<path d='M 672,96 L 680,80' fill='none' stroke='currentColor'></path>
<path d='M 56,64 L 72,96' fill='none' stroke='currentColor'></path>
<path d='M 80,16 L 104,64' fill='none' stroke='currentColor'></path>
<path d='M 104,64 L 120,96' fill='none' stroke='currentColor'></path>
<path d='M 656,64 L 672,96' fill='none' stroke='currentColor'></path>
<path d='M 672,96 L 680,112' fill='none' stroke='currentColor'></path>
<path d='M 672,32 L 680,48' fill='none' stroke='currentColor'></path>
<path d='M 608,16 A 16,16 0 0,0 592,32' fill='none' stroke='currentColor'></path>
<path d='M 584,32 A 16,16 0 0,0 568,48' fill='none' stroke='currentColor'></path>
<path d='M 328,48 A 16,16 0 0,0 312,64' fill='none' stroke='currentColor'></path>
<path d='M 360,48 A 16,16 0 0,1 376,64' fill='none' stroke='currentColor'></path>
<path d='M 592,32 A 16,16 0 0,0 608,48' fill='none' stroke='currentColor'></path>
<path d='M 312,80 A 16,16 0 0,0 296,96' fill='none' stroke='currentColor'></path>
<path d='M 312,80 A 16,16 0 0,1 328,96' fill='none' stroke='currentColor'></path>
<path d='M 376,80 A 16,16 0 0,0 360,96' fill='none' stroke='currentColor'></path>
<path d='M 376,80 A 16,16 0 0,1 392,96' fill='none' stroke='currentColor'></path>
<path d='M 608,80 A 16,16 0 0,0 592,96' fill='none' stroke='currentColor'></path>
<path d='M 568,80 A 16,16 0 0,0 584,96' fill='none' stroke='currentColor'></path>
<path d='M 592,96 A 16,16 0 0,0 608,112' fill='none' stroke='currentColor'></path>
<text text-anchor='middle' x='40' y='116' fill='currentColor' style='font-size:1em'>1</text>
<text text-anchor='middle' x='72' y='116' fill='currentColor' style='font-size:1em'>2</text>
<text text-anchor='middle' x='88' y='116' fill='currentColor' style='font-size:1em'>3</text>
<text text-anchor='middle' x='120' y='116' fill='currentColor' style='font-size:1em'>4</text>
<text text-anchor='middle' x='160' y='116' fill='currentColor' style='font-size:1em'>1</text>
<text text-anchor='middle' x='192' y='116' fill='currentColor' style='font-size:1em'>2</text>
<text text-anchor='middle' x='224' y='116' fill='currentColor' style='font-size:1em'>3</text>
<text text-anchor='middle' x='256' y='116' fill='currentColor' style='font-size:1em'>4</text>
<text text-anchor='middle' x='296' y='116' fill='currentColor' style='font-size:1em'>1</text>
<text text-anchor='middle' x='328' y='116' fill='currentColor' style='font-size:1em'>2</text>
<text text-anchor='middle' x='360' y='116' fill='currentColor' style='font-size:1em'>3</text>
<text text-anchor='middle' x='392' y='116' fill='currentColor' style='font-size:1em'>4</text>
<text text-anchor='middle' x='512' y='20' fill='currentColor' style='font-size:1em'>1</text>
<text text-anchor='middle' x='512' y='52' fill='currentColor' style='font-size:1em'>2</text>
<text text-anchor='middle' x='512' y='84' fill='currentColor' style='font-size:1em'>3</text>
<text text-anchor='middle' x='512' y='116' fill='currentColor' style='font-size:1em'>4</text>
<text text-anchor='middle' x='632' y='20' fill='currentColor' style='font-size:1em'>1</text>
<text text-anchor='middle' x='632' y='52' fill='currentColor' style='font-size:1em'>2</text>
<text text-anchor='middle' x='632' y='84' fill='currentColor' style='font-size:1em'>3</text>
<text text-anchor='middle' x='632' y='116' fill='currentColor' style='font-size:1em'>4</text>
<text text-anchor='middle' x='696' y='20' fill='currentColor' style='font-size:1em'>1</text>
<text text-anchor='middle' x='696' y='52' fill='currentColor' style='font-size:1em'>2</text>
<text text-anchor='middle' x='696' y='84' fill='currentColor' style='font-size:1em'>3</text>
<text text-anchor='middle' x='696' y='116' fill='currentColor' style='font-size:1em'>4</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7 KiB