Squashed 'docs/' changes from 0c3c04fd6..540aeddc7

540aeddc7 Small fixes for Open Graph internal template
47bbb3fd7 Bump lodash.template from 4.4.0 to 4.5.0 in /themes/gohugoioTheme
64c1cc3db Update title.md
36c27be37 Update configuration.md
4627cfe9a added commento.io to the list
341d9d945 Fix link to font assets
4a6876dec Small typo fix in configuration.md
736d6ddd7 Add bypasscensorship.org showcase.
de7ab636b Use actual width in image processing examples
6c88ab2da Update directory-structure.md
88f559e81 Fix spelling mistakes
7bd427141 Rephrase four points from Hosting on Github docs
bce1b1832 Fix typos for absLangURL and relLangURL functions
abab57335 Update directory-structure.md
a6716f2ed Fix metadata list
5ef61d912 Fix typo
d9e467b8b Actuall show how to generate pages in quickstart
0aadc92e7 Update link to issue theme submission
b1902faaa Remove incorrect note about Hugo snap --classic use.
d451e7362 Update documentation on page variables
ab2233c39 Update publish_to_ghpages.sh
7c120346b Fix typo in syntax highlighting page.
f01dc555d Correct some typos
be825ade9 Videos plural produces og:video
bc962fbdf Updated installing.md file to include linuxbrew installation
08c9f8fc8 Mention 1 MB file size limit in readFile doc
7145e29e2 Fixes bad URL in menus.md for .hasChildren * part of issue #814
0edbd59c4 add warning about .Hugo variable being deprecated
77f74ced5 fix: typo in output-formats.md
f71b67f34 Correct typo "RFC339" to "RFC1123Z" (#837)
424c0207a baseurl -> baseURL
f4e24a03e Render launched; no invite code needed
37e1101d3 Add Render hosting guide
01d0a6481 Bump js-yaml from 3.12.0 to 3.13.1 in /themes/gohugoioTheme
edb7b36b0 Link site hierarchy schema to larger version
af72acda0 Fixes typo in fingerprint.md
0a738467b Adding required XML tag to sample templates
52211f656 Remove note that XML declaration is not needed
a39b9ac87 Adding required XML tag to sample templates
1a44d8a50 Add configuration information for Azure
5b7c6b5a1 remove google plus
5a64301ba HTTPS link to yaml.org/spec/

git-subtree-dir: docs
git-subtree-split: 540aeddc797658a2c3d0e49e944592d2b23b3bb8
This commit is contained in:
Bjørn Erik Pedersen 2019-07-15 23:49:41 +02:00
parent be04ece859
commit 35febb2e2a
42 changed files with 344 additions and 154 deletions

View file

@ -44,7 +44,6 @@ weight = 10
[social] [social]
facebook = "alice.allison" facebook = "alice.allison"
twitter = "alice" twitter = "alice"
googleplus = "aliceallison1"
website = "www.example.com" website = "www.example.com"
[params] [params]
@ -108,9 +107,9 @@ You can find a list of all template variables to access the profile information
### Link Social Network Accounts ### 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 corrersponding identifiers are supported: `github`, `facebook`, `twitter`, `googleplus`, `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 corrersponding 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`, `googleplus`). Custom variables like `website` remain as they are. 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.
Most articles feature a small section with information about the author at the end. Let's create one containing the author's name, a thumbnail, a (summarized) biography and links to all social networks: Most articles feature a small section with information about the author at the end. Let's create one containing the author's name, a thumbnail, a (summarized) biography and links to all social networks:

View file

@ -61,6 +61,7 @@ There are a few alternatives to commenting on static sites for those who do not
* [Tutorial on Implementing Isso with Hugo][issotutorial] * [Tutorial on Implementing Isso with Hugo][issotutorial]
* [Utterances](https://utteranc.es/) (Open source, Github comments widget built on Github issues) * [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) * [Remark](https://github.com/umputun/remark) (Open source, Golang, Easy to run docker)
* [Commento](https://commento.io/) (Open Source, available as a service, local install, or docker image)
<!-- I don't think this is worth including in the documentation since it seems that Steve is no longer supporting or developing this project. rdwatters - 2017-02-29.--> <!-- I don't think this is worth including in the documentation since it seems that Steve is no longer supporting or developing this project. rdwatters - 2017-02-29.-->
<!-- * [Kaiju](https://github.com/spf13/kaiju) --> <!-- * [Kaiju](https://github.com/spf13/kaiju) -->

View file

@ -49,7 +49,7 @@ linkedin = "https://linkedin.com/fr/whoever"
help = "Aide" help = "Aide"
{{< /code-toggle >}} {{< /code-toggle >}}
Anything not defined in a `[languages]` block will fall back to the global value for that key (e.g., `copyright` for the English [`en`] language). This also works for `params`, as demonstrated with `help` above: you will get the value `Aide` in French and `Help` in all the languages without this parameter set. Anything not defined in a `languages` block will fall back to the global value for that key (e.g., `copyright` for the English `en` language). This also works for `params`, as demonstrated witgh `help` above: You will get the value `Aide` in French and `Help` in all the languages without this parameter set.
With the configuration above, all content, sitemap, RSS feeds, paginations, With the configuration above, all content, sitemap, RSS feeds, paginations,
and taxonomy pages will be rendered below `/` in English (your default content language) and then below `/fr` in French. and taxonomy pages will be rendered below `/` in English (your default content language) and then below `/fr` in French.
@ -159,7 +159,7 @@ plaque = "plaques"
## Translate Your Content ## Translate Your Content
There are two ways to manage your content translation, both ensures each page is assigned a language and linked to its translations. There are two ways to manage your content translations. Both ensure each page is assigned a language and is linked to its counterpart translations.
### Translation by filename ### Translation by filename
@ -168,17 +168,17 @@ Considering the following example:
1. `/content/about.en.md` 1. `/content/about.en.md`
2. `/content/about.fr.md` 2. `/content/about.fr.md`
The first file is assigned the english language and linked to the second. The first file is assigned the English language and is linked to the second.
The second file is assigned the french language and linked to the first. The second file is assigned the French language and is linked to the first.
Their language is __assigned__ according to the language code added as __suffix to the filename__. Their language is __assigned__ according to the language code added as a __suffix to the filename__.
By having the same **path and base filename**, the content pieces are __linked__ together as translated pages. By having the same **path and base filename**, the content pieces are __linked__ together as translated pages.
{{< note >}} {{< note >}}
If a file has no language code, it will be assigned the default language.
If a file is missing any language code, it will be assigned the default language.
{{</ note >}} {{</ note >}}
### Translation by content directory ### Translation by content directory
This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` param. This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` param.
@ -190,22 +190,22 @@ languages:
weight: 10 weight: 10
languageName: "English" languageName: "English"
contentDir: "content/english" contentDir: "content/english"
nn: fr:
weight: 20 weight: 20
languageName: "Français" languageName: "Français"
contentDir: "content/french" contentDir: "content/french"
{{< /code-toggle >}} {{< /code-toggle >}}
The value of `contentDir` can be any valid path, even absolute path references. The only restriction is that the content directories cannot overlap. 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` 1. `/content/english/about.md`
2. `/content/french/about.md` 2. `/content/french/about.md`
The first file is assigned the english language and is linked to the second. The first file is assigned the English language and is linked to the second.
<br>The second file is assigned the french language and is linked to the first. The second file is assigned the French language and is linked to the first.
Their language is __assigned__ according to the content directory they are __placed__ in. Their language is __assigned__ according to the content directory they are __placed__ in.
@ -231,11 +231,11 @@ By setting the `translationKey` front matter param to `about` in all three pages
### Localizing permalinks ### Localizing permalinks
Because paths and filenames are used to handle linking, all translated pages, except for the language part, will be sharing the same url. Because paths and filenames are used to handle linking, all translated pages will share the same URL (apart from the language subdirectory).
To localize the URLs, the [`slug`]({{< ref "/content-management/organization/index.md#slug" >}}) or [`url`]({{< ref "/content-management/organization/index.md#url" >}}) front matter param can be set in any of the non-default language file. To localize the URLs, the [`slug`]({{< ref "/content-management/organization/index.md#slug" >}}) or [`url`]({{< ref "/content-management/organization/index.md#url" >}}) front matter param can be set in any of the non-default language file.
For example, a french translation (`content/about.fr.md`) can have its own localized slug. For example, a French translation (`content/about.fr.md`) can have its own localized slug.
{{< code-toggle >}} {{< code-toggle >}}
Title: A Propos Title: A Propos
@ -243,9 +243,10 @@ slug: "a-propos"
{{< /code-toggle >}} {{< /code-toggle >}}
At render, Hugo will build both `/about/` and `fr/a-propos/` while maintaning their translation linking. At render, Hugo will build both `/about/` and `/fr/a-propos/` while maintaining their translation linking.
{{% note %}} {{% note %}}
If using `url`, remember to include the language part as well: `fr/compagnie/a-propos/`. If using `url`, remember to include the language part as well: `/fr/compagnie/a-propos/`.
{{%/ note %}} {{%/ note %}}
### Page Bundles ### Page Bundles
@ -254,15 +255,13 @@ To avoid the burden of having to duplicate files, each Page Bundle inherits the
Therefore, from within a template, the page will have access to the files from all linked pages' bundles. Therefore, from within a template, the page will have access to the files from all linked pages' bundles.
If, across the linked bundles, two or more files share the same basenname, only one will be included and chosen as follows: If, across the linked bundles, two or more files share the same basename, only one will be included and chosen as follows:
* File from current language Bundle, if present. * File from current language bundle, if present.
* First file found across bundles by order of language `Weight`. * First file found across bundles by order of language `Weight`.
{{% note %}} {{% note %}}
Page Bundle resources follow the same language assignment logic as content files, both by filename (`image.jpg`, `image.fr.jpg`) and by directory (`english/about/header.jpg`, `french/about/header.jpg`).
Page Bundle's resources follow the same language assignement logic as content files, be it by filename (`image.jpg`, `image.fr.jpg`) or by directory (`english/about/header.jpg`, `french/about/header.jpg`).
{{%/ note %}} {{%/ note %}}
## Reference the Translated Content ## Reference the Translated Content
@ -277,18 +276,18 @@ To create a list of links to translated content, use a template similar to the f
<li> <li>
<a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a> <a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
</li> </li>
{{ end}} {{ end }}
</ul> </ul>
{{ end }} {{ end }}
{{< /code >}} {{< /code >}}
The above can be put in a `partial` (i.e., inside `layouts/partials/`) and included in any template, be it for a [single content page][contenttemplate] or the [homepage][]. It will not print anything if there are no translations for a given page. The above can be put in a `partial` (i.e., inside `layouts/partials/`) and included in any template, whether a [single content page][contenttemplate] or the [homepage][]. It will not print anything if there are no translations for a given page.
The above also uses the [`i18n` function][i18func] described in the next section. The above also uses the [`i18n` function][i18func] described in the next section.
### List All Available Languages ### List All Available Languages
`.AllTranslations` on a `Page` can be used to list all translations, including itself. Called on the home page it can be used to build a language navigator: `.AllTranslations` on a `Page` can be used to list all translations, including the page itself. On the home page it can be used to build a language navigator:
{{< code file="layouts/partials/allLanguages.html" >}} {{< code file="layouts/partials/allLanguages.html" >}}
@ -306,7 +305,7 @@ Hugo uses [go-i18n][] to support string translations. [See the project's source
Translations are collected from the `themes/<THEME>/i18n/` folder (built into the theme), as well as translations present in `i18n/` at the root of your project. In the `i18n`, the translations will be merged and take precedence over what is in the theme folder. Language files should be named according to [RFC 5646][] with names such as `en-US.toml`, `fr.toml`, etc. Translations are collected from the `themes/<THEME>/i18n/` folder (built into the theme), as well as translations present in `i18n/` at the root of your project. In the `i18n`, the translations will be merged and take precedence over what is in the theme folder. Language files should be named according to [RFC 5646][] with names such as `en-US.toml`, `fr.toml`, etc.
{{% note %}} {{% note %}}
From **Hugo 0.31** you no longer need to use a valid language code. It _can be_ anything. From **Hugo 0.31** you no longer need to use a valid language code. It can be anything.
See https://github.com/gohugoio/hugo/issues/3564 See https://github.com/gohugoio/hugo/issues/3564
@ -341,8 +340,8 @@ An example of singular and plural form:
``` ```
[readingTime] [readingTime]
one = "One minute read" one = "One minute to read"
other = "{{.Count}} minutes read" other = "{{.Count}} minutes to read"
``` ```
And then in the template: And then in the template:
@ -352,7 +351,7 @@ And then in the template:
## Customize Dates ## Customize Dates
At the time of this writing, Go does not yet have support for internationalized locales, but if you do some work, you can simulate it. For example, if you want to use French month names, you can add a data file like ``data/mois.yaml`` with this content: At the time of this writing, Go does not yet have support for internationalized locales for dates, but if you do some work, you can simulate it. For example, if you want to use French month names, you can add a data file like ``data/mois.yaml`` with this content:
~~~yaml ~~~yaml
1: "janvier" 1: "janvier"
@ -369,10 +368,10 @@ At the time of this writing, Go does not yet have support for internationalized
12: "décembre" 12: "décembre"
~~~ ~~~
... then index the non-English date names in your templates like so: ...then index the non-English date names in your templates like so:
~~~html ~~~html
<time class="post-date" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}"> <time class="post-date" datetime="{{ .Date.Format '2006-01-02T15:04:05Z07:00' | safeHTML }}">
Article publié le {{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }} (dernière modification le {{ .Lastmod.Day }} {{ index $.Site.Data.mois (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Year }}) Article publié le {{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }} (dernière modification le {{ .Lastmod.Day }} {{ index $.Site.Data.mois (printf "%d" .Lastmod.Month) }} {{ .Lastmod.Year }})
</time> </time>
~~~ ~~~
@ -381,7 +380,7 @@ This technique extracts the day, month and year by specifying ``.Date.Day``, ``.
## Menus ## Menus
You can define your menus for each language independently. The [creation of a menu][menus] works analogous to earlier versions of Hugo, except that they have to be defined in their language-specific block in the configuration file: You can define your menus for each language independently. Creating multilingual menus works just like [creating regular menus][menus], except they're defined in language-specific blocks in the configuration file:
``` ```
defaultContentLanguage = "en" defaultContentLanguage = "en"
@ -406,7 +405,7 @@ name = "Startseite"
weight = 0 weight = 0
``` ```
The rendering of the main navigation works as usual. `.Site.Menus` will just contain the menu of the current language. Pay attention to the generation of the menu links. `absLangURL` takes care that you link to the correct locale of your website. Otherwise, both menu entries would link to the English version as the default content language that resides in the root directory. The rendering of the main navigation works as usual. `.Site.Menus` will just contain the menu in the current language. Note that `absLangURL` below will link to the correct locale of your website. Without it, menu entries in all languages would link to the English version, since it's the default content language that resides in the root directory.
``` ```
<ul> <ul>
@ -427,7 +426,7 @@ If a string does not have a translation for the current language, Hugo will use
While translating a Hugo website, it can be handy to have a visual indicator of missing translations. The [`enableMissingTranslationPlaceholders` configuration option][config] will flag all untranslated strings with the placeholder `[i18n] identifier`, where `identifier` is the id of the missing translation. While translating a Hugo website, it can be handy to have a visual indicator of missing translations. The [`enableMissingTranslationPlaceholders` configuration option][config] will flag all untranslated strings with the placeholder `[i18n] identifier`, where `identifier` is the id of the missing translation.
{{% note %}} {{% note %}}
Hugo will generate your website with these missing translation placeholders. It might not be suited for production environments. Hugo will generate your website with these missing translation placeholders. It might not be suitable for production environments.
{{% /note %}} {{% /note %}}
For merging of content from other languages (i.e. missing content translations), see [lang.Merge](/functions/lang.merge/). For merging of content from other languages (i.e. missing content translations), see [lang.Merge](/functions/lang.merge/).
@ -444,11 +443,9 @@ i18n|MISSING_TRANSLATION|en|wordCount
To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there is more than one language, URLs must meet the following criteria: To support Multilingual mode in your themes, some considerations must be taken for the URLs in the templates. If there is more than one language, URLs must meet the following criteria:
* Come from the built-in `.Permalink` or `.RelPermalink` * Come from the built-in `.Permalink` or `.RelPermalink`
* Be constructed with * Be constructed with the [`relLangURL` template function][rellangurl] or the [`absLangURL` template function][abslangurl] **OR** be prefixed with `{{ .LanguagePrefix }}`
* The [`relLangURL` template function][rellangurl] or the [`absLangURL` template function][abslangurl] **OR**
* Prefixed with `{{ .LanguagePrefix }}`
If there is more than one language defined, the `LanguagePrefix` variable will equal `/en` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string and is therefore harmless for single-language Hugo websites. If there is more than one language defined, the `LanguagePrefix` variable will equal `/en` (or whatever your `CurrentLanguage` is). If not enabled, it will be an empty string (and is therefore harmless for single-language Hugo websites).
[abslangurl]: /functions/abslangurl [abslangurl]: /functions/abslangurl
[config]: /getting-started/configuration/ [config]: /getting-started/configuration/

View file

@ -60,7 +60,7 @@ Without any additional configuration, the following will just work:
## Path Breakdown in Hugo ## Path Breakdown in Hugo
The following demonstrates the relationships between your content organization and the output URL structure for your Hugo website when it renders. These examples assume you are [using pretty URLs][pretty], which is the default behavior for Hugo. The examples also assume a key-value of `baseurl = "https://example.com"` in your [site's configuration file][config]. The following demonstrates the relationships between your content organization and the output URL structure for your Hugo website when it renders. These examples assume you are [using pretty URLs][pretty], which is the default behavior for Hugo. The examples also assume a key-value of `baseURL = "https://example.com"` in your [site's configuration file][config].
### Index Pages: `_index.md` ### Index Pages: `_index.md`

View file

@ -55,7 +55,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 agrument would be the `indice` and the consective 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 consective ones its potential `matches`.
``` ```
{{ $related := .Site.RegularPages.RelatedTo ( keyVals "tags" "hugo" "rocks") ( keyVals "date" .Date ) }} {{ $related := .Site.RegularPages.RelatedTo ( keyVals "tags" "hugo" "rocks") ( keyVals "date" .Date ) }}

View file

@ -16,7 +16,7 @@ aliases: [/extras/highlighting/,/extras/highlight/,/tools/syntax-highlighting/]
toc: true toc: true
--- ---
From Hugo 0.28, the default syntax hightlighter in Hugo is [Chroma](https://github.com/alecthomas/chroma); it is built in Go and is really, really fast -- and for the most important parts compatible with Pygments. From Hugo 0.28, the default syntax highlighter in Hugo is [Chroma](https://github.com/alecthomas/chroma); it is built in Go and is really, really fast -- and for the most important parts compatible with Pygments.
If you want to continue to use Pygments (see below), set `pygmentsUseClassic=true` in your site config. If you want to continue to use Pygments (see below), set `pygmentsUseClassic=true` in your site config.

View file

@ -132,4 +132,4 @@ If you add screenshots to the README, please make use of absolute file paths ins
{{% /note %}} {{% /note %}}
[artistexample]: https://github.com/digitalcraftsman/hugo-artists-theme/tree/master/exampleSite [artistexample]: https://github.com/digitalcraftsman/hugo-artists-theme/tree/master/exampleSite
[themeissuenew]: https://github.com/gohugoio/hugoThemes/issues/new [themeissuenew]: https://github.com/gohugoio/hugoThemes/issues/new?template=theme-submission.md

View file

@ -87,9 +87,11 @@ date: 2017-03-03T14:15:59-06:00
`"Mon, 02 Jan 2006 15:04:05 MST"` (RFC1123) `"Mon, 02 Jan 2006 15:04:05 MST"` (RFC1123)
: **Returns**: `Fri, 03 Mar 2017 14:15:59 CST` : **Returns**: `Fri, 03 Mar 2017 14:15:59 CST`
`"Mon, 02 Jan 2006 15:04:05 -0700"` (RFC339) `"Mon, 02 Jan 2006 15:04:05 -0700"` (RFC1123Z)
: **Returns**: `Fri, 03 Mar 2017 14:15:59 -0600` : **Returns**: `Fri, 03 Mar 2017 14:15:59 -0600`
More examples can be found in Go's [documentation for the time package][timeconst].
### Cardinal Numbers and Ordinal Abbreviations ### Cardinal Numbers and Ordinal Abbreviations
Spelled-out cardinal numbers (e.g. "one", "two", and "three") and ordinal abbreviations (i.e., with shorted suffixes like "1st", "2nd", and "3rd") are not currently supported: Spelled-out cardinal numbers (e.g. "one", "two", and "three") and ordinal abbreviations (i.e., with shorted suffixes like "1st", "2nd", and "3rd") are not currently supported:
@ -121,3 +123,4 @@ In conjunction with the [`dateFormat` function][dateFormat], you can also conver
[gdex]: https://golang.org/pkg/time/#example_Time_Format [gdex]: https://golang.org/pkg/time/#example_Time_Format
[pagevars]: /variables/page/ [pagevars]: /variables/page/
[time]: https://golang.org/pkg/time/ [time]: https://golang.org/pkg/time/
[timeconst]: https://golang.org/pkg/time/#ANSIC

View file

@ -28,6 +28,8 @@ So, if you have a file with the name `README.txt` in the root of your project wi
If you receive a "file doesn't exist" error with a path listed, do take note that the path is the last one checked by the function, and may not accurately reflect your target. You should generally double-check your path for mistakes. If you receive a "file doesn't exist" error with a path listed, do take note that the path is the last one checked by the function, and may not accurately reflect your target. You should generally double-check your path for mistakes.
Note that there is a 1 MB file size limit.
For more information on using `readDir` and `readFile` in your templates, see [Local File Templates][local]. For more information on using `readDir` and `readFile` in your templates, see [Local File Templates][local].
[local]: /templates/files/ [local]: /templates/files/

View file

@ -24,7 +24,7 @@ deprecated: false
A template file is any file living below the `layouts` directories of either the project or any of its theme components incudling partials and shortcodes. A template file is any file living below the `layouts` directories of either the project or any of its theme components incudling partials and shortcodes.
The function is particulary handy with dynamic path. The following example ensures the build will not break on a `.Type` missing its dedicated `header` partial. The function is particularly handy with dynamic path. The following example ensures the build will not break on a `.Type` missing its dedicated `header` partial.
```go-html-template ```go-html-template
{{ $partialPath := printf "headers/%s.html" .Type }} {{ $partialPath := printf "headers/%s.html" .Type }}

View file

@ -31,3 +31,7 @@ Can be combined in pipes. In the following snippet, the link text is cleaned up
<li><a href="{{ printf "%s/%s" "categories" ($name | urlize | lower) | absURL }}">{{ $name | humanize | title }} ({{ len $items }})</a></li> <li><a href="{{ printf "%s/%s" "categories" ($name | urlize | lower) | absURL }}">{{ $name | humanize | title }} ({{ len $items }})</a></li>
{{ end }} {{ end }}
``` ```
## Configure Title Case
The default is AP Stylebook, but you can [configure it](/getting-started/configuration/#configure-title-case).

View file

@ -115,7 +115,7 @@ defaultContentLanguageInSubdir (false)
: Render the default content language in subdir, e.g. `content/en/`. The site root `/` will then redirect to `/en/`. : Render the default content language in subdir, e.g. `content/en/`. The site root `/` will then redirect to `/en/`.
disableAliases (false) disableAliases (false)
: Will disable generation of alias redirects. Note that even if `disableAliases` is set, the aliases themselves are preserved on the page. The motivation with this is to be able to generate 301 redirects in an `.htacess`, a Netlify `_redirects` file or similar using a custom output format. : Will disable generation of alias redirects. Note that even if `disableAliases` is set, the aliases themselves are preserved on the page. The motivation with this is to be able to generate 301 redirects in an `.htaccess`, a Netlify `_redirects` file or similar using a custom output format.
disableHugoGeneratorInject (false) disableHugoGeneratorInject (false)
: Hugo will, by default, inject a generator meta tag in the HTML head on the _home page only_. You can turn it off, but we would really appreciate if you don't, as this is a good way to watch Hugo's popularity on the rise. : Hugo will, by default, inject a generator meta tag in the HTML head on the _home page only_. You can turn it off, but we would really appreciate if you don't, as this is a good way to watch Hugo's popularity on the rise.
@ -265,6 +265,9 @@ timeout (10000)
title ("") title ("")
: Site title. : Site title.
titleCaseStyle ("AP")
: See [Configure Title Case](#configure-title-case)
uglyURLs (false) uglyURLs (false)
: When enabled, creates URL of the form `/filename.html` instead of `/filename/`. : When enabled, creates URL of the form `/filename.html` instead of `/filename/`.
@ -291,6 +294,10 @@ enableemoji: true
``` ```
{{% /note %}} {{% /note %}}
## Configure Title Case
Set `titleCaseStyle` to specify the title style used by the [title](/functions/title/) template function and the automatic section titles in Hugo. It defaults to [AP Stylebook](https://www.apstylebook.com/) for title casing, but you can also set it to `Chicago` or `Go` (every word starts with a capital letter).
## Configuration Environment Variables ## Configuration Environment Variables
HUGO_NUMWORKERMULTIPLIER HUGO_NUMWORKERMULTIPLIER
@ -498,5 +505,5 @@ dir
[Output Formats]: /templates/output-formats/ [Output Formats]: /templates/output-formats/
[templates]: /templates/ [templates]: /templates/
[toml]: https://github.com/toml-lang/toml [toml]: https://github.com/toml-lang/toml
[yaml]: http://yaml.org/spec/ [yaml]: https://yaml.org/spec/
[static-files]: /content-management/static-files/ [static-files]: /content-management/static-files/

View file

@ -27,8 +27,7 @@ Running the `hugo new site` generator from the command line will create a direct
``` ```
. .
├── archetypes ├── archetypes
├── assets ├── config.toml
├── config
├── content ├── content
├── data ├── data
├── layouts ├── layouts
@ -46,14 +45,14 @@ The following is a high-level overview of each of the directories with links to
By default, Hugo will create new content files with at least `date`, `title` (inferred from the file name), and `draft = true`. This saves time and promotes consistency for sites using multiple content types. You can create your own [archetypes][] with custom preconfigured front matter fields as well. By default, Hugo will create new content files with at least `date`, `title` (inferred from the file name), and `draft = true`. This saves time and promotes consistency for sites using multiple content types. You can create your own [archetypes][] with custom preconfigured front matter fields as well.
[`assets`][] [`assets`][]
: Stores all the files which need be processed by [Hugo Pipes]({{< ref "/hugo-pipes" >}}). Only the files whose `.Permalink` or `.RelPermalink` are used will be published to the `public` directory. : Stores all the files which need be processed by [Hugo Pipes]({{< ref "/hugo-pipes" >}}). Only the files whose `.Permalink` or `.RelPermalink` are used will be published to the `public` directory. Note: assets directory is not created by default.
[`config`](/getting-started/configuration/) [`config`](/getting-started/configuration/)
: Hugo ships with a large number of [configuration directives](https://gohugo.io/getting-started/configuration/#all-variables-yaml). : Hugo ships with a large number of [configuration directives](https://gohugo.io/getting-started/configuration/#all-variables-yaml).
The [config directory](/getting-started/configuration/#configuration-directory) is where those directives are stored as JSON, YAML, or TOML files. Every root setting object can stand as its own file and structured by environments. The [config directory](/getting-started/configuration/#configuration-directory) is where those directives are stored as JSON, YAML, or TOML files. Every root setting object can stand as its own file and structured by environments.
Projects with minimal settings and no need for environment awareness can use a single `config.toml` file at its root. Projects with minimal settings and no need for environment awareness can use a single `config.toml` file at its root.
Many sites may need little to no configuration, but Hugo ships with a large number of [configuration directives][] for more granular directions on how you want Hugo to build your website. Many sites may need little to no configuration, but Hugo ships with a large number of [configuration directives][] for more granular directions on how you want Hugo to build your website. Note: config directory is not created by default.
[`content`][] [`content`][]
: All content for your website will live inside this directory. Each top-level folder in Hugo is considered a [content section][]. For example, if your site has three main sections---`blog`, `articles`, and `tutorials`---you will have three directories at `content/blog`, `content/articles`, and `content/tutorials`. Hugo uses sections to assign default [content types][]. : All content for your website will live inside this directory. Each top-level folder in Hugo is considered a [content section][]. For example, if your site has three main sections---`blog`, `articles`, and `tutorials`---you will have three directories at `content/blog`, `content/articles`, and `content/tutorials`. Hugo uses sections to assign default [content types][].

View file

@ -54,6 +54,16 @@ brew install hugo
For more detailed explanations, read the installation guides that follow for installing on macOS and Windows. For more detailed explanations, read the installation guides that follow for installing on macOS and Windows.
### Linuxbrew (Linux)
If you are on Linux and using [Linuxbrew][linuxbrew], you can install Hugo with the following one-liner:
{{< code file="install-with-linuxbrew.sh" >}}
brew install hugo
{{< /code >}}
Installation guides for Linuxbrew are available on their [website][linuxbrew].
### Chocolatey (Windows) ### Chocolatey (Windows)
If you are on a Windows machine and use [Chocolatey][] for package management, you can install Hugo with the following one-liner: If you are on a Windows machine and use [Chocolatey][] for package management, you can install Hugo with the following one-liner:
@ -437,7 +447,7 @@ To install the non-extended version without Sass/SCSS support:
To switch between the two, use either `snap refresh hugo --channel=extended` or `snap refresh hugo --channel=stable`. To switch between the two, use either `snap refresh hugo --channel=extended` or `snap refresh hugo --channel=stable`.
{{% note %}} {{% note %}}
Hugo-as-a-snap can write only inside the users `$HOME` directory---and gvfs-mounted directories owned by the user---because of Snaps confinement and security model. More information is also available [in this related GitHub issue](https://github.com/gohugoio/hugo/issues/3143). Use ```sudo snap install hugo --classic``` to disable the default security model if you want hugo to be able to have write access in other paths besides the users `$HOME` directory. Hugo installed via Snap can write only inside the users `$HOME` directory---and gvfs-mounted directories owned by the user---because of Snaps confinement and security model. More information is also available [in this related GitHub issue](https://github.com/gohugoio/hugo/issues/3143).
{{% /note %}} {{% /note %}}
### Debian and Ubuntu ### Debian and Ubuntu
@ -507,6 +517,7 @@ Now that you've installed Hugo, read the [Quick Start guide][quickstart] and exp
[highlight shortcode]: /content-management/shortcodes/#highlight [highlight shortcode]: /content-management/shortcodes/#highlight
[installgit]: http://git-scm.com/ [installgit]: http://git-scm.com/
[installgo]: https://golang.org/dl/ [installgo]: https://golang.org/dl/
[linuxbrew]: https://linuxbrew.sh/
[Path Editor]: https://patheditor2.codeplex.com/ [Path Editor]: https://patheditor2.codeplex.com/
[pygments]: http://pygments.org [pygments]: http://pygments.org
[quickstart]: /getting-started/quick-start/ [quickstart]: /getting-started/quick-start/

View file

@ -83,16 +83,27 @@ echo 'theme = "ananke"' >> config.toml
{{< asciicast 7naKerRYUGVPj8kiDmdh5k5h9 >}} {{< asciicast 7naKerRYUGVPj8kiDmdh5k5h9 >}}
## Step 4: Add Some Content ## Step 4: Add Some Content
You can manually create content files (for example as `content/<CATEGORY>/<FILE>.<FORMAT>`) and provide metadata in them, however you can use `new` commend to do few things for you (like add title and date):
``` ```
hugo new posts/my-first-post.md hugo new posts/my-first-post.md
``` ```
{{< asciicast eUojYCfRTZvkEiqc52fUsJRBR >}} {{< asciicast eUojYCfRTZvkEiqc52fUsJRBR >}}
Edit the newly created content file if you want, it will start with something like this:
Edit the newly created content file if you want. ```markdown
---
title: "My First Post"
date: 2019-03-26T08:47:11+01:00
draft: true
---
```
## Step 5: Start the Hugo server ## Step 5: Start the Hugo server
@ -130,6 +141,8 @@ Press Ctrl+C to stop
**Navigate to your new site at [http://localhost:1313/](http://localhost:1313/).** **Navigate to your new site at [http://localhost:1313/](http://localhost:1313/).**
Feel free to edit or add new content and simply refresh in browser to see changes quickly (You might need to force refresh in webbrowser, something like Ctrl-R usually works).
## Step 6: Customize the Theme ## Step 6: Customize the Theme
@ -157,3 +170,13 @@ For theme specific configuration options, see the [theme site](https://github.co
**For further theme customization, see [Customize a Theme](/themes/customizing/).** **For further theme customization, see [Customize a Theme](/themes/customizing/).**
### Step 7: Build static pages
It is simple. Just call:
```
hugo
```
Output will be in `./public/` directory by default (`-d`/`--destination` flag to change it, or set `publishdir` in the config file).

View file

@ -4,7 +4,7 @@ linktitle: Host on GitHub
description: Deploy Hugo as a GitHub Pages project or personal/organizational site and automate the whole process with a simple shell script. description: Deploy Hugo as a GitHub Pages project or personal/organizational site and automate the whole process with a simple shell script.
date: 2014-03-21 date: 2014-03-21
publishdate: 2014-03-21 publishdate: 2014-03-21
lastmod: 2017-03-30 lastmod: 2018-09-22
categories: [hosting and deployment] categories: [hosting and deployment]
keywords: [github,git,deployment,hosting] keywords: [github,git,deployment,hosting]
authors: [Spencer Lyon, Gunnar Morling] authors: [Spencer Lyon, Gunnar Morling]
@ -54,15 +54,15 @@ This is a much simpler setup as your Hugo files and generated content are publis
1. Create a `<YOUR-PROJECT>` (e.g. `blog`) repository on GitHub. This repository will contain Hugo's content and other source files. 1. Create a `<YOUR-PROJECT>` (e.g. `blog`) repository on GitHub. This repository will contain Hugo's content and other source files.
2. Create a `<USERNAME>.github.io` GitHub repository. This is the repository that will contain the fully rendered version of your Hugo website. 2. Create a `<USERNAME>.github.io` GitHub repository. This is the repository that will contain the fully rendered version of your Hugo website.
3. `git clone <YOUR-PROJECT-URL> && cd <YOUR-PROJECT>` 3. `git clone <YOUR-PROJECT-URL> && cd <YOUR-PROJECT>`
4. Make your website work locally (`hugo server` or `hugo server -t <YOURTHEME>`) and open your browser to <http://localhost:1313>. 4. Paste your existing Hugo project into a new local `<YOUR-PROJECT>` repository. Make sure your website works locally (`hugo server` or `hugo server -t <YOURTHEME>`) and open your browser to <http://localhost:1313>.
5. Once you are happy with the results: 5. Once you are happy with the results:
* Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to kill the server * Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to kill the server
* `rm -rf public` to completely remove the `public` directory * Before proceeding run `rm -rf public` to completely remove the `public` directory
6. `git submodule add -b master git@github.com:<USERNAME>/<USERNAME>.github.io.git public`. This creates a git [submodule][]. Now when you run the `hugo` command to build your site to `public`, the created `public` directory will have a different remote origin (i.e. hosted GitHub repository). You can automate some of these steps with the following script. 6. `git submodule add -b master git@github.com:<USERNAME>/<USERNAME>.github.io.git public`. This creates a git [submodule][]. Now when you run the `hugo` command to build your site to `public`, the created `public` directory will have a different remote origin (i.e. hosted GitHub repository).
### Put it Into a Script ### Put it Into a Script
You're almost done. You can also add a `deploy.sh` script to automate the preceding steps for you. You can also make it executable with `chmod +x deploy.sh`. You're almost done. In order to automate next steps create a `deploy.sh` script. You can also make it executable with `chmod +x deploy.sh`.
The following are the contents of the `deploy.sh` script: The following are the contents of the `deploy.sh` script:
@ -193,11 +193,7 @@ To automate these steps, you can create a script with the following contents:
{{< code file="publish_to_ghpages.sh" >}} {{< code file="publish_to_ghpages.sh" >}}
#!/bin/sh #!/bin/sh
DIR=$(dirname "$0") if [ "`git status -s`" ]
cd $DIR/..
if [[ $(git status -s) ]]
then then
echo "The working directory is dirty. Please commit any pending changes." echo "The working directory is dirty. Please commit any pending changes."
exit 1; exit 1;
@ -220,9 +216,12 @@ hugo
echo "Updating gh-pages branch" echo "Updating gh-pages branch"
cd public && git add --all && git commit -m "Publishing to gh-pages (publish.sh)" cd public && git add --all && git commit -m "Publishing to gh-pages (publish.sh)"
#echo "Pushing to github"
#git push --all
{{< /code >}} {{< /code >}}
This will abort if there are pending changes in the working directory and also makes sure that all previously existing output files are removed. Adjust the script to taste, e.g. to include the final push to the remote repository if you don't need to take a look at the gh-pages branch before pushing. Or adding `echo yourdomainname.com >> CNAME` if you set up for your gh-pages to use customize domain. This will abort if there are pending changes in the working directory and also makes sure that all previously existing output files are removed. Adjust the script to taste, e.g. to include the final push to the remote repository if you don't need to take a look at the gh-pages branch before pushing.
### Deployment of Project Pages from Your `master` Branch ### Deployment of Project Pages from Your `master` Branch

View file

@ -0,0 +1,93 @@
---
title: Host on Render
linktitle: Host on Render
description: Host your Hugo site for free with Render's global CDN, fully-managed SSL and auto deploys from GitHub.
date: 2019-06-06
publishdate: 2019-06-06
lastmod: 2019-06-21
categories: [hosting and deployment]
keywords: [render,hosting,deployment]
authors: [Anurag Goel]
menu:
docs:
parent: "hosting-and-deployment"
weight: 10
weight: 10
sections_weight: 10
draft: false
aliases: []
toc: true
---
## Introduction
[Render](https://render.com) is a fully-managed cloud platform where you can host static sites, backend APIs, databases, cron jobs, and all your other apps in one place.
Static sites are **completely free** on Render and include the following:
- Continuous, automatic builds & deploys from GitHub.
- Automatic SSL certificates through [Let's Encrypt](https://letsencrypt.org).
- Instant cache invalidation with a lightning fast, global CDN.
- Unlimited collaborators.
- Unlimited [custom domains](https://render.com/docs/custom-domains).
- Automatic [Brotli compression](https://en.wikipedia.org/wiki/Brotli) for faster sites.
- Native HTTP/2 support.
- [Pull Request Previews](https://render.com/docs/pull-request-previews).
- Automatic HTTP → HTTPS redirects.
- Custom URL redirects and rewrites.
## Assumptions
* You have an account with GitHub.
* 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.
## Deployment
You can set up a Hugo site on Render in two quick steps:
1. Create a new **Web Service** on Render, and give Render permission to access your GitHub repo.
2. Use the following values during creation:
Field | Value
------------------- | -------------------
**Environment** | `Static Site`
**Build Command** | `hugo --gc --minify` (or our own build command)
**Publish Directory** | `public` (or your own output directory)
That's it! Your site will be live on your Render URL (which looks like `yoursite.onrender.com`) as soon as the build is done.
## Continuous Deploys
Now that Render is connected to your repo, it will **automatically build and publish your site** any time you push to GitHub.
You can choose to disable auto deploys under the **Settings** section for your site and deploy it manually from the Render dashboard.
## CDN and Cache Invalidation
Render hosts your site on a global, lightning fast CDN which ensures the fastest possible download times for all your users across the globe.
Every deploy automatically and instantly invalidates the CDN cache, so your users can always access the latest content on your site.
## Custom Domains
Add your own domains to your site easily using Render's [custom domains](https://render.com/docs/custom-domains) guide.
## Pull Request Previews
With Pull Request (PR) previews, you can visualize changes introduced in a pull request instead of simply relying on code reviews.
Once enabled, every PR for your site will automatically generate a new static site based on the code in the PR. It will have its own URL, and it will be deleted automatically when the PR is closed.
Read more about [Pull Request Previews](https://render.com/docs/pull-request-previews) on Render.
## Hugo Themes
Render automatically downloads all Git submodules defined in your Git repo on every build. This way Hugo themes added as submodules work as expected.
## Support
Chat with Render developers at https://render.com/chat or email `support@render.com` if you need help.
[Quick Start]: /getting-started/quick-start/

View file

@ -16,7 +16,7 @@ draft: false
--- ---
Fingerprinting and [SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) can be applied to any asset file using `resources.Fingerpint` which takes two arguments, the resource object and a [hash function](https://en.wikipedia.org/wiki/Cryptographic_hash_function). Fingerprinting and [SRI](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) can be applied to any asset file using `resources.Fingerprint` which takes two arguments, the resource object and a [hash function](https://en.wikipedia.org/wiki/Cryptographic_hash_function).
The default hash function is `sha256`. Other available functions are `sha384` (from Hugo `0.55`), `sha512` and `md5`. The default hash function is `sha256`. Other available functions are `sha384` (from Hugo `0.55`), `sha512` and `md5`.

View file

@ -30,7 +30,7 @@ Hugo also depends on a lot of other great projects. A big thanks to all of our d
- New template functions: - New template functions:
- `getenv` - `getenv`
- The string functions `substr` and `slicestr` - The string functions `substr` and `slicestr`
*`seq`, a sequence generator very similar to its Gnu countepart *`seq`, a sequence generator very similar to its Gnu counterpart
- `absURL` and `relURL`, both of which takes the `BaseURL` setting into account - `absURL` and `relURL`, both of which takes the `BaseURL` setting into account
## Improvements ## Improvements

View file

@ -6,7 +6,7 @@ description: "Configurable file caches, inline shortcodes, and more ..."
categories: ["Releases"] categories: ["Releases"]
--- ---
The two big new items in this release is [Inline Shortcodes](https://gohugo.io//templates/shortcode-templates/#inline-shortcodes) and [Consolidated File Caches](https://gohugo.io/getting-started/configuration/#configure-file-caches). In Hugo we really care about build speed, and caching is important. With this release, you get much better control over your cache configuration, which is especially useful when building on a Continous Integration server (Netlify, CircleCI or similar). Inline Shortcodes was implemented to help the Bootstrap project [move their documentation site](https://github.com/twbs/bootstrap/issues/24475#issuecomment-441238128) to Hugo. Note that this feature is disabled by default. To enable, set `enableInlineShortcodes = true` in your site config. Worth mentioning is also the new `param` shortcode, which looks up the param in page front matter with the site's parameter as a fall back. The two big new items in this release is [Inline Shortcodes](https://gohugo.io//templates/shortcode-templates/#inline-shortcodes) and [Consolidated File Caches](https://gohugo.io/getting-started/configuration/#configure-file-caches). In Hugo we really care about build speed, and caching is important. With this release, you get much better control over your cache configuration, which is especially useful when building on a Continuous Integration server (Netlify, CircleCI or similar). Inline Shortcodes was implemented to help the Bootstrap project [move their documentation site](https://github.com/twbs/bootstrap/issues/24475#issuecomment-441238128) to Hugo. Note that this feature is disabled by default. To enable, set `enableInlineShortcodes = true` in your site config. Worth mentioning is also the new `param` shortcode, which looks up the param in page front matter with the site's parameter as a fall back.
This release represents **33 contributions by 7 contributors** to the main Hugo code base. This release represents **33 contributions by 7 contributors** to the main Hugo code base.
[@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@moorereason](https://github.com/moorereason), [@emirb](https://github.com/emirb), and [@allizad](https://github.com/allizad) for their ongoing contributions. [@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@moorereason](https://github.com/moorereason), [@emirb](https://github.com/emirb), and [@allizad](https://github.com/allizad) for their ongoing contributions.
@ -72,8 +72,3 @@ Hugo now has:
* Fix when only shortcode and then summary [94ab125b](https://github.com/gohugoio/hugo/commit/94ab125b27a29a65e5ea45efd99dd247084b4c37) [@bep](https://github.com/bep) [#5464](https://github.com/gohugoio/hugo/issues/5464) * Fix when only shortcode and then summary [94ab125b](https://github.com/gohugoio/hugo/commit/94ab125b27a29a65e5ea45efd99dd247084b4c37) [@bep](https://github.com/bep) [#5464](https://github.com/gohugoio/hugo/issues/5464)
* Fix ignored --config flag with 'new' command [e82b2dc8](https://github.com/gohugoio/hugo/commit/e82b2dc8c1628f2da33e5fb0bae1b03e0594ad2c) [@krisbudhram](https://github.com/krisbudhram) * Fix ignored --config flag with 'new' command [e82b2dc8](https://github.com/gohugoio/hugo/commit/e82b2dc8c1628f2da33e5fb0bae1b03e0594ad2c) [@krisbudhram](https://github.com/krisbudhram)
* Fix Permalink for resource, baseURL with path and canonifyURLs set [5df2b79d](https://github.com/gohugoio/hugo/commit/5df2b79dd2734e9a00ed1692328f58c385676468) [@bep](https://github.com/bep) [#5226](https://github.com/gohugoio/hugo/issues/5226) * Fix Permalink for resource, baseURL with path and canonifyURLs set [5df2b79d](https://github.com/gohugoio/hugo/commit/5df2b79dd2734e9a00ed1692328f58c385676468) [@bep](https://github.com/bep) [#5226](https://github.com/gohugoio/hugo/issues/5226)

View file

@ -13,7 +13,7 @@ Swiss [Arolla campsite](http://www.camping-arolla.com/) runs the highest campsit
But they just launch a brand new offer (luxury tents with bed and fire oven), and we couldn't wait for the proper new website for having this promoted: we needed the website up and running within 24h! But they just launch a brand new offer (luxury tents with bed and fire oven), and we couldn't wait for the proper new website for having this promoted: we needed the website up and running within 24h!
So we decided to quickly launch a dedicated [independant web site](https://www.cocoon-arolla.com) using all the powefull tools included with [gohugo.io](http://gohugo.io) and some things we already knew & used: So we decided to quickly launch a dedicated [independent web site](https://www.cocoon-arolla.com) using all the powefull tools included with [gohugo.io](http://gohugo.io) and some things we already knew & used:
- Choose a spectacular landing theme in the rich [Hugo Themes](http://themes.gohugo.io/) collection : [Airspace Theme](https://themes.gohugo.io/airspace-hugo/) by Themefisher. - Choose a spectacular landing theme in the rich [Hugo Themes](http://themes.gohugo.io/) collection : [Airspace Theme](https://themes.gohugo.io/airspace-hugo/) by Themefisher.
- Replace the main images. - Replace the main images.
@ -27,4 +27,4 @@ So we decided to quickly launch a dedicated [independant web site](https://www.c
The first version was up in 4 hours, and the polished 2 languages version was published on Netlify the next day. The first version was up in 4 hours, and the polished 2 languages version was published on Netlify the next day.
This would have been impossible to do it in such a short time without all the powerfull Hugo tools and Netlify simplicity. This would have been impossible to do it in such a short time without all the powerful Hugo tools and Netlify simplicity.

View file

@ -0,0 +1,6 @@
Bypass Censorship find and promote tools that provide Internet access to everyone.
The site is built by:
* [Leyla Avsar](https://www.leylaavsar.com/) (designer)
* [Fredrik Jonsson](https://xdeb.net/) (dev)

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

View file

@ -0,0 +1,24 @@
---
title: Bypass Censorship
date: 2019-06-16
description: "Showcase: Bypass Censorship find and promote tools that provide Internet access to everyone."
siteURL: https://www.bypasscensorship.org/
byline: "[Fredrik Jonsson](https://xdeb.net/), Web developer & Linux sysadmin"
---
The British Broadcasting Corporation (BBC) (UK), Deutsche Welle (DW) (Germany), France Médias Monde (FMM) (France), the U.S. Agency for Global Media (USAGM) (US) and the Open Technology Fund (OTF) (US) co-sponsor the Bypass Censorship website.
Websites of international news agencies are often blocked in many countries. In order to connect people to these sites, Bypass Censorship feature and recommend tools in the following languages: English, French, Spanish, Arabic, Farsi, Chinese, and Russian.
One of the tools is the Bypass Censorship Extension for Firefox and Chrome. The extension help direct people to mirrors of partners sites if they are being censored.
The first version of the site was built in Drupal 8 but it was relaunched as a static site built with Hugo in 2019.
Security, page load time and easy of hosting is the main reasons for switching to a static site. As the lead developer I had good experience with Hugo and was interested in exploring the multilingual features.
It's a simply site, basically one page in seven languages. I had no problems getting Hugo to output what I wanted. Found the multilingual support straight forward and easy to work with.
Thanks to the design by [Leyla Avsar](https://www.leylaavsar.com/) the site also looks good. I used the [Hugo Zen theme](https://github.com/frjo/hugo-theme-zen) with a few custom templates and the needed CSS.
The editors can maintain content via [Forestry.io CMS](https://forestry.io/) or directly via Git. Forestry does unfortunately not have multilingual support. All the language versions are in one pile making it harder to find the right file to edit, but it works.

View file

@ -1,4 +1,4 @@
PHARMASEAL began in 2016 with the purpose of disrupting the Clinical Trials Management market through continuos validation and intergration PHARMASEAL began in 2016 with the purpose of disrupting the Clinical Trials Management market through continuous validation and integration
We've been using **Hugo + Webpack + Netlify** to provide a scalable, modular design for the website, complete with Forestry building blocks to quickly be able to generate engagement pages. We've been using **Hugo + Webpack + Netlify** to provide a scalable, modular design for the website, complete with Forestry building blocks to quickly be able to generate engagement pages.

View file

@ -53,6 +53,7 @@ Your 404.html file can be set to load automatically when a visitor enters a mist
* Amazon CloudFont. You can specify the page in the Error Pages section in the CloudFont Console. [Details here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html) * Amazon CloudFont. You can specify the page in the Error Pages section in the CloudFont Console. [Details here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/custom-error-pages.html)
* Caddy Server. Using `errors { 404 /404.html }`. [Details here](https://caddyserver.com/docs/errors) * Caddy Server. Using `errors { 404 /404.html }`. [Details here](https://caddyserver.com/docs/errors)
* Netlify. Add `/* /404.html 404` to `content/_redirects`. [Details Here](https://www.netlify.com/docs/redirects/#custom-404) * Netlify. Add `/* /404.html 404` to `content/_redirects`. [Details Here](https://www.netlify.com/docs/redirects/#custom-404)
* Azure Static website. You can specify the `Error document path` in the Static website configuration page of the Azure portal. [More details are available in the Static website documentation](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website).
{{% note %}} {{% note %}}
`hugo server` will not automatically load your custom `404.html` file, but you `hugo server` will not automatically load your custom `404.html` file, but you

View file

@ -137,7 +137,7 @@ description = "Text about this post"
date = "2006-01-02" date = "2006-01-02"
images = ["post-cover.png"] images = ["post-cover.png"]
audio = [] audio = []
video = [] videos = []
series = [] series = []
tags = [] tags = []
{{</ code-toggle >}} {{</ code-toggle >}}
@ -146,11 +146,14 @@ Hugo uses the page title and description for the title and description metadata.
The first 6 URLs from the `images` array are used for image metadata. The first 6 URLs from the `images` array are used for image metadata.
Various optional metadata can also be set: Various optional metadata can also be set:
- Date, published date, and last modified data are used to set the published time metadata if specified. - Date, published date, and last modified data are used to set the published time metadata if specified.
- `audio` and `video` are URL arrays like `images` for the audio and video metadata tags, respectively. - `audio` and `videos` are URL arrays like `images` for the audio and video metadata tags, respectively.
- The first 6 `tags` on the page are used for the tags metadata. - The first 6 `tags` on the page are used for the tags metadata.
- The `series` taxonomy is used to specify related "see also" pages by placing them in the same series. - The `series` taxonomy is used to specify related "see also" pages by placing them in the same series.
If using YouTube this will produce a og:video tag like `<meta property="og:video" content="url">`. If using a YouTube link make sure this is in **https://www.youtube.com/v/NlXVWtgLNjY** not __https://www.youtube.com/watch?v=NlXVWtgLNjY__
### Use the Open Graph Template ### Use the Open Graph Template
To add Open Graph metadata, include the following line between the `<head>` tags in your templates: To add Open Graph metadata, include the following line between the `<head>` tags in your templates:
@ -160,6 +163,7 @@ To add Open Graph metadata, include the following line between the `<head>` tags
``` ```
## Twitter Cards ## Twitter Cards
An internal template for [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards), An internal template for [Twitter Cards](https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/abouts-cards),
metadata used to attach rich media to Tweets linking to your site. metadata used to attach rich media to Tweets linking to your site.

View file

@ -170,7 +170,7 @@ 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 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>" . }}`.
@ -235,7 +235,7 @@ key.
#### 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 statment is evaluated. If the _map_, _array_, or _slice_ passed into the range is zero-length then the else statement is evaluated.
```go-html-template ```go-html-template
{{ range $array }} {{ range $array }}

View file

@ -35,7 +35,7 @@ For template lookup order, see [Template Lookup](/templates/lookup-order/).
The idea of a list page comes from the [hierarchical mental model of the web][mentalmodel] and is best demonstrated visually: The idea of a list page comes from the [hierarchical mental model of the web][mentalmodel] and is best demonstrated visually:
![Image demonstrating a hierarchical website sitemap.](/images/site-hierarchy.svg) [![Image demonstrating a hierarchical website sitemap.](/images/site-hierarchy.svg)](/images/site-hierarchy.svg)
## List Defaults ## List Defaults

View file

@ -65,7 +65,7 @@ The following is an example:
{{< /code >}} {{< /code >}}
{{% note "`absLangURL` and `relLangURL`" %}} {{% note "`absLangURL` and `relLangURL`" %}}
Use the [`absLangUrl`](/functions/abslangurl) or [`relLangUrl`](/functions/rellangurl) functions if your theme makes use of the [multilingual feature](/content-management/multilingual/). In contrast to `absURL` and `relURL`, these two functions add the correct language prefix to the url. Use the [`absLangURL`](/functions/abslangurl) or [`relLangURL`](/functions/rellangurl) functions if your theme makes use of the [multilingual feature](/content-management/multilingual/). In contrast to `absURL` and `relURL`, these two functions add the correct language prefix to the url.
{{% /note %}} {{% /note %}}
## Section Menu for Lazy Bloggers ## Section Menu for Lazy Bloggers

View file

@ -47,7 +47,7 @@ To add or modify a media type, define it in a `mediaTypes` section in your [site
The above example adds one new media type, `text/enriched`, and changes the suffix for the built-in `text/html` media type. The above example adds one new media type, `text/enriched`, and changes the suffix for the built-in `text/html` media type.
**Note:** these media types are configured for **your output formats**. If you want to redefine one of Hugo's default output formats (e.g. `HTML`), you also need to redefine the output format. So, if you want to change the suffix of the `HTML` output format from `html` (default) to `htm`: **Note:** these media types are configured for **your output formats**. If you want to redefine one of Hugo's default output formats (e.g. `HTML`), you also need to redefine the media type. So, if you want to change the suffix of the `HTML` output format from `html` (default) to `htm`:
```toml ```toml
[mediaTypes] [mediaTypes]

View file

@ -58,6 +58,7 @@ copyright = "This work is licensed under a Creative Commons Attribution-ShareAli
This is the default RSS template that ships with Hugo. It adheres to the [RSS 2.0 Specification][RSS 2.0]. This is the default RSS template that ships with Hugo. It adheres to the [RSS 2.0 Specification][RSS 2.0].
```xml ```xml
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
@ -86,13 +87,6 @@ This is the default RSS template that ships with Hugo. It adheres to the [RSS 2.
</rss> </rss>
``` ```
{{% warning "XML Header" %}}
Hugo will automatically add the following header line to this file on render. Please do *not* include this in the template as it's not valid HTML.
```
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
```
{{% /warning %}}
## Reference your RSS Feed in `<head>` ## Reference your RSS Feed in `<head>`
In your `header.html` template, you can specify your RSS feed in your `<head></head>` tag using Hugo's [Output Formats][Output Formats] like this: In your `header.html` template, you can specify your RSS feed in your `<head></head>` tag using Hugo's [Output Formats][Output Formats] like this:

View file

@ -46,6 +46,7 @@ For multilingual sites, we also create a Sitemap index. You can provide a custom
This template respects the version 0.9 of the [Sitemap Protocol](http://www.sitemaps.org/protocol.html). This template respects the version 0.9 of the [Sitemap Protocol](http://www.sitemaps.org/protocol.html).
```xml ```xml
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xhtml="http://www.w3.org/1999/xhtml"> xmlns:xhtml="http://www.w3.org/1999/xhtml">
{{ range .Data.Pages }} {{ range .Data.Pages }}
@ -69,18 +70,12 @@ This template respects the version 0.9 of the [Sitemap Protocol](http://www.site
</urlset> </urlset>
``` ```
{{% note %}}
Hugo will automatically add the following header line to this file
on render. Please don't include this in the template as it's not valid HTML.
`<?xml version="1.0" encoding="utf-8" standalone="yes" ?>`
{{% /note %}}
## Hugo's sitemapindex.xml ## Hugo's sitemapindex.xml
This is used to create a Sitemap index in multilingual mode: This is used to create a Sitemap index in multilingual mode:
```xml ```xml
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{ range . }} {{ range . }}
<sitemap> <sitemap>

View file

@ -19,6 +19,11 @@ toc: false
wip: false wip: false
--- ---
{{% warning "Deprecated" %}}
Page's `.Hugo` is deprecated and will be removed in a future release. Use the global `hugo` function.
For example: `hugo.Generator`.
{{% /warning %}}
It contains the following fields: It contains the following fields:
.Hugo.Generator .Hugo.Generator

View file

@ -84,7 +84,7 @@ entries, if any, under the current menu entry.
Menus also have the following functions available: Menus also have the following functions available:
[.HasChildren](/functions/haschildren/) .HasChildren
: _boolean_ <br /> : _boolean_ <br />
Returns `true` if `.Children` is non-nil. Returns `true` if `.Children` is non-nil.

View file

@ -30,6 +30,9 @@ See [`.Scratch`](/functions/scratch/) for page-scoped, writable variables.
.AlternativeOutputFormats .AlternativeOutputFormats
: contains all alternative formats for a given page; this variable is especially useful `link rel` list in your site's `<head>`. (See [Output Formats](/templates/output-formats/).) : contains all alternative formats for a given page; this variable is especially useful `link rel` list in your site's `<head>`. (See [Output Formats](/templates/output-formats/).)
.Aliases
: aliases of this page
.Content .Content
: the content itself, defined below the front matter. : the content itself, defined below the front matter.
@ -133,6 +136,9 @@ http://remarkjs.com)
.ReadingTime .ReadingTime
: the estimated time, in minutes, it takes to read the content. : the estimated time, in minutes, it takes to read the content.
.Resources
: resources such as images and CSS that are associated with this page
.Ref .Ref
: returns the permalink for a given reference (e.g., `.Ref "sample.md"`). `.Ref` does *not* handle in-page fragments correctly. See [Cross References](/content-management/cross-references/). : returns the permalink for a given reference (e.g., `.Ref "sample.md"`). `.Ref` does *not* handle in-page fragments correctly. See [Cross References](/content-management/cross-references/).
@ -164,6 +170,9 @@ http://remarkjs.com)
.Translations .Translations
: a list of translated versions of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information. : a list of translated versions of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information.
.TranslationKey
: the key used to map language translations of the current page. See [Multilingual Mode](/content-management/multilingual/) for more information.
.Truncated .Truncated
: a boolean, `true` if the `.Summary` is truncated. Useful for showing a "Read more..." link only when necessary. See [Summaries](/content-management/summaries/) for more information. : a boolean, `true` if the `.Summary` is truncated. Useful for showing a "Read more..." link only when necessary. See [Summaries](/content-management/summaries/) for more information.

View file

@ -12,7 +12,7 @@
{{ end }} {{ end }}
{{ $image := .Scratch.Get "image" }} {{ $image := .Scratch.Get "image" }}
<figure style="padding: 0.25rem; margin: 2rem 0; background-color: #cccc"> <figure style="padding: 0.25rem; margin: 2rem 0; background-color: #cccc">
<img style="max-width: 100%; height: auto;" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}"> <img style="max-width: 100%; width: auto; height: auto;" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
<figcaption> <figcaption>
<small> <small>
{{ with .Inner }} {{ with .Inner }}

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

View file

@ -3,9 +3,9 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
{{/* https://www.zachleat.com/web/preload/ */}} {{/* https://www.zachleat.com/web/preload/ */}}
<link rel="preload" href="{{ "files/muli-latin-200.woff2" | absURL }}" as="font" type="font/woff2" crossorigin> <link rel="preload" href="{{ "fonts/muli-latin-200.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "files/muli-latin-400.woff2" | absURL }}" as="font" type="font/woff2" crossorigin> <link rel="preload" href="{{ "fonts/muli-latin-400.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "files/muli-latin-800.woff2" | absURL }}" as="font" type="font/woff2" crossorigin> <link rel="preload" href="{{ "fonts/muli-latin-800.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
{{/* NOTE: the Site's title, and if there is a page title, that is set too */}} {{/* NOTE: the Site's title, and if there is a page title, that is set too */}}

View file

@ -431,7 +431,7 @@
}, },
"util": { "util": {
"version": "0.10.3", "version": "0.10.3",
"resolved": "http://registry.npmjs.org/util/-/util-0.10.3.tgz", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -516,7 +516,7 @@
}, },
"chalk": { "chalk": {
"version": "1.1.3", "version": "1.1.3",
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -529,7 +529,7 @@
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -1119,7 +1119,7 @@
}, },
"color": { "color": {
"version": "0.11.4", "version": "0.11.4",
"resolved": "http://registry.npmjs.org/color/-/color-0.11.4.tgz", "resolved": "https://registry.npmjs.org/color/-/color-0.11.4.tgz",
"integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=", "integrity": "sha1-bXtcdPtl6EHNSHkq0e1eB7kE12Q=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2236,7 +2236,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
@ -2257,12 +2258,14 @@
"balanced-match": { "balanced-match": {
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
@ -2277,17 +2280,20 @@
"code-point-at": { "code-point-at": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"console-control-strings": { "console-control-strings": {
"version": "1.1.0", "version": "1.1.0",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -2404,7 +2410,8 @@
"inherits": { "inherits": {
"version": "2.0.3", "version": "2.0.3",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"ini": { "ini": {
"version": "1.3.5", "version": "1.3.5",
@ -2416,6 +2423,7 @@
"version": "1.0.0", "version": "1.0.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"number-is-nan": "^1.0.0" "number-is-nan": "^1.0.0"
} }
@ -2430,6 +2438,7 @@
"version": "3.0.4", "version": "3.0.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
@ -2437,12 +2446,14 @@
"minimist": { "minimist": {
"version": "0.0.8", "version": "0.0.8",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"minipass": { "minipass": {
"version": "2.2.4", "version": "2.2.4",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"safe-buffer": "^5.1.1", "safe-buffer": "^5.1.1",
"yallist": "^3.0.0" "yallist": "^3.0.0"
@ -2461,6 +2472,7 @@
"version": "0.5.1", "version": "0.5.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"minimist": "0.0.8" "minimist": "0.0.8"
} }
@ -2541,7 +2553,8 @@
"number-is-nan": { "number-is-nan": {
"version": "1.0.1", "version": "1.0.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"object-assign": { "object-assign": {
"version": "4.1.1", "version": "4.1.1",
@ -2553,6 +2566,7 @@
"version": "1.4.0", "version": "1.4.0",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
@ -2638,7 +2652,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
@ -2674,6 +2689,7 @@
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"code-point-at": "^1.0.0", "code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",
@ -2693,6 +2709,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
@ -2736,12 +2753,14 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
} }
} }
}, },
@ -3502,9 +3521,9 @@
"dev": true "dev": true
}, },
"js-yaml": { "js-yaml": {
"version": "3.12.0", "version": "3.13.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"dev": true, "dev": true,
"requires": { "requires": {
"argparse": "^1.0.7", "argparse": "^1.0.7",
@ -3665,12 +3684,12 @@
"dev": true "dev": true
}, },
"lodash.template": { "lodash.template": {
"version": "4.4.0", "version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz", "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz",
"integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=", "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==",
"dev": true, "dev": true,
"requires": { "requires": {
"lodash._reinterpolate": "~3.0.0", "lodash._reinterpolate": "^3.0.0",
"lodash.templatesettings": "^4.0.0" "lodash.templatesettings": "^4.0.0"
} }
}, },
@ -4846,7 +4865,7 @@
"dependencies": { "dependencies": {
"color": { "color": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "http://registry.npmjs.org/color/-/color-1.0.3.tgz", "resolved": "https://registry.npmjs.org/color/-/color-1.0.3.tgz",
"integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=", "integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -4927,7 +4946,7 @@
"dependencies": { "dependencies": {
"color": { "color": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "http://registry.npmjs.org/color/-/color-1.0.3.tgz", "resolved": "https://registry.npmjs.org/color/-/color-1.0.3.tgz",
"integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=", "integrity": "sha1-5I6DLYXxTvaU+0aIEcLVz+cptV0=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -6038,7 +6057,7 @@
"dependencies": { "dependencies": {
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true "dev": true
} }
@ -6112,7 +6131,7 @@
}, },
"reduce-css-calc": { "reduce-css-calc": {
"version": "1.3.0", "version": "1.3.0",
"resolved": "http://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz", "resolved": "https://registry.npmjs.org/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz",
"integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=", "integrity": "sha1-dHyRTgSWFKTJz7umKYca0dKSdxY=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -7547,7 +7566,7 @@
}, },
"strip-ansi": { "strip-ansi": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -7605,7 +7624,7 @@
}, },
"yargs": { "yargs": {
"version": "1.2.6", "version": "1.2.6",
"resolved": "http://registry.npmjs.org/yargs/-/yargs-1.2.6.tgz", "resolved": "https://registry.npmjs.org/yargs/-/yargs-1.2.6.tgz",
"integrity": "sha1-nHtKgv1dWVsr8Xq23MQxNUMv40s=", "integrity": "sha1-nHtKgv1dWVsr8Xq23MQxNUMv40s=",
"dev": true, "dev": true,
"requires": { "requires": {