mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Merge commit 'efa74c5c6e6ff1daddeb5834ea7c69bed2acf171'
This commit is contained in:
@@ -18,8 +18,6 @@ toc: true
|
||||
comments: Before this page is published, need to also update both site- and page-level variables documentation.
|
||||
---
|
||||
|
||||
|
||||
|
||||
Larger sites often have multiple content authors. Hugo provides standardized author profiles to organize relationships between content and content creators for sites operating under a distributed authorship model.
|
||||
|
||||
## Author Profiles
|
||||
@@ -107,7 +105,7 @@ You can find a list of all template variables to access the profile information
|
||||
|
||||
### Link Social Network Accounts
|
||||
|
||||
As aforementioned, Hugo is able to generate links to profiles of the most popular social networks. The following social networks with their corresponding identifiers are supported: `github`, `facebook`, `twitter`, `pinterest`, `instagram`, `youtube` and `linkedin`.
|
||||
As aforementioned, Hugo is able to generate links to profiles of the most popular social networks. The following social networks with their corresponding identifiers are supported: `github`, `facebook`, `twitter`, `pinterest`, `instagram`, `youtube` and `linkedin`.
|
||||
|
||||
This is can be done with the `.Social.URL` function. Its only parameter is the name of the social network as they are defined in the profile (e.g. `facebook`, `twitter`). Custom variables like `website` remain as they are.
|
||||
|
||||
|
@@ -35,7 +35,7 @@ Note that we extended this property from a boolean to an enum in Hugo 0.68.0.
|
||||
Valid values are:
|
||||
|
||||
never
|
||||
: The page will not be incldued in any page collection.
|
||||
: The page will not be included in any page collection.
|
||||
|
||||
always (default)
|
||||
: The page will be included in all page collections, e.g. `site.RegularPages`, `$page.Pages`.
|
||||
|
@@ -56,7 +56,7 @@ There are a few alternatives to commenting on static sites for those who do not
|
||||
* [IntenseDebate](https://intensedebate.com/)
|
||||
* [Graph Comment][]
|
||||
* [Muut](https://muut.com/)
|
||||
* [isso](https://posativ.org/isso/) (Self-hosted, Python)
|
||||
* [Isso](https://posativ.org/isso/) (Self-hosted, Python)
|
||||
* [Tutorial on Implementing Isso with Hugo][issotutorial]
|
||||
* [Utterances](https://utteranc.es/) (Open source, GitHub comments widget built on GitHub issues)
|
||||
* [Remark](https://github.com/umputun/remark) (Open source, Golang, Easy to run docker)
|
||||
|
@@ -98,7 +98,7 @@ Sometimes it can be useful to create the filter chain once and then reuse it:
|
||||
|
||||
Provides an [Exif](https://en.wikipedia.org/wiki/Exif) object with metadata about the image.
|
||||
|
||||
Note that this is only suported for JPEG and TIFF images, so it's recommended to wrap the access with a `with`, e.g.:
|
||||
Note that this is only supported for JPEG and TIFF images, so it's recommended to wrap the access with a `with`, e.g.:
|
||||
|
||||
```go-html-template
|
||||
{{ with $img.Exif }}
|
||||
|
@@ -63,7 +63,7 @@ When working with front matter `Params` in [single page templates][singles], omi
|
||||
|
||||
`defaultContentLanguage` sets the project's default language. If not set, the default language will be `en`.
|
||||
|
||||
If the default language needs to be rendererd below its own language code (`/en`) like the others, set `defaultContentLanguageInSubdir: true`.
|
||||
If the default language needs to be rendered below its own language code (`/en`) like the others, set `defaultContentLanguageInSubdir: true`.
|
||||
|
||||
Only the obvious non-global options can be overridden per language. Examples of global options are `baseURL`, `buildDrafts`, etc.
|
||||
|
||||
@@ -125,7 +125,7 @@ public
|
||||
|
||||
**All URLs (i.e `.Permalink` etc.) will be generated from that root. So the English home page above will have its `.Permalink` set to `https://example.com/`.**
|
||||
|
||||
When you run `hugo server` we will start multiple HTTP servers. You will typlically see something like this in the console:
|
||||
When you run `hugo server` we will start multiple HTTP servers. You will typically see something like this in the console:
|
||||
|
||||
```bash
|
||||
Web Server is available at 127.0.0.1:1313 (bind address 127.0.0.1)
|
||||
@@ -204,7 +204,7 @@ languages:
|
||||
|
||||
The value of `contentDir` can be any valid path -- even absolute path references. The only restriction is that the content directories cannot overlap.
|
||||
|
||||
Considering the following example in conjunction with the configuration above:
|
||||
Considering the following example in conjunction with the configuration above:
|
||||
|
||||
1. `/content/english/about.md`
|
||||
2. `/content/french/about.md`
|
||||
|
@@ -23,9 +23,9 @@ Hugo `0.32` announced page-relative images and other resources packaged into `Pa
|
||||
|
||||
These terms are connected, and you also need to read about [Page Resources]({{< relref "/content-management/page-resources" >}}) and [Image Processing]({{< relref "/content-management/image-processing" >}}) to get the full picture.
|
||||
|
||||
{{% imgproc 1-featured Resize "300x" %}}
|
||||
{{< imgproc 1-featured Resize "300x" >}}
|
||||
The illustration shows 3 bundles. Note that the home page bundle cannot contain other content pages, but other files (images etc.) are fine.
|
||||
{{% /imgproc %}}
|
||||
{{< /imgproc >}}
|
||||
|
||||
|
||||
{{% note %}}
|
||||
@@ -112,7 +112,7 @@ Single content files in each of your sections are going to be rendered as [singl
|
||||
content/posts/my-first-hugo-post.md
|
||||
```
|
||||
|
||||
At the time Hugo builds your site, the content will be output to the following destination:
|
||||
When Hugo builds your site, the content will be outputted to the following destination:
|
||||
|
||||
```
|
||||
|
||||
|
@@ -82,7 +82,7 @@ GetMatch
|
||||
|
||||
## Page Resources Metadata
|
||||
|
||||
The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
|
||||
The page resources' metadata is managed from the corresponding page's front matter with an array/table parameter named `resources`. You can batch assign values using [wildcards](https://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm).
|
||||
|
||||
{{% note %}}
|
||||
Resources of type `page` get `Title` etc. from their own front matter.
|
||||
|
@@ -21,7 +21,7 @@ toc: true
|
||||
|
||||
## What a Shortcode is
|
||||
|
||||
Hugo loves Markdown because of its simple content format, but there are times when Markdown falls short. Often, content authors are forced to add raw HTML (e.g., video `<iframes>`) to Markdown content. We think this contradicts the beautiful simplicity of Markdown's syntax.
|
||||
Hugo loves Markdown because of its simple content format, but there are times when Markdown falls short. Often, content authors are forced to add raw HTML (e.g., video `<iframe>`'s) to Markdown content. We think this contradicts the beautiful simplicity of Markdown's syntax.
|
||||
|
||||
Hugo created **shortcodes** to circumvent these limitations.
|
||||
|
||||
@@ -418,7 +418,7 @@ To learn more about creating custom shortcodes, see the [shortcode template docu
|
||||
[`figure` shortcode]: #figure
|
||||
[contentmanagementsection]: /content-management/formats/
|
||||
[examplegist]: https://gist.github.com/spf13/7896402
|
||||
[figureelement]: http://html5doctor.com/the-figure-figcaption-elements/ "An article from HTML5 doctor discussing the fig and figcaption elements."
|
||||
[figureelement]: https://html5doctor.com/the-figure-figcaption-elements/ "An article from HTML5 doctor discussing the fig and figcaption elements."
|
||||
[Hugo and the GDPR]: /about/hugo-and-gdpr/
|
||||
[Instagram]: https://www.instagram.com/
|
||||
[pagevariables]: /variables/page/
|
||||
|
@@ -209,7 +209,7 @@ content/posts/post-1.md
|
||||
|
||||
## Ugly URLs
|
||||
|
||||
If you would like to have what are often referred to as "ugly URLs" (e.g., example.com/urls.html), set `uglyurls = true` or `uglyurls: true` in your site's `config.toml` or `config.yaml`, respectively. You can also use the `--uglyURLs=true` [flag from the command line][usage] with `hugo` or `hugo server`.
|
||||
If you would like to have what are often referred to as "ugly URLs" (e.g., example.com/urls.html), set `uglyurls = true` or `uglyurls: true` in your site's `config.toml` or `config.yaml`, respectively. You can also set the `HUGO_UGLYURLS` environment variable to `true` when running `hugo` or `hugo server`.
|
||||
|
||||
If you want a specific piece of content to have an exact URL, you can specify this in the [front matter][] under the `url` key. The following are examples of the same content directory and what the eventual URL structure will be when Hugo runs with its default behavior.
|
||||
|
||||
|
Reference in New Issue
Block a user