mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 08:18:30 +00:00
Markdown linting fixes (#1846)
This commit is contained in:
1 parent
527ec59416
commit
b6cb5ae483
63 files changed
+138
-183
No files matched your search
@@ -82,6 +82,7 @@
|
|||||||
"eparis",
|
"eparis",
|
||||||
"errorf",
|
"errorf",
|
||||||
"erroridf",
|
"erroridf",
|
||||||
|
"esbuild",
|
||||||
"Evernote",
|
"Evernote",
|
||||||
"Exif",
|
"Exif",
|
||||||
"exitwp",
|
"exitwp",
|
||||||
@@ -231,6 +232,7 @@
|
|||||||
"Poupin",
|
"Poupin",
|
||||||
"prerender",
|
"prerender",
|
||||||
"println",
|
"println",
|
||||||
|
"Pritchard",
|
||||||
"publishdate",
|
"publishdate",
|
||||||
"Pygments",
|
"Pygments",
|
||||||
"qref",
|
"qref",
|
||||||
@@ -259,6 +261,7 @@
|
|||||||
"safejs",
|
"safejs",
|
||||||
"Samsa",
|
"Samsa",
|
||||||
"schemaorg",
|
"schemaorg",
|
||||||
|
"setx",
|
||||||
"Shekhar",
|
"Shekhar",
|
||||||
"Shortcode",
|
"Shortcode",
|
||||||
"Shortcodes",
|
"Shortcodes",
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ jobs:
|
|||||||
VALIDATE_HTML: false
|
VALIDATE_HTML: false
|
||||||
VALIDATE_JAVASCRIPT_STANDARD: false
|
VALIDATE_JAVASCRIPT_STANDARD: false
|
||||||
VALIDATE_JSCPD: false
|
VALIDATE_JSCPD: false
|
||||||
VALIDATE_MARKDOWN: false
|
|
||||||
VALIDATE_NATURAL_LANGUAGE: false
|
VALIDATE_NATURAL_LANGUAGE: false
|
||||||
VALIDATE_SHELL_SHFMT: false
|
VALIDATE_SHELL_SHFMT: false
|
||||||
VALIDATE_XML: false
|
VALIDATE_XML: false
|
||||||
+25
-2
@@ -1,4 +1,27 @@
|
|||||||
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
|
# https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md
|
||||||
|
|
||||||
MD013: false # Line length
|
MD002: false
|
||||||
MD033: false # Inline HTML
|
MD003: false
|
||||||
|
MD004: false
|
||||||
|
MD007: false
|
||||||
|
MD012:
|
||||||
|
maximum: 2
|
||||||
|
MD013: false
|
||||||
|
MD014: false
|
||||||
|
MD022: false
|
||||||
|
MD024: false
|
||||||
|
MD026: false
|
||||||
|
MD031: false
|
||||||
|
MD032: false
|
||||||
|
MD033: false
|
||||||
|
MD034: false
|
||||||
|
MD036: false
|
||||||
|
MD037: false
|
||||||
|
MD038: false
|
||||||
|
MD040: false
|
||||||
|
MD041: false
|
||||||
|
MD046: false
|
||||||
|
MD049: false
|
||||||
|
MD050: false
|
||||||
|
MD051: false
|
||||||
|
MD053: false
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
**/commands/**
|
||||||
|
**/news/**
|
||||||
|
**/showcase/**
|
||||||
|
**/zh/**
|
||||||
|
**/license.md
|
||||||
@@ -34,7 +34,6 @@ This has many benefits. The most noticeable is performance. HTTP servers are *ve
|
|||||||
* ["Top 10 Static Website Generators", Netlify blog][]
|
* ["Top 10 Static Website Generators", Netlify blog][]
|
||||||
* ["The Resurgence of Static", dotCMS][dotcms]
|
* ["The Resurgence of Static", dotCMS][dotcms]
|
||||||
|
|
||||||
|
|
||||||
["An Introduction to Static Site Generators", David Walsh]: https://davidwalsh.name/introduction-static-site-generators
|
["An Introduction to Static Site Generators", David Walsh]: https://davidwalsh.name/introduction-static-site-generators
|
||||||
["Static Site Generators", O'Reilly]: https://github.com/gohugoio/hugoDocs/files/1242701/static-site-generators.pdf
|
["Static Site Generators", O'Reilly]: https://github.com/gohugoio/hugoDocs/files/1242701/static-site-generators.pdf
|
||||||
["Top 10 Static Website Generators", Netlify blog]: https://www.netlify.com/blog/2016/05/02/top-ten-static-website-generators/
|
["Top 10 Static Website Generators", Netlify blog]: https://www.netlify.com/blog/2016/05/02/top-ten-static-website-generators/
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ toc: true
|
|||||||
* Support for [Go][] HTML templates
|
* Support for [Go][] HTML templates
|
||||||
* [Syntax highlighting][] powered by [Chroma][]
|
* [Syntax highlighting][] powered by [Chroma][]
|
||||||
|
|
||||||
|
|
||||||
[aliases]: /content-management/urls/#aliases
|
[aliases]: /content-management/urls/#aliases
|
||||||
[Chroma]: https://github.com/alecthomas/chroma
|
[Chroma]: https://github.com/alecthomas/chroma
|
||||||
[content summaries]: /content-management/summaries/
|
[content summaries]: /content-management/summaries/
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ aliases: [/privacy/,/gdpr/]
|
|||||||
toc: true
|
toc: true
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
General Data Protection Regulation ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation)) is a regulation in EU law on data protection and privacy for all individuals within the European Union and the European Economic Area. It became enforceable on 25 May 2018.
|
General Data Protection Regulation ([GDPR](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation)) is a regulation in EU law on data protection and privacy for all individuals within the European Union and the European Economic Area. It became enforceable on 25 May 2018.
|
||||||
|
|
||||||
**Hugo is a static site generator. By using Hugo you are already standing on very solid ground. Static HTML files on disk are much easier to reason about compared to server and database driven web sites.**
|
**Hugo is a static site generator. By using Hugo you are already standing on very solid ground. Static HTML files on disk are much easier to reason about compared to server and database driven web sites.**
|
||||||
@@ -95,6 +94,7 @@ useSessionStorage
|
|||||||
{{% warning %}}
|
{{% warning %}}
|
||||||
`useSessionStorage` is not supported when using Google Analytics v4 (gtag.js).
|
`useSessionStorage` is not supported when using Google Analytics v4 (gtag.js).
|
||||||
{{% /warning %}}
|
{{% /warning %}}
|
||||||
|
|
||||||
### Instagram
|
### Instagram
|
||||||
|
|
||||||
simple
|
simple
|
||||||
@@ -116,7 +116,6 @@ enableDNT
|
|||||||
simple
|
simple
|
||||||
: If simple mode is enabled, a static and no-JS version of a tweet will be built.
|
: If simple mode is enabled, a static and no-JS version of a tweet will be built.
|
||||||
|
|
||||||
|
|
||||||
**Note:** If you use the _simple mode_ for Twitter, you may want to disable the inline styles provided by Hugo:
|
**Note:** If you use the _simple mode_ for Twitter, you may want to disable the inline styles provided by Hugo:
|
||||||
|
|
||||||
{{< code-toggle file="config">}}
|
{{< code-toggle file="config">}}
|
||||||
@@ -137,4 +136,3 @@ enableDNT
|
|||||||
|
|
||||||
simple
|
simple
|
||||||
: If simple mode is enabled, the video thumbnail is fetched from Vimeo's servers and it is overlayed with a play button. If the user clicks to play the video, it will open in a new tab directly on Vimeo's website.
|
: If simple mode is enabled, the video thumbnail is fetched from Vimeo's servers and it is overlayed with a play button. If the user clicks to play the video, it will open in a new tab directly on Vimeo's website.
|
||||||
|
|
||||||
@@ -28,7 +28,6 @@ But when developing and building your site, the runtime is the `hugo` executable
|
|||||||
* User-defined components have read-only access to the filesystem.
|
* User-defined components have read-only access to the filesystem.
|
||||||
* We shell out to some external binaries to support [Asciidoctor](/content-management/formats/#list-of-content-formats) and similar, but those binaries and their flags are predefined and disabled by default (see [Security Policy](#security-policy)). General functions to run arbitrary external OS commands have been [discussed](https://github.com/gohugoio/hugo/issues/796), but not implemented because of security concerns.
|
* We shell out to some external binaries to support [Asciidoctor](/content-management/formats/#list-of-content-formats) and similar, but those binaries and their flags are predefined and disabled by default (see [Security Policy](#security-policy)). General functions to run arbitrary external OS commands have been [discussed](https://github.com/gohugoio/hugo/issues/796), but not implemented because of security concerns.
|
||||||
|
|
||||||
|
|
||||||
## Security Policy
|
## Security Policy
|
||||||
|
|
||||||
{{< new-in "0.91.0" >}}
|
{{< new-in "0.91.0" >}}
|
||||||
@@ -57,7 +56,7 @@ These are the security threats as defined by [OWASP](https://en.wikipedia.org/wi
|
|||||||
|
|
||||||
For HTML output, this is the core security model:
|
For HTML output, this is the core security model:
|
||||||
|
|
||||||
https://golang.org/pkg/html/template/#hdr-Security_Model
|
<https://golang.org/pkg/html/template/#hdr-Security_Model>
|
||||||
|
|
||||||
In short:
|
In short:
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ menu:
|
|||||||
weight: 70
|
weight: 70
|
||||||
quicklinks:
|
quicklinks:
|
||||||
weight: 70 #rem
|
weight: 70 #rem
|
||||||
draft: false
|
|
||||||
aliases: [/content/archetypes/]
|
aliases: [/content/archetypes/]
|
||||||
toc: true
|
toc: true
|
||||||
---
|
---
|
||||||
@@ -69,7 +68,6 @@ It will create a new newsletter type of content file based on the archetype temp
|
|||||||
|
|
||||||
The above _newsletter type archetype_ illustrates the possibilities: The full Hugo `.Site` and all of Hugo's template funcs can be used in the archetype file.
|
The above _newsletter type archetype_ illustrates the possibilities: The full Hugo `.Site` and all of Hugo's template funcs can be used in the archetype file.
|
||||||
|
|
||||||
|
|
||||||
## Directory based archetypes
|
## Directory based archetypes
|
||||||
|
|
||||||
Since Hugo `0.49` you can use complete directories as archetype templates. Given this archetype directory:
|
Since Hugo `0.49` you can use complete directories as archetype templates. Given this archetype directory:
|
||||||
@@ -90,8 +88,6 @@ hugo new --kind post-bundle posts/my-post
|
|||||||
|
|
||||||
Will create a new folder in `/content/posts/my-post` with the same set of files as in the `post-bundle` archetypes folder. All content files (`index.md` etc.) can contain template logic, and will receive the correct `.Site` for the content's language.
|
Will create a new folder in `/content/posts/my-post` with the same set of files as in the `post-bundle` archetypes folder. All content files (`index.md` etc.) can contain template logic, and will receive the correct `.Site` for the content's language.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[archetypes directory]: /getting-started/directory-structure/
|
[archetypes directory]: /getting-started/directory-structure/
|
||||||
[content types]: /content-management/types/
|
[content types]: /content-management/types/
|
||||||
[front matter]: /content-management/front-matter/
|
[front matter]: /content-management/front-matter/
|
||||||
@@ -26,6 +26,7 @@ _build:
|
|||||||
{{< /code-toggle >}}
|
{{< /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.
|
||||||
|
|
||||||
{{< new-in "0.76.0" >}} We extended this property from a boolean to an enum in Hugo 0.76.0. Valid values are:
|
{{< new-in "0.76.0" >}} We extended this property from a boolean to an enum in Hugo 0.76.0. Valid values are:
|
||||||
@@ -70,6 +71,7 @@ Any page, regardless of their build options, will always be available using the
|
|||||||
### Illustrative use cases
|
### Illustrative use cases
|
||||||
|
|
||||||
#### Not publishing a page
|
#### Not publishing a page
|
||||||
|
|
||||||
Project needs a "Who We Are" content file for Front Matter and body to be used by the homepage but nowhere else.
|
Project needs a "Who We Are" content file for Front Matter and body to be used by the homepage but nowhere else.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@@ -45,14 +45,9 @@ Will be rendered as:
|
|||||||
1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4
|
1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Mermaid Diagrams
|
## 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`:
|
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
|
```go-html-template
|
||||||
<div class="mermaid">
|
<div class="mermaid">
|
||||||
@@ -88,8 +83,6 @@ sequenceDiagram
|
|||||||
Bob-->>John: Jolly good!
|
Bob-->>John: Jolly good!
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Goat Ascii Diagram Examples
|
## Goat Ascii Diagram Examples
|
||||||
|
|
||||||
### Graphics
|
### Graphics
|
||||||
@@ -160,7 +153,7 @@ sequenceDiagram
|
|||||||
|
|
||||||
### File tree
|
### File tree
|
||||||
|
|
||||||
Created from https://arthursonzogni.com/Diagon/#Tree
|
Created from <https://arthursonzogni.com/Diagon/#Tree>
|
||||||
|
|
||||||
```goat { width=300 color="orange" }
|
```goat { width=300 color="orange" }
|
||||||
───Linux─┬─Android
|
───Linux─┬─Android
|
||||||
@@ -176,7 +169,7 @@ Created from https://arthursonzogni.com/Diagon/#Tree
|
|||||||
|
|
||||||
### Sequence Diagram
|
### Sequence Diagram
|
||||||
|
|
||||||
https://arthursonzogni.com/Diagon/#Sequence
|
<https://arthursonzogni.com/Diagon/#Sequence>
|
||||||
|
|
||||||
```goat { class="w-40" }
|
```goat { class="w-40" }
|
||||||
┌─────┐ ┌───┐
|
┌─────┐ ┌───┐
|
||||||
@@ -197,7 +190,7 @@ https://arthursonzogni.com/Diagon/#Sequence
|
|||||||
|
|
||||||
### Flowchart
|
### Flowchart
|
||||||
|
|
||||||
https://arthursonzogni.com/Diagon/#Flowchart
|
<https://arthursonzogni.com/Diagon/#Flowchart>
|
||||||
|
|
||||||
```goat
|
```goat
|
||||||
_________________
|
_________________
|
||||||
@@ -243,7 +236,7 @@ https://arthursonzogni.com/Diagon/#Flowchart
|
|||||||
|
|
||||||
### Table
|
### Table
|
||||||
|
|
||||||
https://arthursonzogni.com/Diagon/#Table
|
<https://arthursonzogni.com/Diagon/#Table>
|
||||||
|
|
||||||
```goat { class="w-80 dark-blue" }
|
```goat { class="w-80 dark-blue" }
|
||||||
┌────────────────────────────────────────────────┐
|
┌────────────────────────────────────────────────┐
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ weight
|
|||||||
: used for [ordering your content in lists][ordering]. Lower weight gets higher precedence. So content with lower weight will come first. If set, weights should be non-zero, as 0 is interpreted as an *unset* weight.
|
: used for [ordering your content in lists][ordering]. Lower weight gets higher precedence. So content with lower weight will come first. If set, weights should be non-zero, as 0 is interpreted as an *unset* weight.
|
||||||
|
|
||||||
\<taxonomies\>
|
\<taxonomies\>
|
||||||
: field name of the *plural* form of the index. See `tags` and `categories` in the above front matter examples. _Note that the plural form of user-defined taxonomies cannot be the same as any of the predefined front matter variables._
|
: field name of the *plural* form of the index. See `tags` and `categories` in the above front matter examples. *Note that the plural form of user-defined taxonomies cannot be the same as any of the predefined front matter variables.*
|
||||||
|
|
||||||
{{% note "Hugo's Default URL Destinations" %}}
|
{{% note "Hugo's Default URL Destinations" %}}
|
||||||
If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site `config` file](/content-management/urls/#permalinks), Hugo will use the filename of your content to create the output URL. See [Content Organization](/content-management/organization) for an explanation of paths in Hugo and [URL Management](/content-management/urls/) for ways to customize Hugo's default behaviors.
|
If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site `config` file](/content-management/urls/#permalinks), Hugo will use the filename of your content to create the output URL. See [Content Organization](/content-management/organization) for an explanation of paths in Hugo and [URL Management](/content-management/urls/) for ways to customize Hugo's default behaviors.
|
||||||
@@ -209,8 +209,6 @@ With the above example the Blog section page and its descendants will return `im
|
|||||||
- Said descendant has its own `banner` value set
|
- Said descendant has its own `banner` value set
|
||||||
- Or a closer ancestor node has its own `cascade.banner` value set.
|
- Or a closer ancestor node has its own `cascade.banner` value set.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Order Content Through Front Matter
|
## Order Content Through Front Matter
|
||||||
|
|
||||||
You can assign content-specific `weight` in the front matter of your content. These values are especially useful for [ordering][ordering] in list views. You can use `weight` for ordering of content and the convention of [`<TAXONOMY>_weight`][taxweight] for ordering content within a taxonomy. See [Ordering and Grouping Hugo Lists][lists] to see how `weight` can be used to organize your content in list views.
|
You can assign content-specific `weight` in the front matter of your content. These values are especially useful for [ordering][ordering] in list views. You can use `weight` for ordering of content and the convention of [`<TAXONOMY>_weight`][taxweight] for ordering content within a taxonomy. See [Ordering and Grouping Hugo Lists][lists] to see how `weight` can be used to organize your content in list views.
|
||||||
@@ -221,9 +219,9 @@ It's possible to set some options for Markdown rendering in a content's front ma
|
|||||||
|
|
||||||
## Front Matter Format Specs
|
## Front Matter Format Specs
|
||||||
|
|
||||||
* [TOML Spec][toml]
|
- [TOML Spec][toml]
|
||||||
* [YAML Spec][yaml]
|
- [YAML Spec][yaml]
|
||||||
* [JSON Spec][json]
|
- [JSON Spec][json]
|
||||||
|
|
||||||
[variables]: /variables/
|
[variables]: /variables/
|
||||||
[aliases]: /content-management/urls/#aliases
|
[aliases]: /content-management/urls/#aliases
|
||||||
|
|||||||
@@ -507,6 +507,7 @@ The rendering of the main navigation works as usual. `.Site.Menus` will just con
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Dynamically localizing menus with i18n
|
### Dynamically localizing menus with i18n
|
||||||
|
|
||||||
While customizing menus per language is useful, your config file can become hard to maintain if you have a lot of languages
|
While customizing menus per language is useful, your config file can become hard to maintain if you have a lot of languages
|
||||||
|
|
||||||
If your menus are the same in all languages (ie. if the only thing that changes is the translated name) you can use the `.Identifier` as a translation key for the menu name:
|
If your menus are the same in all languages (ie. if the only thing that changes is the translated name) you can use the `.Identifier` as a translation key for the menu name:
|
||||||
@@ -569,10 +570,9 @@ If there is more than one language defined, the `LanguagePrefix` variable will e
|
|||||||
|
|
||||||
|
|
||||||
## Generate multilingual content with `hugo new`
|
## Generate multilingual content with `hugo new`
|
||||||
|
|
||||||
Currently, `hugo new` is not ready to support generating multilingual content. But there is a [proposal topic](https://github.com/gohugoio/hugo/issues/7732) about this in GitHub issue to discuss how it should work.
|
Currently, `hugo new` is not ready to support generating multilingual content. But there is a [proposal topic](https://github.com/gohugoio/hugo/issues/7732) about this in GitHub issue to discuss how it should work.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[abslangurl]: /functions/abslangurl
|
[abslangurl]: /functions/abslangurl
|
||||||
[config]: /getting-started/configuration/
|
[config]: /getting-started/configuration/
|
||||||
[contenttemplate]: /templates/single-page-templates/
|
[contenttemplate]: /templates/single-page-templates/
|
||||||
|
|||||||
@@ -99,8 +99,8 @@ as long as it is not inside another **leaf** bundle.
|
|||||||
A headless bundle is a bundle that is configured to not get published
|
A headless bundle is a bundle that is configured to not get published
|
||||||
anywhere:
|
anywhere:
|
||||||
|
|
||||||
- It will have no `Permalink` and no rendered HTML in `public/`.
|
- It will have no `Permalink` and no rendered HTML in `public/`.
|
||||||
- It will not be part of `.Site.RegularPages`, etc.
|
- It will not be part of `.Site.RegularPages`, etc.
|
||||||
|
|
||||||
But you can get it by `.Site.GetPage`. Here is an example:
|
But you can get it by `.Site.GetPage`. Here is an example:
|
||||||
|
|
||||||
@@ -121,9 +121,9 @@ _In this example, we are assuming the `some-headless-bundle` to be a headless
|
|||||||
Explanation of the above example:
|
Explanation of the above example:
|
||||||
|
|
||||||
1. Get the `some-headless-bundle` Page "object".
|
1. Get the `some-headless-bundle` Page "object".
|
||||||
2. Collect a *slice* of resources in this *Page Bundle* that matches
|
2. Collect a _slice_ of resources in this _Page Bundle_ that matches
|
||||||
`"author*"` using `.Resources.Match`.
|
`"author*"` using `.Resources.Match`.
|
||||||
3. Loop through that *slice* of nested pages, and output their `.Title` and
|
3. Loop through that _slice_ of nested pages, and output their `.Title` and
|
||||||
`.Content`.
|
`.Content`.
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -137,9 +137,8 @@ headless = true
|
|||||||
|
|
||||||
There are many use cases of such headless page bundles:
|
There are many use cases of such headless page bundles:
|
||||||
|
|
||||||
- Shared media galleries
|
- Shared media galleries
|
||||||
- Reusable page content "snippets"
|
- Reusable page content "snippets"
|
||||||
|
|
||||||
|
|
||||||
## Branch Bundles {#branch-bundles}
|
## Branch Bundles {#branch-bundles}
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ MediaType.Suffixes
|
|||||||
: A slice of possible suffixes for the resource's MIME type.
|
: A slice of possible suffixes for the resource's MIME type.
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
ByType
|
ByType
|
||||||
: Returns the page resources of the given type.
|
: Returns the page resources of the given type.
|
||||||
|
|
||||||
@@ -107,6 +108,7 @@ GetMatch
|
|||||||
: Same as `Match` but will return the first match.
|
: Same as `Match` but will return the first match.
|
||||||
|
|
||||||
### Pattern Matching
|
### Pattern Matching
|
||||||
|
|
||||||
```go
|
```go
|
||||||
// Using Match/GetMatch to find this images/sunset.jpg ?
|
// Using Match/GetMatch to find this images/sunset.jpg ?
|
||||||
.Resources.Match "images/sun*" ✅
|
.Resources.Match "images/sun*" ✅
|
||||||
@@ -140,8 +142,7 @@ title
|
|||||||
params
|
params
|
||||||
: A map of custom key/values.
|
: A map of custom key/values.
|
||||||
|
|
||||||
|
### Resources metadata example
|
||||||
### Resources metadata example
|
|
||||||
|
|
||||||
{{< code-toggle copy="false">}}
|
{{< code-toggle copy="false">}}
|
||||||
title: Application
|
title: Application
|
||||||
|
|||||||
@@ -25,9 +25,9 @@ To list up to 5 related pages (which share the same _date_ or _keyword_ paramete
|
|||||||
{{ with $related }}
|
{{ with $related }}
|
||||||
<h3>See Also</h3>
|
<h3>See Also</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
@@ -37,6 +37,7 @@ To list up to 5 related pages (which share the same _date_ or _keyword_ paramete
|
|||||||
Here is the list of "Related" methods available on a page collection such `.RegularPages`.
|
Here is the list of "Related" methods available on a page collection such `.RegularPages`.
|
||||||
|
|
||||||
#### .Related PAGE
|
#### .Related PAGE
|
||||||
|
|
||||||
Returns a collection of pages related the given one.
|
Returns a collection of pages related the given one.
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -44,6 +45,7 @@ Returns a collection of pages related the given one.
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### .RelatedIndices PAGE INDICE1 [INDICE2 ...]
|
#### .RelatedIndices PAGE INDICE1 [INDICE2 ...]
|
||||||
|
|
||||||
Returns a collection of pages related to a given one restricted to a list of indices.
|
Returns a collection of pages related to a given one restricted to a list of indices.
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -51,6 +53,7 @@ Returns a collection of pages related to a given one restricted to a list of ind
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### .RelatedTo KEYVALS [KEYVALS2 ...]
|
#### .RelatedTo KEYVALS [KEYVALS2 ...]
|
||||||
|
|
||||||
Returns a collection of pages related together by a set of indices and their match.
|
Returns a collection of pages related together by a set of indices and their match.
|
||||||
|
|
||||||
In order to build those set and pass them as argument, one must use the `keyVals` function where the first argument would be the `indice` and the consecutive ones its potential `matches`.
|
In order to build those set and pass them as argument, one must use the `keyVals` function where the first argument would be the `indice` and the consecutive ones its potential `matches`.
|
||||||
@@ -64,6 +67,7 @@ Read [this blog article](https://regisphilibert.com/blog/2018/04/hugo-optmized-r
|
|||||||
{{% /note %}}
|
{{% /note %}}
|
||||||
|
|
||||||
## Configure Related Content
|
## Configure Related Content
|
||||||
|
|
||||||
Hugo provides a sensible default configuration of Related Content, but you can fine-tune this in your configuration, on the global or language level if needed.
|
Hugo provides a sensible default configuration of Related Content, but you can fine-tune this in your configuration, on the global or language level if needed.
|
||||||
|
|
||||||
### Default configuration
|
### Default configuration
|
||||||
|
|||||||
@@ -71,10 +71,9 @@ If you want the old behavior, you can put the following line in the start of you
|
|||||||
{{ $_hugo_config := `{ "version": 1 }` }}
|
{{ $_hugo_config := `{ "version": 1 }` }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Shortcodes Without Markdown
|
### Shortcodes Without Markdown
|
||||||
|
|
||||||
The `<` character indicates that the shortcode's inner content does *not* need further rendering. Often shortcodes without markdown include internal HTML:
|
The `<` character indicates that the shortcode's inner content does *not* need further rendering. Often shortcodes without Markdown include internal HTML:
|
||||||
|
|
||||||
```
|
```
|
||||||
{{</* myshortcode */>}}<p>Hello <strong>World!</strong></p>{{</* /myshortcode */>}}
|
{{</* myshortcode */>}}<p>Hello <strong>World!</strong></p>{{</* /myshortcode */>}}
|
||||||
@@ -86,11 +85,11 @@ You can call shortcodes within other shortcodes by creating your own templates t
|
|||||||
|
|
||||||
## Use Hugo's Built-in Shortcodes
|
## Use Hugo's Built-in Shortcodes
|
||||||
|
|
||||||
Hugo ships with a set of predefined shortcodes that represent very common usage. These shortcodes are provided for author convenience and to keep your markdown content clean.
|
Hugo ships with a set of predefined shortcodes that represent very common usage. These shortcodes are provided for author convenience and to keep your Markdown content clean.
|
||||||
|
|
||||||
### `figure`
|
### `figure`
|
||||||
|
|
||||||
`figure` is an extension of the image syntax in markdown, which does not provide a shorthand for the more semantic [HTML5 `<figure>` element][figureelement].
|
`figure` is an extension of the image syntax in Markdown, which does not provide a shorthand for the more semantic [HTML5 `<figure>` element][figureelement].
|
||||||
|
|
||||||
The `figure` shortcode can use the following named parameters:
|
The `figure` shortcode can use the following named parameters:
|
||||||
|
|
||||||
@@ -254,7 +253,6 @@ Using the preceding `instagram` with `hidecaption` example above, the following
|
|||||||
{{< instagram BWNjjyYFxVx hidecaption >}}
|
{{< instagram BWNjjyYFxVx hidecaption >}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{% note %}}
|
{{% note %}}
|
||||||
The `instagram`-shortcode refers an endpoint of Instagram's API, that's deprecated since October 24th, 2020. Thus, no images can be fetched from this API endpoint, resulting in an error when the `instagram`-shortcode is used. For more information please have a look at GitHub issue [#7879](https://github.com/gohugoio/hugo/issues/7879).
|
The `instagram`-shortcode refers an endpoint of Instagram's API, that's deprecated since October 24th, 2020. Thus, no images can be fetched from this API endpoint, resulting in an error when the `instagram`-shortcode is used. For more information please have a look at GitHub issue [#7879](https://github.com/gohugoio/hugo/issues/7879).
|
||||||
{{% /note %}}
|
{{% /note %}}
|
||||||
@@ -381,7 +379,6 @@ The `youtube` shortcode embeds a responsive video player for [YouTube videos][].
|
|||||||
https://www.youtube.com/watch?v=w7Ft2ymGmfc
|
https://www.youtube.com/watch?v=w7Ft2ymGmfc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
#### Example `youtube` Input
|
#### Example `youtube` Input
|
||||||
|
|
||||||
Copy the YouTube video ID that follows `v=` in the video's URL and pass it to the `youtube` shortcode:
|
Copy the YouTube video ID that follows `v=` in the video's URL and pass it to the `youtube` shortcode:
|
||||||
@@ -390,7 +387,7 @@ Copy the YouTube video ID that follows `v=` in the video's URL and pass it to th
|
|||||||
{{</* youtube w7Ft2ymGmfc */>}}
|
{{</* youtube w7Ft2ymGmfc */>}}
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
Furthermore, you can automatically start playback of the embedded video by setting the `autoplay` parameter to `true`. Remember that you can't mix named and unnamed parameters, so you'll need to assign the yet unnamed video id to the parameter `id`:
|
Furthermore, you can automatically start playback of the embedded video by setting the `autoplay` parameter to `true`. Remember that you can't mix named and unnamed parameters, so you'll need to assign the yet unnamed video ID to the parameter `id`:
|
||||||
|
|
||||||
|
|
||||||
{{< code file="example-youtube-input-with-autoplay.md" >}}
|
{{< code file="example-youtube-input-with-autoplay.md" >}}
|
||||||
@@ -403,7 +400,6 @@ For [accessibility reasons](https://dequeuniversity.com/tips/provide-iframe-titl
|
|||||||
{{</* youtube id="w7Ft2ymGmfc" title="A New Hugo Site in Under Two Minutes" */>}}
|
{{</* youtube id="w7Ft2ymGmfc" title="A New Hugo Site in Under Two Minutes" */>}}
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
|
|
||||||
#### Example `youtube` Output
|
#### Example `youtube` Output
|
||||||
|
|
||||||
Using the preceding `youtube` example, the following HTML will be added to your rendered website's markup:
|
Using the preceding `youtube` example, the following HTML will be added to your rendered website's markup:
|
||||||
|
|||||||
@@ -65,6 +65,5 @@ Note 2
|
|||||||
: The example above is a [multihost setup][]. In a regular setup, all
|
: The example above is a [multihost setup][]. In a regular setup, all
|
||||||
the static directories will be available to all sites.
|
the static directories will be available to all sites.
|
||||||
|
|
||||||
|
|
||||||
[site config]: /getting-started/configuration/#all-configuration-settings
|
[site config]: /getting-started/configuration/#all-configuration-settings
|
||||||
[multihost setup]: /content-management/multilingual/#configure-multilingual-multihost
|
[multihost setup]: /content-management/multilingual/#configure-multilingual-multihost
|
||||||
@@ -3,12 +3,12 @@ title: Content Types
|
|||||||
description: Hugo is built around content organized in sections.
|
description: Hugo is built around content organized in sections.
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
categories: [content management]
|
categories: [content management]
|
||||||
keywords: [lists,sections,content types,types,organization]
|
keywords: [lists, sections, content types, types, organization]
|
||||||
menu:
|
menu:
|
||||||
docs:
|
docs:
|
||||||
parent: "content-management"
|
parent: "content-management"
|
||||||
weight: 60
|
weight: 60
|
||||||
weight: 60 #rem
|
weight: 60 #rem
|
||||||
draft: false
|
draft: false
|
||||||
aliases: [/content/types]
|
aliases: [/content/types]
|
||||||
toc: true
|
toc: true
|
||||||
@@ -18,7 +18,5 @@ A **content type** is a way to organize your content. Hugo resolves the content
|
|||||||
|
|
||||||
A content type is used to
|
A content type is used to
|
||||||
|
|
||||||
* Determine how the content is rendered. See [Template Lookup Order](/templates/lookup-order/) and [Content Views](https://gohugo.io/templates/views) for more.
|
- Determine how the content is rendered. See [Template Lookup Order](/templates/lookup-order/) and [Content Views](https://gohugo.io/templates/views) for more.
|
||||||
* Determine which [archetype](/content-management/archetypes/) template to use for new content.
|
- Determine which [archetype](/content-management/archetypes/) template to use for new content.
|
||||||
|
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ aliases:
|
|||||||
---
|
---
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
Now when you visit any of the locations specified in aliases---i.e., *assuming the same site domain*---you'll be redirected to the page they are specified on. For example, a visitor to `example.com/posts/my-original-url/` will be immediately redirected to `example.com/posts/my-awesome-post/`.
|
Now when you visit any of the locations specified in aliases---i.e., _assuming the same site domain_---you'll be redirected to the page they are specified on. For example, a visitor to `example.com/posts/my-original-url/` will be immediately redirected to `example.com/posts/my-awesome-post/`.
|
||||||
|
|
||||||
### Example: Aliases in Multilingual
|
### Example: Aliases in Multilingual
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ aliases:
|
|||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
From Hugo 0.55 you can also have page-relative aliases, so ` /es/posts/my-original-post/` can be simplified to the more portable `my-original-post/`
|
From Hugo 0.55 you can also have page-relative aliases, so `/es/posts/my-original-post/` can be simplified to the more portable `my-original-post/`
|
||||||
|
|
||||||
### How Hugo Aliases Work
|
### How Hugo Aliases Work
|
||||||
|
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ Finally, check again with `git version` if Git was installed successfully.
|
|||||||
|
|
||||||
### Git Graphical Front Ends
|
### Git Graphical Front Ends
|
||||||
|
|
||||||
There are several [GUI clients](https://git-scm.com/downloads/guis) that help you to operate Git. Not all are available for all operating systems and maybe differ in their usage. Because of this we will document how to use the command line, since the commands are the same everywhere.
|
There are several [GUI clients](https://git-scm.com/downloads/guis) that help you to operate Git. Not all are available for all operating systems and maybe differ in their usage. Because of this we will document how to use the command-line, since the commands are the same everywhere.
|
||||||
|
|
||||||
### Install Hub on Your System (Optional)
|
### Install Hub on Your System (Optional)
|
||||||
|
|
||||||
@@ -150,7 +150,6 @@ cd $HOME/src/hugo
|
|||||||
go install
|
go install
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
Hugo relies on [mage](https://github.com/magefile/mage) for some convenient build and test targets. If you don't already have it, get it:
|
Hugo relies on [mage](https://github.com/magefile/mage) for some convenient build and test targets. If you don't already have it, get it:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -169,7 +168,7 @@ Open the [Hugo repository](https://github.com/gohugoio/hugo) on GitHub and click
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
Now open your fork repository on GitHub and copy the remote url of your fork. You can choose between HTTPS and SSH as protocol that Git should use for the following operations. HTTPS works always [if you're not sure](https://help.github.com/articles/which-remote-url-should-i-use/).
|
Now open your fork repository on GitHub and copy the remote URL of your fork. You can choose between HTTPS and SSH as protocol that Git should use for the following operations. HTTPS works always [if you're not sure](https://help.github.com/articles/which-remote-url-should-i-use/).
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -258,6 +257,7 @@ mage install
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Test
|
### Test
|
||||||
|
|
||||||
Sometimes changes on the codebase can cause unintended side effects. Or they don't work as expected. Most functions have their own test cases. You can find them in files ending with `_test.go`.
|
Sometimes changes on the codebase can cause unintended side effects. Or they don't work as expected. Most functions have their own test cases. You can find them in files ending with `_test.go`.
|
||||||
|
|
||||||
Make sure the commands
|
Make sure the commands
|
||||||
@@ -269,7 +269,8 @@ mage -v check
|
|||||||
passes.
|
passes.
|
||||||
|
|
||||||
### Formatting
|
### Formatting
|
||||||
The Go code styleguide maybe is opinionated but it ensures that the codebase looks the same, regardless who wrote the code. Go comes with its own formatting tool. Let's apply the styleguide to our additions:
|
|
||||||
|
The Go code style guide maybe is opinionated but it ensures that the codebase looks the same, regardless who wrote the code. Go comes with its own formatting tool. Let's apply the style guide to our additions:
|
||||||
|
|
||||||
```
|
```
|
||||||
mage fmt
|
mage fmt
|
||||||
@@ -417,7 +418,6 @@ Feel free to [open an issue][newissue] if you think you found a bug or you have
|
|||||||
* [The Git Book][gitbook] (Free)
|
* [The Git Book][gitbook] (Free)
|
||||||
* [Go Bootcamp][gobootcamp]
|
* [Go Bootcamp][gobootcamp]
|
||||||
|
|
||||||
|
|
||||||
[codecademy]: https://www.codecademy.com/learn/learn-git
|
[codecademy]: https://www.codecademy.com/learn/learn-git
|
||||||
[contributors]: https://github.com/gohugoio/hugo/graphs/contributors
|
[contributors]: https://github.com/gohugoio/hugo/graphs/contributors
|
||||||
[docscontrib]: /contribute/documentation/
|
[docscontrib]: /contribute/documentation/
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ linktitle: Documentation
|
|||||||
description: Documentation is an integral part of any open source project. The Hugo docs are as much a work in progress as the source it attempts to cover.
|
description: Documentation is an integral part of any open source project. The Hugo docs are as much a work in progress as the source it attempts to cover.
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-01
|
|
||||||
categories: [contribute]
|
categories: [contribute]
|
||||||
keywords: [docs,documentation,community, contribute]
|
keywords: [docs,documentation,community, contribute]
|
||||||
menu:
|
menu:
|
||||||
@@ -13,7 +12,6 @@ menu:
|
|||||||
weight: 20
|
weight: 20
|
||||||
weight: 20
|
weight: 20
|
||||||
sections_weight: 20
|
sections_weight: 20
|
||||||
draft: false
|
|
||||||
aliases: [/contribute/docs/]
|
aliases: [/contribute/docs/]
|
||||||
toc: true
|
toc: true
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -22,8 +22,3 @@ Example:
|
|||||||
```
|
```
|
||||||
|
|
||||||
The above is an imaginary use case for the home page where you want to display different page listings in sections/boxes on different places on the page: 5 from `news`, 5 from the `blog` and then 10 of the pages not shown in the other listings, to _complement_ them.
|
The above is an imaginary use case for the home page where you want to display different page listings in sections/boxes on different places on the page: 5 from `news`, 5 from the `blog` and then 10 of the pages not shown in the other listings, to _complement_ them.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3,7 +3,6 @@ title: dict
|
|||||||
description: Creates a dictionary from a list of key and value pairs.
|
description: Creates a dictionary from a list of key and value pairs.
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-26
|
|
||||||
categories: [functions]
|
categories: [functions]
|
||||||
menu:
|
menu:
|
||||||
docs:
|
docs:
|
||||||
@@ -25,12 +24,11 @@ Note that the `key` can be either a `string` or a `string slice`. The latter is
|
|||||||
{{ $m := dict (slice "a" "b" "c") "value" }}
|
{{ $m := dict (slice "a" "b" "c") "value" }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Example: Using `dict` to pass multiple values to a `partial`
|
## Example: Using `dict` to pass multiple values to a `partial`
|
||||||
|
|
||||||
The partial below creates a SVG and expects `fill`, `height` and `width` from the caller:
|
The partial below creates a SVG and expects `fill`, `height` and `width` from the caller:
|
||||||
|
|
||||||
**Partial definition**
|
### Partial definition
|
||||||
|
|
||||||
{{< code file="layouts/partials/svgs/external-links.svg" download="external-links.svg" >}}
|
{{< code file="layouts/partials/svgs/external-links.svg" download="external-links.svg" >}}
|
||||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
@@ -39,7 +37,7 @@ fill="{{ .fill }}" width="{{ .width }}" height="{{ .height }}" viewBox="0 0 32 3
|
|||||||
</svg>
|
</svg>
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
**Partial call**
|
### Partial call
|
||||||
|
|
||||||
The `fill`, `height` and `width` values can be stored in one object with `dict` and passed to the partial:
|
The `fill`, `height` and `width` values can be stored in one object with `dict` and passed to the partial:
|
||||||
|
|
||||||
@@ -47,6 +45,4 @@ The `fill`, `height` and `width` values can be stored in one object with `dict`
|
|||||||
{{ partial "svgs/external-links.svg" (dict "fill" "#01589B" "width" 10 "height" 20 ) }}
|
{{ partial "svgs/external-links.svg" (dict "fill" "#01589B" "width" 10 "height" 20 ) }}
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[partials]: /templates/partials/
|
[partials]: /templates/partials/
|
||||||
@@ -38,7 +38,7 @@ this purpose.
|
|||||||
{{ int ("00987" | strings.TrimLeft "0") }}
|
{{ int ("00987" | strings.TrimLeft "0") }}
|
||||||
```
|
```
|
||||||
|
|
||||||
**Explanation**
|
### Explanation
|
||||||
|
|
||||||
The `int` function eventually calls the `ParseInt` function from the Go library
|
The `int` function eventually calls the `ParseInt` function from the Go library
|
||||||
`strconv`.
|
`strconv`.
|
||||||
|
|||||||
@@ -21,8 +21,3 @@ Example:
|
|||||||
The above will print `[1 2 4]`.
|
The above will print `[1 2 4]`.
|
||||||
|
|
||||||
Also see https://en.wikipedia.org/wiki/Symmetric_difference
|
Also see https://en.wikipedia.org/wiki/Symmetric_difference
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -68,6 +68,4 @@ The preceding partial would then output to the rendered page as follows, assumin
|
|||||||
</header>
|
</header>
|
||||||
{{< /output >}}
|
{{< /output >}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[singletemplate]: /templates/single-page-templates/
|
[singletemplate]: /templates/single-page-templates/
|
||||||
@@ -163,7 +163,7 @@ section names to hard-coded values like `"posts"` or `"post"`.
|
|||||||
```
|
```
|
||||||
|
|
||||||
If the user has not set this config parameter in their site config, it
|
If the user has not set this config parameter in their site config, it
|
||||||
will default to the _section with the most pages_.
|
will default to the *section with the most pages*.
|
||||||
|
|
||||||
The user can override the default:
|
The user can override the default:
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ Note that attributes in [code fences](/content-management/syntax-highlighting/#h
|
|||||||
````
|
````
|
||||||
|
|
||||||
autoHeadingIDType ("github") {{< new-in "0.62.2" >}}
|
autoHeadingIDType ("github") {{< new-in "0.62.2" >}}
|
||||||
: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs compatible with [Blackfriday](#blackfriday), the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/anchorize/) template func.
|
: The strategy used for creating auto IDs (anchor names). Available types are `github`, `github-ascii` and `blackfriday`. `github` produces GitHub-compatible IDs, `github-ascii` will drop any non-Ascii characters after accent normalization, and `blackfriday` will make the IDs compatible with Blackfriday, the default Markdown engine before Hugo 0.60. Note that if Goldmark is your default Markdown engine, this is also the strategy used in the [anchorize](/functions/anchorize/) template func.
|
||||||
|
|
||||||
### Highlight
|
### Highlight
|
||||||
|
|
||||||
|
|||||||
@@ -136,9 +136,11 @@ The directory where Hugo finds archetype files (content templates). {{% module-m
|
|||||||
The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). {{% module-mounts-note %}}
|
The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). {{% module-mounts-note %}}
|
||||||
|
|
||||||
### baseURL
|
### baseURL
|
||||||
|
|
||||||
Hostname (and path) to the root, e.g. https://bep.is/
|
Hostname (and path) to the root, e.g. https://bep.is/
|
||||||
|
|
||||||
### build
|
### build
|
||||||
|
|
||||||
See [Configure Build](#configure-build)
|
See [Configure Build](#configure-build)
|
||||||
|
|
||||||
### buildDrafts (false)
|
### buildDrafts (false)
|
||||||
@@ -160,6 +162,7 @@ Include content already expired.
|
|||||||
Include content with publishdate in the future.
|
Include content with publishdate in the future.
|
||||||
|
|
||||||
### caches
|
### caches
|
||||||
|
|
||||||
See [Configure File Caches](#configure-file-caches)
|
See [Configure File Caches](#configure-file-caches)
|
||||||
|
|
||||||
### cascade
|
### cascade
|
||||||
@@ -340,6 +343,7 @@ Don't sync permission mode of files.
|
|||||||
Don't sync modification time of files.
|
Don't sync modification time of files.
|
||||||
|
|
||||||
### outputFormats
|
### outputFormats
|
||||||
|
|
||||||
See [Configure Output Formats](#configure-additional-output-formats).
|
See [Configure Output Formats](#configure-additional-output-formats).
|
||||||
|
|
||||||
### paginate
|
### paginate
|
||||||
@@ -355,6 +359,7 @@ Default number of elements per page in [pagination](/templates/pagination/).
|
|||||||
The path element used during pagination (`https://example.com/page/2`).
|
The path element used during pagination (`https://example.com/page/2`).
|
||||||
|
|
||||||
### permalinks
|
### permalinks
|
||||||
|
|
||||||
See [Content Management](/content-management/urls/#permalinks).
|
See [Content Management](/content-management/urls/#permalinks).
|
||||||
|
|
||||||
### pluralizeListTitles
|
### pluralizeListTitles
|
||||||
@@ -370,6 +375,7 @@ Pluralize titles in lists.
|
|||||||
The directory to where Hugo will write the final static site (the HTML files etc.).
|
The directory to where Hugo will write the final static site (the HTML files etc.).
|
||||||
|
|
||||||
### related
|
### related
|
||||||
|
|
||||||
: See [Related Content](/content-management/related/#configure-related-content).{{< new-in "0.27" >}}
|
: See [Related Content](/content-management/related/#configure-related-content).{{< new-in "0.27" >}}
|
||||||
|
|
||||||
### relativeURLs
|
### relativeURLs
|
||||||
@@ -459,6 +465,7 @@ Site title.
|
|||||||
See [Configure Title Case](#configure-title-case)
|
See [Configure Title Case](#configure-title-case)
|
||||||
|
|
||||||
### uglyURLs
|
### uglyURLs
|
||||||
|
|
||||||
When enabled, creates URL of the form `/filename.html` instead of `/filename/`.
|
When enabled, creates URL of the form `/filename.html` instead of `/filename/`.
|
||||||
|
|
||||||
### watch
|
### watch
|
||||||
@@ -769,9 +776,9 @@ dir
|
|||||||
|
|
||||||
## Configuration Format Specs
|
## Configuration Format Specs
|
||||||
|
|
||||||
* [TOML Spec][toml]
|
- [TOML Spec][toml]
|
||||||
* [YAML Spec][yaml]
|
- [YAML Spec][yaml]
|
||||||
* [JSON Spec][json]
|
- [JSON Spec][json]
|
||||||
|
|
||||||
[`.Site.Params`]: /variables/site/
|
[`.Site.Params`]: /variables/site/
|
||||||
[directory structure]: /getting-started/directory-structure
|
[directory structure]: /getting-started/directory-structure
|
||||||
|
|||||||
@@ -402,7 +402,7 @@ You'll need a place to store the Hugo executable, your [content][], and the gene
|
|||||||
|
|
||||||
Now you need to add Hugo to your Windows PATH settings:
|
Now you need to add Hugo to your Windows PATH settings:
|
||||||
|
|
||||||
#### For Windows 10 Users:
|
#### For Windows 10 Users
|
||||||
|
|
||||||
* Right click on the **Start** button.
|
* Right click on the **Start** button.
|
||||||
* Click on **System**.
|
* Click on **System**.
|
||||||
@@ -412,7 +412,7 @@ Now you need to add Hugo to your Windows PATH settings:
|
|||||||
* Click the **Browse...** button and select the directory to which `hugo.exe` was extracted, which is `C:\Hugo\bin` if you went by the instructions above. *The path entry should be the folder where Hugo lives and not the binary itself.*
|
* Click the **Browse...** button and select the directory to which `hugo.exe` was extracted, which is `C:\Hugo\bin` if you went by the instructions above. *The path entry should be the folder where Hugo lives and not the binary itself.*
|
||||||
* Click OK at every window to exit.
|
* Click OK at every window to exit.
|
||||||
|
|
||||||
#### For Windows 7 and 8.x users:
|
#### For Windows 7 and 8.x users
|
||||||
|
|
||||||
Windows 7 and 8.1 do not include the easy path editor included in Windows 10, so non-technical users on those platforms are advised to install a free third-party path editor like [Windows Environment Variables Editor].
|
Windows 7 and 8.1 do not include the easy path editor included in Windows 10, so non-technical users on those platforms are advised to install a free third-party path editor like [Windows Environment Variables Editor].
|
||||||
|
|
||||||
|
|||||||
@@ -61,4 +61,5 @@ Every deploy automatically and instantly invalidates the CDN cache, so your user
|
|||||||
Add your own domains to your site easily using 21YunBox's [custom domains](https://www.21yunbox.com/docs/#/custom-domains) guide.
|
Add your own domains to your site easily using 21YunBox's [custom domains](https://www.21yunbox.com/docs/#/custom-domains) guide.
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
Click [here](https://www.21yunbox.com/docs/#/contact) to contact with 21YunBox' experts if you need help.
|
Click [here](https://www.21yunbox.com/docs/#/contact) to contact with 21YunBox' experts if you need help.
|
||||||
@@ -37,7 +37,7 @@ AWS Amplify is a combination of client library, CLI toolchain, and a Console for
|
|||||||
1. Connect a branch from your GitHub, Bitbucket, GitLab, or AWS CodeCommit repository. Connecting your repository allows Amplify to deploy updates on every code commit to a branch.
|
1. Connect a branch from your GitHub, Bitbucket, GitLab, or AWS CodeCommit repository. Connecting your repository allows Amplify to deploy updates on every code commit to a branch.
|
||||||

|

|
||||||
|
|
||||||
1. Accept the default build settings. The Amplify Console automatically detects your Hugo build settings and output directory.
|
1. Accept the default build settings. The Amplify Console automatically detects your Hugo build settings and output directory.
|
||||||

|

|
||||||
|
|
||||||
1. Review your changes and then choose **Save and deploy**. The Amplify Console will pull code from your repository, build changes to the backend and frontend, and deploy your build artifacts at `https://master.unique-id.amplifyapp.com`. Bonus: Screenshots of your app on different devices to find layout issues.
|
1. Review your changes and then choose **Save and deploy**. The Amplify Console will pull code from your repository, build changes to the backend and frontend, and deploy your build artifacts at `https://master.unique-id.amplifyapp.com`. Bonus: Screenshots of your app on different devices to find layout issues.
|
||||||
|
|||||||
@@ -38,11 +38,13 @@ Log in to Firebase (setup on your local machine) using `firebase login`, which o
|
|||||||
```
|
```
|
||||||
firebase login
|
firebase login
|
||||||
```
|
```
|
||||||
|
|
||||||
In the root of your Hugo project, initialize the Firebase project with the `firebase init` command:
|
In the root of your Hugo project, initialize the Firebase project with the `firebase init` command:
|
||||||
|
|
||||||
```
|
```
|
||||||
firebase init
|
firebase init
|
||||||
```
|
```
|
||||||
|
|
||||||
From here:
|
From here:
|
||||||
|
|
||||||
1. Choose Hosting in the feature question
|
1. Choose Hosting in the feature question
|
||||||
@@ -63,12 +65,11 @@ hugo && firebase deploy
|
|||||||
|
|
||||||
You can generate a deploy token using
|
You can generate a deploy token using
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
firebase login:ci
|
firebase login:ci
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also set up your CI (e.g., with [Wercker][]) and add the token to a private variable like `$FIREBASE_DEPLOY_TOKEN`.
|
You can also set up your CI (e.g., with Wercker) and add the token to a private variable like `$FIREBASE_DEPLOY_TOKEN`.
|
||||||
|
|
||||||
{{% note %}}
|
{{% note %}}
|
||||||
This is a private secret and it should not appear in a public repository. Make sure you understand your chosen CI and that it's not visible to others.
|
This is a private secret and it should not appear in a public repository. Make sure you understand your chosen CI and that it's not visible to others.
|
||||||
|
|||||||
@@ -142,7 +142,6 @@ You now have a live website served over HTTPS, distributed through CDN, and conf
|
|||||||
2. [Setting up HTTPS on Custom Domains][httpscustom]
|
2. [Setting up HTTPS on Custom Domains][httpscustom]
|
||||||
3. [Redirects and Rewrite Rules][]
|
3. [Redirects and Rewrite Rules][]
|
||||||
|
|
||||||
|
|
||||||
[app.netlify.com]: https://app.netlify.com
|
[app.netlify.com]: https://app.netlify.com
|
||||||
[build command]: /getting-started/usage/#the-hugo-command
|
[build command]: /getting-started/usage/#the-hugo-command
|
||||||
[config]: /getting-started/configuration/
|
[config]: /getting-started/configuration/
|
||||||
|
|||||||
@@ -37,9 +37,9 @@ Static sites are **completely free** on Render and include the following:
|
|||||||
|
|
||||||
## Assumptions
|
## Assumptions
|
||||||
|
|
||||||
* You have an account with GitHub or GitLab.
|
- You have an account with GitHub or GitLab.
|
||||||
* You have completed the [Quick Start][] or have a Hugo website you are ready to deploy and share with the world.
|
- You have completed the [Quick Start][] or have a Hugo website you are ready to deploy and share with the world.
|
||||||
* You have a Render account. You can sign up at https://render.com/register.
|
- You have a Render account. You can sign up at https://render.com/register.
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ replacements = ""
|
|||||||
workspace = ""
|
workspace = ""
|
||||||
{{< /code-toggle >}}
|
{{< /code-toggle >}}
|
||||||
|
|
||||||
|
|
||||||
noVendor {{< new-in "0.75.0" >}}
|
noVendor {{< new-in "0.75.0" >}}
|
||||||
: A optional Glob pattern matching module paths to skip when vendoring, e.g. "github.com/**"
|
: A optional Glob pattern matching module paths to skip when vendoring, e.g. "github.com/**"
|
||||||
|
|
||||||
@@ -113,7 +112,6 @@ noVendor
|
|||||||
|
|
||||||
{{< gomodules-info >}}
|
{{< gomodules-info >}}
|
||||||
|
|
||||||
|
|
||||||
## Module Config: mounts
|
## Module Config: mounts
|
||||||
|
|
||||||
{{% note %}}
|
{{% note %}}
|
||||||
@@ -170,4 +168,3 @@ The search is case-insensitive.
|
|||||||
|
|
||||||
excludeFiles (string or slice)
|
excludeFiles (string or slice)
|
||||||
: One or more glob patterns matching files to exclude.
|
: One or more glob patterns matching files to exclude.
|
||||||
|
|
||||||
@@ -93,7 +93,6 @@ Note that since v.0.77.0 you can use modules config [`replacements`](https://goh
|
|||||||
|
|
||||||
## Print Dependency Graph
|
## Print Dependency Graph
|
||||||
|
|
||||||
|
|
||||||
Use `hugo mod graph` from the relevant module directory and it will print the dependency graph, including vendoring, module replacement or disabled status.
|
Use `hugo mod graph` from the relevant module directory and it will print the dependency graph, including vendoring, module replacement or disabled status.
|
||||||
|
|
||||||
E.g.:
|
E.g.:
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ Hugo Pipe's Babel requires the `@babel/cli` and `@babel/core` JavaScript package
|
|||||||
If you are using the Hugo Snap package, Babel and plugin(s) need to be installed locally within your Hugo site directory, e.g., `npm install @babel/cli @babel/core --save-dev` without the `-g` flag.
|
If you are using the Hugo Snap package, Babel and plugin(s) need to be installed locally within your Hugo site directory, e.g., `npm install @babel/cli @babel/core --save-dev` without the `-g` flag.
|
||||||
{{% /note %}}
|
{{% /note %}}
|
||||||
|
|
||||||
|
|
||||||
### Config
|
### Config
|
||||||
|
|
||||||
{{< new-in "v0.75.0" >}}
|
{{< new-in "v0.75.0" >}}
|
||||||
|
|||||||
@@ -31,10 +31,8 @@ Note that you can mount any directory into Hugo's virtual `assets` folder using
|
|||||||
| `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.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.|
|
| `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.
|
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`.
|
||||||
@@ -68,7 +66,6 @@ With `resources.GetRemote`, the first argument is a remote URL:
|
|||||||
|
|
||||||
By default, Hugo calculates a cache key based on the `URL` and the `options` (e.g. headers) given.
|
By default, Hugo calculates a cache key based on the `URL` and the `options` (e.g. headers) given.
|
||||||
|
|
||||||
|
|
||||||
{{< new-in "0.97.0" >}} You can override this by setting a `key` in the options map. This can be used to get more fine grained control over how often a remote resource is fetched, e.g.:
|
{{< new-in "0.97.0" >}} You can override this by setting a `key` in the options map. This can be used to get more fine grained control over how often a remote resource is fetched, e.g.:
|
||||||
|
|
||||||
|
|
||||||
@@ -156,7 +153,7 @@ The example above can therefore also be written as follows:
|
|||||||
|
|
||||||
## Caching
|
## Caching
|
||||||
|
|
||||||
Hugo Pipes invocations are cached based on the entire _pipe chain_.
|
Hugo Pipes invocations are cached based on the entire *pipe chain*.
|
||||||
|
|
||||||
An example of a pipe chain is:
|
An example of a pipe chain is:
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ title: Asset minification
|
|||||||
description: Hugo Pipes allows the minification of any CSS, JS, JSON, HTML, SVG or XML resource.
|
description: Hugo Pipes allows the minification of any CSS, JS, JSON, HTML, SVG or XML resource.
|
||||||
date: 2018-07-14
|
date: 2018-07-14
|
||||||
publishdate: 2018-07-14
|
publishdate: 2018-07-14
|
||||||
lastmod: 2018-07-14
|
|
||||||
categories: [asset management]
|
categories: [asset management]
|
||||||
keywords: []
|
keywords: []
|
||||||
menu:
|
menu:
|
||||||
@@ -15,10 +14,8 @@ sections_weight: 50
|
|||||||
draft: false
|
draft: false
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
Any resource of the aforementioned types can be minified using `resources.Minify` which takes for argument the resource object.
|
Any resource of the aforementioned types can be minified using `resources.Minify` which takes for argument the resource object.
|
||||||
|
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
{{ $css := resources.Get "css/main.css" }}
|
{{ $css := resources.Get "css/main.css" }}
|
||||||
{{ $style := $css | resources.Minify }}
|
{{ $style := $css | resources.Minify }}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ linkTitle: Resource from String
|
|||||||
description: Hugo Pipes allows the creation of a resource from a string.
|
description: Hugo Pipes allows the creation of a resource from a string.
|
||||||
date: 2018-07-14
|
date: 2018-07-14
|
||||||
publishdate: 2018-07-14
|
publishdate: 2018-07-14
|
||||||
lastmod: 2018-07-14
|
|
||||||
categories: [asset management]
|
categories: [asset management]
|
||||||
keywords: []
|
keywords: []
|
||||||
menu:
|
menu:
|
||||||
@@ -13,7 +12,6 @@ menu:
|
|||||||
weight: 90
|
weight: 90
|
||||||
weight: 90
|
weight: 90
|
||||||
sections_weight: 90
|
sections_weight: 90
|
||||||
draft: false
|
|
||||||
---
|
---
|
||||||
|
|
||||||
It is possible to create a resource directly from the template using `resources.FromString` which takes two arguments, the given string and the resource target path.
|
It is possible to create a resource directly from the template using `resources.FromString` which takes two arguments, the given string and the resource target path.
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ linkTitle: Resource from Template
|
|||||||
description: Hugo Pipes allows the creation of a resource from an asset file using Go Template.
|
description: Hugo Pipes allows the creation of a resource from an asset file using Go Template.
|
||||||
date: 2018-07-14
|
date: 2018-07-14
|
||||||
publishdate: 2018-07-14
|
publishdate: 2018-07-14
|
||||||
lastmod: 2018-07-14
|
|
||||||
categories: [asset management]
|
categories: [asset management]
|
||||||
keywords: []
|
keywords: []
|
||||||
menu:
|
menu:
|
||||||
@@ -13,7 +12,6 @@ menu:
|
|||||||
weight: 80
|
weight: 80
|
||||||
weight: 80
|
weight: 80
|
||||||
sections_weight: 80
|
sections_weight: 80
|
||||||
draft: false
|
|
||||||
---
|
---
|
||||||
|
|
||||||
In order to use Hugo Pipes function on an asset file containing Go Template magic the function `resources.ExecuteAsTemplate` must be used.
|
In order to use Hugo Pipes function on an asset file containing Go Template magic the function `resources.ExecuteAsTemplate` must be used.
|
||||||
@@ -25,13 +23,12 @@ The function takes three arguments: the resource target path, the template conte
|
|||||||
$backgroundColor: {{ .Param "backgroundColor" }};
|
$backgroundColor: {{ .Param "backgroundColor" }};
|
||||||
$textColor: {{ .Param "textColor" }};
|
$textColor: {{ .Param "textColor" }};
|
||||||
body{
|
body{
|
||||||
background-color:$backgroundColor;
|
background-color:$backgroundColor;
|
||||||
color: $textColor;
|
color: $textColor;
|
||||||
}
|
}
|
||||||
// [...]
|
// [...]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
{{ $sassTemplate := resources.Get "sass/template.scss" }}
|
{{ $sassTemplate := resources.Get "sass/template.scss" }}
|
||||||
{{ $style := $sassTemplate | resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS }}
|
{{ $style := $sassTemplate | resources.ExecuteAsTemplate "main.scss" . | resources.ToCSS }}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
date: 2021-11-17
|
date: 2021-11-17
|
||||||
title: "Hugo 0.89.4: One Bug Fix"
|
title: "Hugo 0.89.4: One Bug Fix"
|
||||||
@@ -6,14 +5,8 @@ description: "This version fixes one bug introduced in 0.89.0."
|
|||||||
categories: ["Releases"]
|
categories: ["Releases"]
|
||||||
images:
|
images:
|
||||||
- images/blog/hugo-bug-poster.png
|
- images/blog/hugo-bug-poster.png
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
This is a bug-fix release with one important fix for people using `hugo new` to create new content:
|
This is a bug-fix release with one important fix for people using `hugo new` to create new content:
|
||||||
|
|
||||||
* Fix content dir resolution when main project is a Hugo Module [2e70f61f](https://github.com/gohugoio/hugo/commit/2e70f61fb04cea08ef6598728a57637ae2cc199c) [@bep](https://github.com/bep) [#9177](https://github.com/gohugoio/hugo/issues/9177)
|
* Fix content dir resolution when main project is a Hugo Module [2e70f61f](https://github.com/gohugoio/hugo/commit/2e70f61fb04cea08ef6598728a57637ae2cc199c) [@bep](https://github.com/bep) [#9177](https://github.com/gohugoio/hugo/issues/9177)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -4,7 +4,6 @@ linktitle: Alternative Templating
|
|||||||
description: DEPRECATED - Support for Ace & Amber templating has been removed in version 0.62
|
description: DEPRECATED - Support for Ace & Amber templating has been removed in version 0.62
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-20
|
|
||||||
categories: [templates]
|
categories: [templates]
|
||||||
keywords: [amber,ace,templating languages]
|
keywords: [amber,ace,templating languages]
|
||||||
menu:
|
menu:
|
||||||
@@ -13,7 +12,6 @@ menu:
|
|||||||
weight: 170
|
weight: 170
|
||||||
weight: 170
|
weight: 170
|
||||||
sections_weight: 170
|
sections_weight: 170
|
||||||
draft: false
|
|
||||||
aliases: [/templates/ace/,/templates/amber/]
|
aliases: [/templates/ace/,/templates/amber/]
|
||||||
toc: true
|
toc: true
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ linktitle:
|
|||||||
description: The base and block constructs allow you to define the outer shell of your master templates (i.e., the chrome of the page).
|
description: The base and block constructs allow you to define the outer shell of your master templates (i.e., the chrome of the page).
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-01
|
|
||||||
categories: [templates,fundamentals]
|
categories: [templates,fundamentals]
|
||||||
keywords: [blocks,base]
|
keywords: [blocks,base]
|
||||||
menu:
|
menu:
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ To use the `readFile` function in your templates, make sure the path is relative
|
|||||||
|
|
||||||
### `readFile` Example: Add a Project File to Content
|
### `readFile` Example: Add a Project File to Content
|
||||||
|
|
||||||
As `readFile` is a function, it is only available to you in your templates and not your content. However, we can create a simple [shortcode template][sct] that calls `readFile`, passes the first argument through the function, and then allows an optional second argument to send the file through the markdown processor. The pattern for adding this shortcode to your content will be as follows:
|
As `readFile` is a function, it is only available to you in your templates and not your content. However, we can create a simple [shortcode template][sct] that calls `readFile`, passes the first argument through the function, and then allows an optional second argument to send the file through the Markdown processor. The pattern for adding this shortcode to your content will be as follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
{{</* readfile file="/path/to/local/file.txt" markdown="true" */>}}
|
{{</* readfile file="/path/to/local/file.txt" markdown="true" */>}}
|
||||||
@@ -53,8 +53,6 @@ As `readFile` is a function, it is only available to you in your templates and n
|
|||||||
If you are going to create [custom shortcodes](/templates/shortcode-templates/) with `readFile` for a theme, note that usage of the shortcode will refer to the project root and *not* your `themes` directory.
|
If you are going to create [custom shortcodes](/templates/shortcode-templates/) with `readFile` for a theme, note that usage of the shortcode will refer to the project root and *not* your `themes` directory.
|
||||||
{{% /warning %}}
|
{{% /warning %}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[called directly in the Hugo docs]: https://github.com/gohugoio/hugoDocs/blob/master/content/en/templates/files.md
|
[called directly in the Hugo docs]: https://github.com/gohugoio/hugoDocs/blob/master/content/en/templates/files.md
|
||||||
[dirindex]: https://github.com/gohugoio/hugo/blob/master/docs/layouts/shortcodes/directoryindex.html
|
[dirindex]: https://github.com/gohugoio/hugo/blob/master/docs/layouts/shortcodes/directoryindex.html
|
||||||
[osfileinfo]: https://golang.org/pkg/os/#FileInfo
|
[osfileinfo]: https://golang.org/pkg/os/#FileInfo
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ You can then render your custom Disqus partial template as follows:
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Open Graph
|
## Open Graph
|
||||||
|
|
||||||
An internal template for the [Open Graph protocol](https://ogp.me/), metadata that enables a page to become a rich object in a social graph.
|
An internal template for the [Open Graph protocol](https://ogp.me/), metadata that enables a page to become a rich object in a social graph.
|
||||||
This format is used for Facebook and some other sites.
|
This format is used for Facebook and some other sites.
|
||||||
|
|
||||||
|
|||||||
@@ -107,6 +107,7 @@ The custom variables need to be prefixed with `$`.
|
|||||||
{{ $address := "123 Main St." }}
|
{{ $address := "123 Main St." }}
|
||||||
{{ $address }}
|
{{ $address }}
|
||||||
```
|
```
|
||||||
|
|
||||||
Variables can be re-defined using the `=` operator. The example below
|
Variables can be re-defined using the `=` operator. The example below
|
||||||
prints "Var is Hugo Home" on the home page, and "Var is Hugo Page" on
|
prints "Var is Hugo Home" on the home page, and "Var is Hugo Page" on
|
||||||
all other pages:
|
all other pages:
|
||||||
@@ -159,7 +160,7 @@ within Hugo.
|
|||||||
|
|
||||||
### Partial
|
### Partial
|
||||||
|
|
||||||
The [`partial`][partials] function is used to include *partial* templates using
|
The [`partial`][partials] function is used to include _partial_ templates using
|
||||||
the syntax `{{ partial "<PATH>/<PARTIAL>.<EXTENSION>" . }}`.
|
the syntax `{{ partial "<PATH>/<PARTIAL>.<EXTENSION>" . }}`.
|
||||||
|
|
||||||
Example of including a `layouts/partials/header.html` partial:
|
Example of including a `layouts/partials/header.html` partial:
|
||||||
@@ -170,9 +171,9 @@ Example of including a `layouts/partials/header.html` partial:
|
|||||||
|
|
||||||
### Template
|
### Template
|
||||||
|
|
||||||
The `template` function was used to include *partial* templates
|
The `template` function was used to include _partial_ templates
|
||||||
in much older Hugo versions. Now it's useful only for calling
|
in much older Hugo versions. Now it's useful only for calling
|
||||||
[*internal* templates][internal templates]. The syntax is `{{ template
|
[_internal_ templates][internal templates]. The syntax is `{{ template
|
||||||
"_internal/<TEMPLATE>.<EXTENSION>" . }}`.
|
"_internal/<TEMPLATE>.<EXTENSION>" . }}`.
|
||||||
|
|
||||||
{{% note %}}
|
{{% note %}}
|
||||||
@@ -234,7 +235,7 @@ key.
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Example 5: Conditional on empty _map_, _array_, or _slice_.
|
#### Example 5: Conditional on empty _map_, _array_, or _slice_
|
||||||
|
|
||||||
If the _map_, _array_, or _slice_ passed into the range is zero-length then the else statement is evaluated.
|
If the _map_, _array_, or _slice_ passed into the range is zero-length then the else statement is evaluated.
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ The _shadow_ implies that the pages isn't represented by a menu-item themselves,
|
|||||||
|
|
||||||
In the above, the menu item is marked as active if on the current section's list page or on a page in that section.
|
In the above, the menu item is marked as active if on the current section's list page or on a page in that section.
|
||||||
|
|
||||||
|
|
||||||
## Site Config menus
|
## Site Config menus
|
||||||
|
|
||||||
The above is all that's needed. But if you want custom menu items, e.g. changing weight, name, or link title attribute, you can define them manually in the site config file:
|
The above is all that's needed. But if you want custom menu items, e.g. changing weight, name, or link title attribute, you can define them manually in the site config file:
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ linktitle: List Ordering and Grouping
|
|||||||
description: You can group or order your content in both your templating and content front matter.
|
description: You can group or order your content in both your templating and content front matter.
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-01
|
|
||||||
categories: [templates]
|
categories: [templates]
|
||||||
keywords: []
|
keywords: []
|
||||||
menu:
|
menu:
|
||||||
@@ -25,7 +24,7 @@ In Hugo, a list template is any template that will be used to render multiple pi
|
|||||||
|
|
||||||
### Section Template
|
### Section Template
|
||||||
|
|
||||||
This list template is used for [spf13.com](https://spf13.com/). It makes use of [partial templates][partials]. All examples use a [view](/templates/views/) called either "li" or "summary."
|
This list template is used for [spf13.com](https://spf13.com/). It makes use of [partial templates](/templates/partials/). All examples use a [view](/templates/views/) called either "li" or "summary."
|
||||||
|
|
||||||
{{< code file="layouts/section/post.html" >}}
|
{{< code file="layouts/section/post.html" >}}
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
@@ -145,7 +144,6 @@ your list templates:
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
|
|
||||||
### By Title
|
### By Title
|
||||||
|
|
||||||
{{< code file="layouts/partials/by-title.html" >}}
|
{{< code file="layouts/partials/by-title.html" >}}
|
||||||
@@ -302,7 +300,6 @@ While these are logical defaults, they are not always the desired order. There a
|
|||||||
{{ range (.Pages.GroupByDate "2006-01").Reverse }}
|
{{ range (.Pages.GroupByDate "2006-01").Reverse }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
#### Provide the Alternate Direction
|
#### Provide the Alternate Direction
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -339,6 +336,5 @@ within each group is ordered alphabetically by title.
|
|||||||
See the [_Lists/Filtering and Limiting Lists_
|
See the [_Lists/Filtering and Limiting Lists_
|
||||||
section][filteringandlimitinglists] for details.
|
section][filteringandlimitinglists] for details.
|
||||||
|
|
||||||
|
|
||||||
[views]: /templates/views/
|
[views]: /templates/views/
|
||||||
[filteringandlimitinglists]: /templates/lists/#filtering-and-limiting-lists
|
[filteringandlimitinglists]: /templates/lists/#filtering-and-limiting-lists
|
||||||
@@ -135,6 +135,7 @@ A `Page` in Hugo can be rendered to multiple *output formats* on the file
|
|||||||
system.
|
system.
|
||||||
|
|
||||||
### Default Output Formats
|
### Default Output Formats
|
||||||
|
|
||||||
Every `Page` has a [`Kind`][page_kinds] attribute, and the default Output
|
Every `Page` has a [`Kind`][page_kinds] attribute, and the default Output
|
||||||
Formats are set based on that.
|
Formats are set based on that.
|
||||||
|
|
||||||
@@ -186,7 +187,7 @@ outputs:
|
|||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
## List Output formats
|
## List Output formats
|
||||||
|
|
||||||
Each `Page` has both an `.OutputFormats` (all formats, including the current) and an `.AlternativeOutputFormats` variable, the latter of which is useful for creating a `link rel` list in your site's `<head>`:
|
Each `Page` has both an `.OutputFormats` (all formats, including the current) and an `.AlternativeOutputFormats` variable, the latter of which is useful for creating a `link rel` list in your site's `<head>`:
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ The pages are built on the following form (`BLANK` means no value):
|
|||||||
....
|
....
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
[`first`]: /functions/first/
|
[`first`]: /functions/first/
|
||||||
[`last`]: /functions/last/
|
[`last`]: /functions/last/
|
||||||
[`after`]: /functions/after/
|
[`after`]: /functions/after/
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ This means the partial will *only* be able to access those variables. The partia
|
|||||||
|
|
||||||
## Returning a value from a Partial
|
## Returning a value from a Partial
|
||||||
|
|
||||||
In addition to outputting markup, partials can be used to return a value of any type. In order to return a value, a partial must include a lone `return` statement _at the end of the partial_.
|
In addition to outputting markup, partials can be used to return a value of any type. In order to return a value, a partial must include a lone `return` statement *at the end of the partial*.
|
||||||
|
|
||||||
### Example GetFeatured
|
### Example GetFeatured
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ PlainText
|
|||||||
Attributes (map) {{< new-in "0.82.0" >}}
|
Attributes (map) {{< new-in "0.82.0" >}}
|
||||||
: A map of attributes (e.g. `id`, `class`)
|
: A map of attributes (e.g. `id`, `class`)
|
||||||
|
|
||||||
### Link with title Markdown example:
|
### Link with title Markdown example
|
||||||
|
|
||||||
```md
|
```md
|
||||||
[Text](https://www.gohugo.io "Title")
|
[Text](https://www.gohugo.io "Title")
|
||||||
@@ -97,7 +97,7 @@ Here is a code example for how the render-link.html template could look:
|
|||||||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
|
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
### Image Markdown example:
|
### Image Markdown example
|
||||||
|
|
||||||
```md
|
```md
|
||||||

|

|
||||||
|
|||||||
@@ -57,7 +57,7 @@ copyright = "This work is licensed under a Creative Commons Attribution-ShareAli
|
|||||||
|
|
||||||
This is the default RSS template that ships with Hugo:
|
This is the default RSS template that ships with Hugo:
|
||||||
|
|
||||||
https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml
|
<https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml>
|
||||||
|
|
||||||
## Reference your RSS Feed in `<head>`
|
## Reference your RSS Feed in `<head>`
|
||||||
|
|
||||||
|
|||||||
@@ -107,7 +107,6 @@ Which then returns the following:
|
|||||||
<h1>Events</h1>
|
<h1>Events</h1>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
[contentorg]: /content-management/organization/
|
[contentorg]: /content-management/organization/
|
||||||
[getpage]: /functions/getpage/
|
[getpage]: /functions/getpage/
|
||||||
[lists]: /templates/lists/
|
[lists]: /templates/lists/
|
||||||
|
|||||||
@@ -102,9 +102,7 @@ most helpful when the condition depends on either of the values, or both:
|
|||||||
|
|
||||||
If a closing shortcode is used, the `.Inner` variable will be populated with all of the content between the opening and closing shortcodes. If a closing shortcode is required, you can check the length of `.Inner` as an indicator of its existence.
|
If a closing shortcode is used, the `.Inner` variable will be populated with all of the content between the opening and closing shortcodes. If a closing shortcode is required, you can check the length of `.Inner` as an indicator of its existence.
|
||||||
|
|
||||||
A shortcode with content declared via the `.Inner` variable can also be declared without the
|
A shortcode with content declared via the `.Inner` variable can also be declared without the content and without the closing by using the self-closing syntax:
|
||||||
content and without the closing
|
|
||||||
by using the self-closing syntax:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
{{</* innershortcode /*/>}}
|
{{</* innershortcode /*/>}}
|
||||||
@@ -349,7 +347,6 @@ This will output the following HTML. Note how the first two `img` shortcodes inh
|
|||||||
<img src="/images/three.jpg">
|
<img src="/images/three.jpg">
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Error Handling in Shortcodes
|
## Error Handling in Shortcodes
|
||||||
|
|
||||||
Use the [errorf](/functions/errorf) template func and [.Position](/variables/shortcodes/) variable to get useful error messages in shortcodes:
|
Use the [errorf](/functions/errorf) template func and [.Position](/variables/shortcodes/) variable to get useful error messages in shortcodes:
|
||||||
@@ -371,7 +368,6 @@ ERROR 2018/11/07 10:05:55 missing value for param name: "/Users/bep/dev/go/gohug
|
|||||||
|
|
||||||
More shortcode examples can be found in the [shortcodes directory for spf13.com][spfscs] and the [shortcodes directory for the Hugo docs][docsshortcodes].
|
More shortcode examples can be found in the [shortcodes directory for spf13.com][spfscs] and the [shortcodes directory for the Hugo docs][docsshortcodes].
|
||||||
|
|
||||||
|
|
||||||
## Inline Shortcodes
|
## Inline Shortcodes
|
||||||
|
|
||||||
{{< new-in "0.52" >}}
|
{{< new-in "0.52" >}}
|
||||||
@@ -404,7 +400,6 @@ The same inline shortcode can be reused later in the same content file, with dif
|
|||||||
{{</* time.inline /*/>}}
|
{{</* time.inline /*/>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
[basic content files]: /content-management/formats/ "See how Hugo leverages markdown--and other supported formats--to create content for your website."
|
[basic content files]: /content-management/formats/ "See how Hugo leverages markdown--and other supported formats--to create content for your website."
|
||||||
[built-in shortcode]: /content-management/shortcodes/
|
[built-in shortcode]: /content-management/shortcodes/
|
||||||
[config]: /getting-started/configuration/ "Learn more about Hugo's built-in configuration variables as well as how to us your site's configuration file to include global key-values that can be used throughout your rendered website."
|
[config]: /getting-started/configuration/ "Learn more about Hugo's built-in configuration variables as well as how to us your site's configuration file to include global key-values that can be used throughout your rendered website."
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ date: 2017-02-01
|
|||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-01
|
lastmod: 2017-02-01
|
||||||
categories: [developer tools]
|
categories: [developer tools]
|
||||||
keywords: [frontend,gui]
|
keywords: [frontend, gui]
|
||||||
menu:
|
menu:
|
||||||
docs:
|
docs:
|
||||||
parent: "tools"
|
parent: "tools"
|
||||||
@@ -18,15 +18,13 @@ aliases: []
|
|||||||
toc: false
|
toc: false
|
||||||
---
|
---
|
||||||
|
|
||||||
* [enwrite](https://github.com/zzamboni/enwrite). Enwrite enables evernote-powered, statically generated blogs and websites. Now posting to your blog or updating your website is as easy as writing a new note in Evernote!
|
- [enwrite](https://github.com/zzamboni/enwrite). Enwrite enables evernote-powered, statically generated blogs and websites. Now posting to your blog or updating your website is as easy as writing a new note in Evernote!
|
||||||
* [Lipi](https://github.com/SohanChy/Lipi). Lipi is a native GUI frontend written in Java to manage your Hugo websites.
|
- [Lipi](https://github.com/SohanChy/Lipi). Lipi is a native GUI frontend written in Java to manage your Hugo websites.
|
||||||
* [Netlify CMS](https://netlifycms.org). Netlify CMS is an open source, serverless solution for managing Git based content in static sites, and it works on any platform that can host static sites. A [Hugo/Netlify CMS starter](https://github.com/netlify-templates/one-click-hugo-cms) is available to get new projects running quickly.
|
- [Netlify CMS](https://netlifycms.org). Netlify CMS is an open source, serverless solution for managing Git based content in static sites, and it works on any platform that can host static sites. A [Hugo/Netlify CMS starter](https://github.com/netlify-templates/one-click-hugo-cms) is available to get new projects running quickly.
|
||||||
* [Hokus CMS](https://github.com/julianoappelklein/hokus). Hokus CMS is an open source, multi-platform, easy to use, desktop application for Hugo. Build from simple to complex user interfaces for Hugo websites by choosing from a dozen ready-to-use components — all for free, with no vendor lock-in.
|
- [Hokus CMS](https://github.com/julianoappelklein/hokus). Hokus CMS is an open source, multi-platform, easy to use, desktop application for Hugo. Build from simple to complex user interfaces for Hugo websites by choosing from a dozen ready-to-use components — all for free, with no vendor lock-in.
|
||||||
|
|
||||||
|
|
||||||
## Commercial Services
|
## Commercial Services
|
||||||
|
|
||||||
* [DATOCMS](https://www.datocms.com) DatoCMS is a fully customizable administrative area for your static websites. Use your favorite website generator, let your clients publish new content independently, and the host the site anywhere you like.
|
- [DATOCMS](https://www.datocms.com) DatoCMS is a fully customizable administrative area for your static websites. Use your favorite website generator, let your clients publish new content independently, and the host the site anywhere you like.
|
||||||
* [Forestry.io](https://forestry.io/). Forestry is a git-backed CMS for Hugo, Gatsby, Jekyll and VuePress websites with support for GitHub, GitLab, Bitbucket and Azure Devops. Forestry provides a nice user interface to edit and model content for non technical editors. It supports S3, Cloudinary and Netlify Large Media integrations for storing media. Every time an update is made via the CMS, Forestry will commit changes back to your repo and vice-versa.
|
- [Forestry.io](https://forestry.io/). Forestry is a git-backed CMS for Hugo, Gatsby, Jekyll and VuePress websites with support for GitHub, GitLab, Bitbucket and Azure Devops. Forestry provides a nice user interface to edit and model content for non technical editors. It supports S3, Cloudinary and Netlify Large Media integrations for storing media. Every time an update is made via the CMS, Forestry will commit changes back to your repo and vice-versa.
|
||||||
* [CloudCannon](https://cloudcannon.com/hugo-cms/). The intuitive Git-based CMS for your Hugo website. CloudCannon syncs changes from your Git repository and pushes content changes back, so your development and content teams are always in sync. Edit all of your content on the page with visual editing, build entire pages with reusable custom components and then publish confidently.
|
- [CloudCannon](https://cloudcannon.com/hugo-cms/). The intuitive Git-based CMS for your Hugo website. CloudCannon syncs changes from your Git repository and pushes content changes back, so your development and content teams are always in sync. Edit all of your content on the page with visual editing, build entire pages with reusable custom components and then publish confidently.
|
||||||
|
|
||||||
@@ -4,26 +4,24 @@ linktitle: Other Projects
|
|||||||
description: Some interesting projects developed by the Hugo community that don't quite fit into our other developer tool categories.
|
description: Some interesting projects developed by the Hugo community that don't quite fit into our other developer tool categories.
|
||||||
date: 2017-02-01
|
date: 2017-02-01
|
||||||
publishdate: 2017-02-01
|
publishdate: 2017-02-01
|
||||||
lastmod: 2017-02-01
|
|
||||||
categories: [developer tools]
|
categories: [developer tools]
|
||||||
keywords: [frontend,gui]
|
keywords: [frontend, gui]
|
||||||
menu:
|
menu:
|
||||||
docs:
|
docs:
|
||||||
parent: "tools"
|
parent: "tools"
|
||||||
weight: 70
|
weight: 70
|
||||||
weight: 70
|
weight: 70
|
||||||
sections_weight: 70
|
sections_weight: 70
|
||||||
draft: false
|
|
||||||
aliases: []
|
aliases: []
|
||||||
toc: false
|
toc: false
|
||||||
---
|
---
|
||||||
|
|
||||||
And for all the other small things around Hugo:
|
And for all the other small things around Hugo:
|
||||||
|
|
||||||
* [hugo-gallery](https://github.com/icecreammatt/hugo-gallery) lets you create an image gallery for Hugo sites.
|
- [hugo-gallery](https://github.com/icecreammatt/hugo-gallery) lets you create an image gallery for Hugo sites.
|
||||||
* [flickr-hugo-embed](https://github.com/nikhilm/flickr-hugo-embed) prints shortcodes to embed a set of images from an album on Flickr into Hugo.
|
- [flickr-hugo-embed](https://github.com/nikhilm/flickr-hugo-embed) prints shortcodes to embed a set of images from an album on Flickr into Hugo.
|
||||||
* [hugo-openapispec-shortcode](https://github.com/tenfourty/hugo-openapispec-shortcode) A shortcode that allows you to include [Open API Spec](https://openapis.org) (formerly known as Swagger Spec) in a page.
|
- [hugo-openapispec-shortcode](https://github.com/tenfourty/hugo-openapispec-shortcode) A shortcode that allows you to include [Open API Spec](https://openapis.org) (formerly known as Swagger Spec) in a page.
|
||||||
* [HugoPhotoSwipe](https://github.com/GjjvdBurg/HugoPhotoSwipe) makes it easy to create image galleries using PhotoSwipe.
|
- [HugoPhotoSwipe](https://github.com/GjjvdBurg/HugoPhotoSwipe) makes it easy to create image galleries using PhotoSwipe.
|
||||||
* [Hugo SFTP Upload](https://github.com/thomasmey/HugoSftpUpload) Syncs the local build of your Hugo website with your remote webserver via SFTP.
|
- [Hugo SFTP Upload](https://github.com/thomasmey/HugoSftpUpload) Syncs the local build of your Hugo website with your remote webserver via SFTP.
|
||||||
* [Emacs Easy Hugo](https://github.com/masasam/emacs-easy-hugo) Emacs package for writing blog posts in markdown or org-mode and building your site with Hugo.
|
- [Emacs Easy Hugo](https://github.com/masasam/emacs-easy-hugo) Emacs package for writing blog posts in markdown or org-mode and building your site with Hugo.
|
||||||
* [JAMStack Themes](https://jamstackthemes.dev/ssg/hugo/). JAMStack themes is a collection of site themes filterable by static site generator and supported CMS to help build CMS-connected sites using Hugo (linking to Hugo-specific themes).
|
- [JAMStack Themes](https://jamstackthemes.dev/ssg/hugo/). JAMStack themes is a collection of site themes filterable by static site generator and supported CMS to help build CMS-connected sites using Hugo (linking to Hugo-specific themes).
|
||||||
@@ -123,6 +123,5 @@ See [`.IsMenuCurrent` method](/functions/ismenucurrent/).
|
|||||||
: _(menu string, menuEntry *MenuEntry) boolean_ <br />
|
: _(menu string, menuEntry *MenuEntry) boolean_ <br />
|
||||||
See [`.HasMenuCurrent` method](/functions/hasmenucurrent/).
|
See [`.HasMenuCurrent` method](/functions/hasmenucurrent/).
|
||||||
|
|
||||||
|
|
||||||
[menu-template]: /templates/menu-templates/
|
[menu-template]: /templates/menu-templates/
|
||||||
[page-object]: /variables/page/
|
[page-object]: /variables/page/
|
||||||
@@ -129,7 +129,4 @@ You can use `.Site.Params` in a [partial template](/templates/partials/) to call
|
|||||||
|
|
||||||
{{< getcontent path="readfiles/pages-vs-site-pages.md" >}}
|
{{< getcontent path="readfiles/pages-vs-site-pages.md" >}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[config]: /getting-started/configuration/
|
[config]: /getting-started/configuration/
|
||||||
@@ -4,7 +4,6 @@ linktitle: Sitemap Variables
|
|||||||
description:
|
description:
|
||||||
date: 2017-03-12
|
date: 2017-03-12
|
||||||
publishdate: 2017-03-12
|
publishdate: 2017-03-12
|
||||||
lastmod: 2017-03-12
|
|
||||||
categories: [variables and params]
|
categories: [variables and params]
|
||||||
keywords: [sitemap]
|
keywords: [sitemap]
|
||||||
draft: false
|
draft: false
|
||||||
|
|||||||
Reference in new issue
Block a user