mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Squashed 'docs/' changes from 211a3c613..3068989b9
3068989b9 Merge commit '7ae9cf2ccb3eecc1ff50f686925249d01cf37c6c' 7ae9cf2cc Squashed 'themes/gohugoioTheme/' changes from d7a475e7..a1768ebb b55157fae Revert "Anchorify headings up to h4" b63dd5566 Anchorify headings up to h4 edfe36a19 Test out trac as highlighter style 98dc8d269 Update multilingual.md a6e4d92c0 Update multilingual.md 86a90edf9 Fix typo 'If will' to 'It will' line 41 6b626fac6 Add a tip for testing custom 404.html on hugo server 6bfc17cfc Update few links to now point to gohugoio organization repos f66bad971 Remove unintended alias 3bc56e9ec Fix shortcode name in example: image -> img 251142388 Fix broken link 27245af6a Fix the minimum required git version for GH Pages flow aefc87b4d Fix link in Forestry showcase 489ec5ea0 Squashed 'themes/gohugoioTheme/' changes from 6f3a8bf5..d7a475e7 308a616fd Merge commit '489ec5ea03799fa092d891838c1655e60b34f337' a80859814 Adjust showcase description git-subtree-dir: docs git-subtree-split: 3068989b9c601146e8e6be8c4e8e2b2c679e5230
This commit is contained in:
parent
3886fc1fef
commit
0a23baa6a9
17 changed files with 40 additions and 34 deletions
|
@ -16,18 +16,18 @@ pluralizeListTitles = false
|
||||||
# We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below).
|
# We do redirects via Netlify's _redirects file, generated by Hugo (see "outputs" below).
|
||||||
disableAliases = true
|
disableAliases = true
|
||||||
|
|
||||||
|
|
||||||
# Highlighting config (Pygments)
|
# Highlighting config (Pygments)
|
||||||
# It is (currently) not in use, but you can do ```go in a content file if you want to.
|
# It is (currently) not in use, but you can do ```go in a content file if you want to.
|
||||||
pygmentsCodeFences = true
|
pygmentsCodeFences = true
|
||||||
|
|
||||||
pygmentsOptions = ""
|
pygmentsOptions = ""
|
||||||
# Use the Chroma stylesheet
|
# Use the Chroma stylesheet
|
||||||
pygmentsUseClasses = true
|
# TODO(bep) build new CSS when we have picked a new style.
|
||||||
|
pygmentsUseClasses = false
|
||||||
pygmentsUseClassic = false
|
pygmentsUseClassic = false
|
||||||
|
|
||||||
# See https://help.farbox.com/pygments.html
|
# See https://help.farbox.com/pygments.html
|
||||||
pygmentsStyle = "friendly"
|
pygmentsStyle = "trac"
|
||||||
|
|
||||||
[outputs]
|
[outputs]
|
||||||
home = [ "HTML", "RSS", "REDIR", "HEADERS" ]
|
home = [ "HTML", "RSS", "REDIR", "HEADERS" ]
|
||||||
|
|
|
@ -29,14 +29,14 @@ This has many benefits. The most noticeable is performance. HTTP servers are *ve
|
||||||
|
|
||||||
* ["An Introduction to Static Site Generators", David Walsh][]
|
* ["An Introduction to Static Site Generators", David Walsh][]
|
||||||
* ["Hugo vs. Wordpress page load speed comparison: Hugo leaves WordPress in its dust", GettingThingsTech][hugovwordpress]
|
* ["Hugo vs. Wordpress page load speed comparison: Hugo leaves WordPress in its dust", GettingThingsTech][hugovwordpress]
|
||||||
* ["Static Site Generators", O-Reilly][]
|
* ["Static Site Generators", O'Reilly][]
|
||||||
* [StaticGen: Top Open-Source Static Site Generators (GitHub Stars)][]
|
* [StaticGen: Top Open-Source Static Site Generators (GitHub Stars)][]
|
||||||
* ["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]: /documents/oreilly-static-site-generators.pdf
|
["Static Site Generators", O'Reilly]: http://www.oreilly.com/web-platform/free/files/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/
|
||||||
[hugovwordpress]: https://gettingthingstech.com/hugo-vs.-wordpress-page-load-speed-comparison-hugo-leaves-wordpress-in-its-dust/
|
[hugovwordpress]: https://gettingthingstech.com/hugo-vs.-wordpress-page-load-speed-comparison-hugo-leaves-wordpress-in-its-dust/
|
||||||
[StaticGen: Top Open-Source Static Site Generators (GitHub Stars)]: https://www.staticgen.com/
|
[StaticGen: Top Open-Source Static Site Generators (GitHub Stars)]: https://www.staticgen.com/
|
||||||
|
|
|
@ -34,16 +34,16 @@ help = "Help"
|
||||||
[languages.en]
|
[languages.en]
|
||||||
title = "My blog"
|
title = "My blog"
|
||||||
weight = 1
|
weight = 1
|
||||||
|
[languages.en.params]
|
||||||
linkedin = "english-link"
|
linkedin = "english-link"
|
||||||
|
|
||||||
[languages.fr]
|
[languages.fr]
|
||||||
copyright = "Tout est à moi"
|
copyright = "Tout est à moi"
|
||||||
title = "Mon blog"
|
title = "Mon blog"
|
||||||
weight = 2
|
weight = 2
|
||||||
|
[languages.fr.params]
|
||||||
linkedin = "lien-francais"
|
linkedin = "lien-francais"
|
||||||
|
[languages.fr.params.navigation]
|
||||||
# skip params key for front matter
|
|
||||||
[languages.fr.navigation]
|
|
||||||
help = "Aide"
|
help = "Aide"
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ A collection of all themes created by the Hugo community, including screenshots
|
||||||
## tl;dr
|
## tl;dr
|
||||||
|
|
||||||
1. Create your theme using `hugo new theme <THEMENAME>`;
|
1. Create your theme using `hugo new theme <THEMENAME>`;
|
||||||
2. Test your theme against <https://github.com/spf13/HugoBasicExample> \*
|
2. Test your theme against <https://github.com/gohugoio/hugoBasicExample> \*
|
||||||
3. Add a `theme.toml` file to the root of the theme with all required metadata
|
3. Add a `theme.toml` file to the root of the theme with all required metadata
|
||||||
4. Add a descriptive `README.md` to the root of the theme source
|
4. Add a descriptive `README.md` to the root of the theme source
|
||||||
5. Add `/images/screenshot.png` and `/images/tn.png`
|
5. Add `/images/screenshot.png` and `/images/tn.png`
|
||||||
|
|
|
@ -15,7 +15,7 @@ workson: []
|
||||||
hugoversion:
|
hugoversion:
|
||||||
relatedfuncs: [countrunes]
|
relatedfuncs: [countrunes]
|
||||||
deprecated: false
|
deprecated: false
|
||||||
aliases: [/functions/countrunes/,/functions/countwords/]
|
aliases: [/functions/countwords/]
|
||||||
---
|
---
|
||||||
|
|
||||||
The template function works similar to the [.WordCount page variable][pagevars].
|
The template function works similar to the [.WordCount page variable][pagevars].
|
||||||
|
|
|
@ -23,7 +23,7 @@ GitHub provides free and fast static hosting over SSL for personal, organization
|
||||||
|
|
||||||
## Assumptions
|
## Assumptions
|
||||||
|
|
||||||
1. You have Git 2.5 or greater [installed on your machine][installgit].
|
1. You have Git 2.8 or greater [installed on your machine][installgit].
|
||||||
2. You have a GitHub account. [Signing up][ghsignup] for GitHub is free.
|
2. You have a GitHub account. [Signing up][ghsignup] for GitHub is free.
|
||||||
3. You have a ready-to-publish Hugo website or have at least completed the [Quick Start][].
|
3. You have a ready-to-publish Hugo website or have at least completed the [Quick Start][].
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
title: Forestry.io
|
title: Forestry.io
|
||||||
date: 2018-03-16
|
date: 2018-03-16
|
||||||
description: "A Git-backed CMS (content management system) for websites and web products built using static site generators."
|
description: "Showcase: \"Seeing Hugo in action is a whole different world of awesome.\""
|
||||||
siteURL: https://forestry.io/
|
siteURL: https://forestry.io/
|
||||||
siteSource: https://github.com/forestryio/forestry.io
|
siteSource: https://github.com/forestryio/forestry.io
|
||||||
---
|
---
|
||||||
|
@ -40,7 +40,7 @@ Lastly, we want to take the opportunity to give some love to other amazing tools
|
||||||
* [**Hugo**](https://gohugo.io/) -- of course.
|
* [**Hugo**](https://gohugo.io/) -- of course.
|
||||||
* Chris can’t think of modern web development without [**Gulp**](https://gulpjs.com/) & [**Webpack**](https://webpack.js.org/). We used them to add additional build steps such as Browsersync, CSS, JS and SVG optimization.
|
* Chris can’t think of modern web development without [**Gulp**](https://gulpjs.com/) & [**Webpack**](https://webpack.js.org/). We used them to add additional build steps such as Browsersync, CSS, JS and SVG optimization.
|
||||||
* Speaking about adding steps to our build, our lives would be much harder without [**CircleCI**](https://circleci.com/) for continuous deployment and automated testing purposes.
|
* Speaking about adding steps to our build, our lives would be much harder without [**CircleCI**](https://circleci.com/) for continuous deployment and automated testing purposes.
|
||||||
* We can’t stop raving about [**Algolia**](https://www.algolia.com/). Chris loves it and even wrote a tutorial on [how to implement Algolia]([https://forestry.io/blog/search-with-algolia-in-hugo/) into static sites using Hugo’s [Custom Outputs](https://gohugo.io/templates/output-formats/).
|
* We can’t stop raving about [**Algolia**](https://www.algolia.com/). Chris loves it and even wrote a tutorial on [how to implement Algolia](https://forestry.io/blog/search-with-algolia-in-hugo/) into static sites using Hugo’s [Custom Outputs](https://gohugo.io/templates/output-formats/).
|
||||||
* [**Cloudinary**](https://cloudinary.com/) is probably one of the easiest ways to get responsive images into your website.
|
* [**Cloudinary**](https://cloudinary.com/) is probably one of the easiest ways to get responsive images into your website.
|
||||||
* We might be a little biased on this one - We think [**Forestry.io**](https://forestry.io/) is a great way to add a content management system with a clean UI on top of your site without interrupting your experience as a developer.
|
* We might be a little biased on this one - We think [**Forestry.io**](https://forestry.io/) is a great way to add a content management system with a clean UI on top of your site without interrupting your experience as a developer.
|
||||||
* For hosting purposes we use the almighty [**AWS**](https://aws.amazon.com/).
|
* For hosting purposes we use the almighty [**AWS**](https://aws.amazon.com/).
|
||||||
|
|
|
@ -52,4 +52,10 @@ Your 404.html file can be set to load automatically when a visitor enters a mist
|
||||||
* Amazon AWS S3. When setting a bucket up for static web serving, you can specify the error file from within the S3 GUI.
|
* Amazon AWS S3. When setting a bucket up for static web serving, you can specify the error file from within the S3 GUI.
|
||||||
* 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)
|
||||||
|
|
||||||
[pagevars]: /variables/page/
|
{{% note %}}
|
||||||
|
`hugo server` will not automatically load your custom `404.html` file, but you
|
||||||
|
can test the appearance of your custom "not found" page by navigating your
|
||||||
|
browser to `/404.html`.
|
||||||
|
{{% /note %}}
|
||||||
|
|
||||||
|
[pagevars]: /variables/page/
|
||||||
|
|
|
@ -38,7 +38,7 @@ Layout
|
||||||
: Can be set in page front matter.
|
: Can be set in page front matter.
|
||||||
|
|
||||||
Type
|
Type
|
||||||
: Is value of `type` if set in front matter, else it is the name of the root section (e.g. "blog"). If will always have a value, so if not set, the value is "page".
|
: Is value of `type` if set in front matter, else it is the name of the root section (e.g. "blog"). It will always have a value, so if not set, the value is "page".
|
||||||
|
|
||||||
Section
|
Section
|
||||||
: Is relevant for `section`, `taxonomy` and `taxonomyTerm` types.
|
: Is relevant for `section`, `taxonomy` and `taxonomyTerm` types.
|
||||||
|
|
|
@ -301,9 +301,9 @@ The following example is contrived but demonstrates the concept. Assume you have
|
||||||
</div>
|
</div>
|
||||||
{{< /code >}}
|
{{< /code >}}
|
||||||
|
|
||||||
You also have an `image` shortcode with a single named `src` parameter that you want to call inside of `gallery` and other shortcodes so that the parent defines the context of each `image`:
|
You also have an `img` shortcode with a single named `src` parameter that you want to call inside of `gallery` and other shortcodes, so that the parent defines the context of each `img`:
|
||||||
|
|
||||||
{{< code file="layouts/shortcodes/image.html" >}}
|
{{< code file="layouts/shortcodes/img.html" >}}
|
||||||
{{- $src := .Get "src" -}}
|
{{- $src := .Get "src" -}}
|
||||||
{{- with .Parent -}}
|
{{- with .Parent -}}
|
||||||
<img src="{{$src}}" class="{{.Get "class"}}-image">
|
<img src="{{$src}}" class="{{.Get "class"}}-image">
|
||||||
|
@ -322,7 +322,7 @@ You can then call your shortcode in your content as follows:
|
||||||
{{</* img src="/images/three.jpg" */>}}
|
{{</* img src="/images/three.jpg" */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
This will output the following HTML. Note how the first two `image` shortcodes inherit the `class` value of `content-gallery` set with the call to the parent `gallery`, whereas the third `image` only uses `src`:
|
This will output the following HTML. Note how the first two `img` shortcodes inherit the `class` value of `content-gallery` set with the call to the parent `gallery`, whereas the third `img` only uses `src`:
|
||||||
|
|
||||||
```
|
```
|
||||||
<div class="content-gallery">
|
<div class="content-gallery">
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
{{ if eq (substr . 0 1) "@" }}
|
{{ if eq (substr . 0 1) "@" }}
|
||||||
<a href="//github.com/{{ substr . 1 }}">{{ . }}</a>
|
<a href="//github.com/{{ substr . 1 }}">{{ . }}</a>
|
||||||
{{ else if eq (substr . 0 2) "0x" }}
|
{{ else if eq (substr . 0 2) "0x" }}
|
||||||
<a href="//github.com/spf13/hugo/commit/{{ substr . 2 }}">{{ substr . 2 6 }}</a>
|
<a href="//github.com/gohugoio/hugo/commit/{{ substr . 2 }}">{{ substr . 2 6 }}</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<a href="//github.com/spf13/hugo/issues/{{ . }}">#{{ . }}</a>
|
<a href="//github.com/gohugoio/hugo/issues/{{ . }}">#{{ . }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<form id="site-search-form" action="" role="search">
|
<form id="site-search-form" action="" role="search">
|
||||||
<fieldset class="bn ma0 pa0">
|
<fieldset class="bn ma0 pa0">
|
||||||
<label class="clip" for="email-address">Search</label>
|
<label class="clip" for="search-input">Search</label>
|
||||||
<input type="search" id="search-input" class="needs-js bg-left bg-transparent bn f5 input-reset lh-solid mt3 mt0-ns pl4 pv2 w5 white" placeholder="Search the Docs" type="text" name="email-address" value="" style="background-image:url('/images/icon-search.png');background-size:16px 16px;">
|
<input type="search" id="search-input" class="needs-js bg-left bg-transparent bn f5 input-reset lh-solid mt3 mt0-ns pl4 pv2 w5 white" placeholder="Search the Docs" type="text" name="search-input" value="" style="background-image:url('/images/icon-search.png');background-size:16px 16px;">
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*documentation-copy headings exagerate spacing and size to chunk content */
|
/*documentation-copy headings exaggerate spacing and size to chunk content */
|
||||||
.documentation-copy h2 {
|
.documentation-copy h2 {
|
||||||
margin-top: 3em;
|
margin-top: 3em;
|
||||||
&.minor {
|
&.minor {
|
||||||
|
|
|
@ -27,7 +27,7 @@ document.onreadystatechange = function () {
|
||||||
if (!contentBlock) {
|
if (!contentBlock) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (var level = 2; level <= 2; level++) {
|
for (var level = 2; level <= 4; level++) {
|
||||||
linkifyAnchors(level, contentBlock);
|
linkifyAnchors(level, contentBlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ The contents of this folder are used to generate CSS and javascript. You may nev
|
||||||
|
|
||||||
### NPM
|
### NPM
|
||||||
|
|
||||||
We use [NPM](https://www.npmjs.com/) for package managment The theme's `.gitignore` file should be kept intact to make sure that all files in the `node_modules` folder are not pushed to the repository.
|
We use [NPM](https://www.npmjs.com/) for package management The theme's `.gitignore` file should be kept intact to make sure that all files in the `node_modules` folder are not pushed to the repository.
|
||||||
|
|
||||||
### Webpack
|
### Webpack
|
||||||
|
|
||||||
|
|
14
themes/gohugoioTheme/static/dist/app.bundle.js
vendored
14
themes/gohugoioTheme/static/dist/app.bundle.js
vendored
File diff suppressed because one or more lines are too long
2
themes/gohugoioTheme/static/dist/main.css
vendored
2
themes/gohugoioTheme/static/dist/main.css
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue