mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 22:17:28 +00:00
1 parent
0e0abb171c
commit
d97c7778aa
18 files changed
+101
-75
No files matched your search
@@ -52,7 +52,7 @@ toc: true
|
|||||||
|
|
||||||
See what's coming next in the [Hugo roadmap][].
|
See what's coming next in the [Hugo roadmap][].
|
||||||
|
|
||||||
[Ace]: /templates/ace-templating/
|
[Ace]: /templates/alternatives/
|
||||||
[aliases]: /content-management/urls/#aliases
|
[aliases]: /content-management/urls/#aliases
|
||||||
[Amber]: https://github.com/eknkc/amber
|
[Amber]: https://github.com/eknkc/amber
|
||||||
[content summaries]: /content-management/summaries/
|
[content summaries]: /content-management/summaries/
|
||||||
@@ -68,7 +68,7 @@ See what's coming next in the [Hugo roadmap][].
|
|||||||
[hostanywhere]: /hosting-and-deployment/
|
[hostanywhere]: /hosting-and-deployment/
|
||||||
[Hugo roadmap]: /about/roadmap
|
[Hugo roadmap]: /about/roadmap
|
||||||
[install]: /getting-started/installing/
|
[install]: /getting-started/installing/
|
||||||
[LiveReload]: /getting-started/using-hugo/
|
[LiveReload]: /getting-started/usage/
|
||||||
[organization for your projects]: /getting-started/directory-structure/
|
[organization for your projects]: /getting-started/directory-structure/
|
||||||
[pagevars]: /variables/page/
|
[pagevars]: /variables/page/
|
||||||
[Permalink]: /content-management/urls/#permalinks
|
[Permalink]: /content-management/urls/#permalinks
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ The preceding archetype is kept up to date with every Hugo build by using Hugo's
|
|||||||
[archetypes directory]: /getting-started/directory-structure/
|
[archetypes directory]: /getting-started/directory-structure/
|
||||||
[`now()`]: http://golang.org/pkg/time/#Now
|
[`now()`]: http://golang.org/pkg/time/#Now
|
||||||
[configuration file]: /getting-started/configuration/
|
[configuration file]: /getting-started/configuration/
|
||||||
[sections]: /sections/
|
[sections]: /content-management/sections/
|
||||||
[content types]: /content-management/types/
|
[content types]: /content-management/types/
|
||||||
[front matter]: /content-management/front-matter/
|
[front matter]: /content-management/front-matter/
|
||||||
[RFC 3339 format]: https://www.ietf.org/rfc/rfc3339.txt
|
[RFC 3339 format]: https://www.ietf.org/rfc/rfc3339.txt
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ To learn more about creating your own shortcode templates, see the [shortcode te
|
|||||||
[`figure` shortcode]: #figure
|
[`figure` shortcode]: #figure
|
||||||
[Instagram]: https://www.instagram.com/
|
[Instagram]: https://www.instagram.com/
|
||||||
[pagevariables]: /variables/page/
|
[pagevariables]: /variables/page/
|
||||||
[partials]: /templates/partials-templates/
|
[partials]: /templates/partials/
|
||||||
[Pygments]: http://pygments.org/
|
[Pygments]: http://pygments.org/
|
||||||
[quickstart]: /getting-started/quick-start/
|
[quickstart]: /getting-started/quick-start/
|
||||||
[shortcode template documentation]: /templates/shortcode-templates/
|
[shortcode template documentation]: /templates/shortcode-templates/
|
||||||
|
|||||||
@@ -248,8 +248,8 @@ Currently taxonomies only support the [default `weight => date` ordering of list
|
|||||||
{{% /note %}}
|
{{% /note %}}
|
||||||
|
|
||||||
[`urlize` template function]: /functions/urlize/
|
[`urlize` template function]: /functions/urlize/
|
||||||
[content section]: /content-section/
|
[content section]: /content-management/sections/
|
||||||
[content type]: /content-type/
|
[content type]: /content-management/types/
|
||||||
[documentation on archetypes]: /content-management/archetypes/
|
[documentation on archetypes]: /content-management/archetypes/
|
||||||
[front matter]: /content-management/front-matter/
|
[front matter]: /content-management/front-matter/
|
||||||
[taxonomy list templates]: /templates/taxonomy-templates/#taxonomy-page-templates
|
[taxonomy list templates]: /templates/taxonomy-templates/#taxonomy-page-templates
|
||||||
|
|||||||
@@ -62,4 +62,4 @@ The following is an example of very basic [single page template][]:
|
|||||||
|
|
||||||
[pagevars]: /variables/page/
|
[pagevars]: /variables/page/
|
||||||
[partials]: /templates/partials/
|
[partials]: /templates/partials/
|
||||||
[single page template]: /templates/single-page-template/
|
[single page template]: /templates/single-page-templates/
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
title: with
|
||||||
|
linktitle: with
|
||||||
|
description: Rebinds the context (`.`) within its scope and skips the block if the variable is absent.
|
||||||
|
godocref:
|
||||||
|
date: 2017-03-12
|
||||||
|
publishdate: 2017-03-12
|
||||||
|
lastmod: 2017-03-12
|
||||||
|
categories: [functions]
|
||||||
|
tags: [conditionals,fundamentals]
|
||||||
|
signature:
|
||||||
|
workson: []
|
||||||
|
hugoversion:
|
||||||
|
relatedfuncs: []
|
||||||
|
deprecated: false
|
||||||
|
---
|
||||||
|
|
||||||
|
An alternative way of writing the "`if`" and then referencing the same value is to use `with` instead. `with` rebinds the context (`.`) within its scope and skips the block if the variable is absent:
|
||||||
|
|
||||||
|
{{% code file="layouts/partials/twitter.html" %}}
|
||||||
|
```html
|
||||||
|
{{with .Site.Params.TwitterUser}}<span class="twitter">
|
||||||
|
<a href="https://twitter.com/{{.}}" rel="author">
|
||||||
|
<img src="/images/twitter.png" width="48" height="48" title="Twitter: {{.}}"
|
||||||
|
alt="Twitter"></a>
|
||||||
|
</span>{{end}}
|
||||||
|
```
|
||||||
|
{{% /code %}}
|
||||||
@@ -340,4 +340,4 @@ If you want to see an example of how you can deploy to S3 instead of GitHub page
|
|||||||
[hugoconfig]: /getting-started/configuration/
|
[hugoconfig]: /getting-started/configuration/
|
||||||
[publicappurl]: https://app.wercker.com/#applications/5586dcbdaf7de9c51b02b0d5
|
[publicappurl]: https://app.wercker.com/#applications/5586dcbdaf7de9c51b02b0d5
|
||||||
[quickstart]: /getting-started/quick-start/
|
[quickstart]: /getting-started/quick-start/
|
||||||
[werckerdocs]: (http://devcenter.wercker.com/docs/deploy/s3.html)
|
[werckerdocs]: http://devcenter.wercker.com/docs/deploy/s3.html
|
||||||
@@ -61,7 +61,7 @@ Hugo has been featured in the following Blog Posts, Press, and Media.
|
|||||||
| [Good-Bye Wordpress, Hello Hugo!](http://blog.arminhanisch.de/2015/08/blog-migration-zu-hugo/) <small>(German)</small> | Armin Hanisch | 2015-08-18 |
|
| [Good-Bye Wordpress, Hello Hugo!](http://blog.arminhanisch.de/2015/08/blog-migration-zu-hugo/) <small>(German)</small> | Armin Hanisch | 2015-08-18 |
|
||||||
| [Static Site E-Commerce: Integrating Snipcart with Hugo](https://snipcart.com/blog/snipcart-hugo-integration) | Francis Tremblay | 2015-08-13 |
|
| [Static Site E-Commerce: Integrating Snipcart with Hugo](https://snipcart.com/blog/snipcart-hugo-integration) | Francis Tremblay | 2015-08-13 |
|
||||||
| [Générer votre site web statique avec Hugo <small>(Generate your static site with Hugo)<small>](http://www.linux-pratique.com/?p=191) | Benoît Benedetti | 2015-06-26 |
|
| [Générer votre site web statique avec Hugo <small>(Generate your static site with Hugo)<small>](http://www.linux-pratique.com/?p=191) | Benoît Benedetti | 2015-06-26 |
|
||||||
| [<span lang="ja">Hugo向けの新しいテーマを作った</span> <small>(I created a new theme for Hugo)<small>](http://yet.unresolved.xyz/blog/2015/06/20/making-new-theme-robust-for-hugo/) | Daisuke Tsuji | 2015-06-20 |
|
| [<span lang="ja">Hugo向けの新しいテーマを作った</span> <small>(I created a new theme for Hugo)<small>](https://yet.unresolved.xyz/blog/2016/10/03/how-to-make-of-hugo-theme/) | Daisuke Tsuji | 2015-06-20 |
|
||||||
| [Hugo - Gerando um site com conteúdo estático. (Portuguese Brazil)](http://blog.ffrizzo.com/posts/hugo/) | Fabiano Frizzo | 2015-06-02 |
|
| [Hugo - Gerando um site com conteúdo estático. (Portuguese Brazil)](http://blog.ffrizzo.com/posts/hugo/) | Fabiano Frizzo | 2015-06-02 |
|
||||||
| [An Introduction to Static Site Generators](http://davidwalsh.name/introduction-static-site-generators) | Eduardo Bouças | 2015-05-20 |
|
| [An Introduction to Static Site Generators](http://davidwalsh.name/introduction-static-site-generators) | Eduardo Bouças | 2015-05-20 |
|
||||||
| [Hugo Still Rules](http://cheekycoder.com/2015/05/hugo-still-rules/) | Cheeky Coder | 2015-05-18 |
|
| [Hugo Still Rules](http://cheekycoder.com/2015/05/hugo-still-rules/) | Cheeky Coder | 2015-05-18 |
|
||||||
@@ -75,7 +75,6 @@ Hugo has been featured in the following Blog Posts, Press, and Media.
|
|||||||
| [Static Websites with Hugo on Google Cloud Storage](http://www.moxie.io/post/static-websites-with-hugo-on-google-cloud-storage/) | Moxie Input/Output | 2015-04-02 |
|
| [Static Websites with Hugo on Google Cloud Storage](http://www.moxie.io/post/static-websites-with-hugo-on-google-cloud-storage/) | Moxie Input/Output | 2015-04-02 |
|
||||||
| [De nuevo iniciando un blog](http://alvarolizama.net/blog/denuevo-iniciando-un-blog/) | Alvaro Lizama | 2015-03-29 |
|
| [De nuevo iniciando un blog](http://alvarolizama.net/blog/denuevo-iniciando-un-blog/) | Alvaro Lizama | 2015-03-29 |
|
||||||
| [We moved our blog from Posthaven to Hugo after only three posts. Why?](http://blog.hypriot.com/post/moved-from-posthaven-to-hugo/) | Hypriot | 2015-03-27 |
|
| [We moved our blog from Posthaven to Hugo after only three posts. Why?](http://blog.hypriot.com/post/moved-from-posthaven-to-hugo/) | Hypriot | 2015-03-27 |
|
||||||
| [Hugo is cool](http://tnt.wicast.tk/2015/03/23/hugo-is-cool/) <small>(<span lang="zh-CN">中文</span> Chinese)</small> | wicast | 2015-03-23 |
|
|
||||||
| [Top Static Site Generators in 2015](http://superdevresources.com/static-site-generators-2015/) | Kanishk Kunal | 2015-03-12 |
|
| [Top Static Site Generators in 2015](http://superdevresources.com/static-site-generators-2015/) | Kanishk Kunal | 2015-03-12 |
|
||||||
| [Moving to Hugo](http://abiosoft.com/moving-to-hugo/) | Abiola Ibrahim | 2015-03-08 |
|
| [Moving to Hugo](http://abiosoft.com/moving-to-hugo/) | Abiola Ibrahim | 2015-03-08 |
|
||||||
| [<span lang="ja">Hugoで試行錯誤する</span> - log](http://deprode.net/log/logs/first/) | Deprode | 2015-02-28 |
|
| [<span lang="ja">Hugoで試行錯誤する</span> - log](http://deprode.net/log/logs/first/) | Deprode | 2015-02-28 |
|
||||||
@@ -92,7 +91,6 @@ Hugo has been featured in the following Blog Posts, Press, and Media.
|
|||||||
| [<span lang="ja">Jekyllが許されるのは小学生までだよね</span>](http://t32k.me/mol/log/hugo/) | Ishimoto Koji | 2015-01-16 |
|
| [<span lang="ja">Jekyllが許されるのは小学生までだよね</span>](http://t32k.me/mol/log/hugo/) | Ishimoto Koji | 2015-01-16 |
|
||||||
| [Getting started with Hugo](http://anthonyfok.org/post/getting-started-with-hugo/) | Anthony Fok | 2015-01-12 |
|
| [Getting started with Hugo](http://anthonyfok.org/post/getting-started-with-hugo/) | Anthony Fok | 2015-01-12 |
|
||||||
| [<span lang="zh-CN">把这个博客静态化了</span> <small>(Migrate to Hugo)</small>](http://lich-eng.com/2015/01/03/migrate-to-hugo/)| Li Cheng | 2015-01-03 |
|
| [<span lang="zh-CN">把这个博客静态化了</span> <small>(Migrate to Hugo)</small>](http://lich-eng.com/2015/01/03/migrate-to-hugo/)| Li Cheng | 2015-01-03 |
|
||||||
| [My Hugo Experiment](http://tilde.club/~jbaty/2014/12/2014-12-31-my-hugo-experiment/) | Jack Baty | 2014-12-31 |
|
|
||||||
| [Porting my blog with Hugo](http://blog.srackham.com/posts/porting-my-blog-with-hugo/) | Stuart Rackham | 2014-12-30 |
|
| [Porting my blog with Hugo](http://blog.srackham.com/posts/porting-my-blog-with-hugo/) | Stuart Rackham | 2014-12-30 |
|
||||||
| [Hugoを使ってみたときのメモ](http://machortz.github.io/posts/usinghugo/) | Machortz | 2014-12-29 |
|
| [Hugoを使ってみたときのメモ](http://machortz.github.io/posts/usinghugo/) | Machortz | 2014-12-29 |
|
||||||
| [OctopressからHugoへ移行した](http://deeeet.com/writing/2014/12/25/hugo/) | Taichi Nakashima | 2014-12-25 |
|
| [OctopressからHugoへ移行した](http://deeeet.com/writing/2014/12/25/hugo/) | Taichi Nakashima | 2014-12-25 |
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Also, a considerably amount of work have been put into cleaning up the Hugo sour
|
|||||||
|
|
||||||
Hugo `0.18` was bringing full-parallel page rendering, so workarounds depending on rendering order did not work anymore, and pages with duplicate target paths (common examples would be `/index.md` or `/about/index.md`) would now conflict with the home page or the section listing.
|
Hugo `0.18` was bringing full-parallel page rendering, so workarounds depending on rendering order did not work anymore, and pages with duplicate target paths (common examples would be `/index.md` or `/about/index.md`) would now conflict with the home page or the section listing.
|
||||||
|
|
||||||
With Hugo `0.19`, you can control this behaviour by turning off page types you do not want ({{<gh 2534 >}}). In its most extreme case, if you put the below setting in your `config.toml`, you will get **nothing!**:
|
With Hugo `0.19`, you can control this behaviour by turning off page types you do not want ({{<gh 2534 >}}). In its most extreme case, if you put the below setting in your [`config.toml`](/getting-started/configuration/), you will get **nothing!**:
|
||||||
|
|
||||||
```
|
```
|
||||||
disableKinds = ["page", "home", "section", "taxonomy", "taxonomyTerm", "RSS", "sitemap", "robotsTXT", "404"]
|
disableKinds = ["page", "home", "section", "taxonomy", "taxonomyTerm", "RSS", "sitemap", "robotsTXT", "404"]
|
||||||
@@ -46,7 +46,7 @@ disableKinds = ["page", "home", "section", "taxonomy", "taxonomyTerm", "RSS", "s
|
|||||||
|
|
||||||
### Other New Features
|
### Other New Features
|
||||||
|
|
||||||
* Add ability to sort pages by frontmatter parameters, enabling easy custom "top 10" page lists. {{<gh 3022 >}}
|
* Add ability to sort pages by front matter parameters, enabling easy custom "top 10" page lists. {{<gh 3022 >}}
|
||||||
* Add `truncate` template function {{<gh 2882 >}}
|
* Add `truncate` template function {{<gh 2882 >}}
|
||||||
* Add `now` function, which replaces the now deprecated `.Now` {{<gh 2859 >}}
|
* Add `now` function, which replaces the now deprecated `.Now` {{<gh 2859 >}}
|
||||||
* Make RSS item limit configurable {{<gh 3035 >}}
|
* Make RSS item limit configurable {{<gh 3035 >}}
|
||||||
@@ -81,7 +81,7 @@ disableKinds = ["page", "home", "section", "taxonomy", "taxonomyTerm", "RSS", "s
|
|||||||
* Fix infinite loop in template AST handling for recursive templates {{<gh 2927 >}}
|
* Fix infinite loop in template AST handling for recursive templates {{<gh 2927 >}}
|
||||||
* Fix issue with watching when config loading fails {{<gh 2603 >}}
|
* Fix issue with watching when config loading fails {{<gh 2603 >}}
|
||||||
* Correctly flush the imageConfig on live-reload {{<gh 3016 >}}
|
* Correctly flush the imageConfig on live-reload {{<gh 3016 >}}
|
||||||
* Fix parsing of TOML arrays in frontmatter {{<gh 2752 >}}
|
* Fix parsing of TOML arrays in front matter {{<gh 2752 >}}
|
||||||
|
|
||||||
### Docs
|
### Docs
|
||||||
|
|
||||||
@@ -364,7 +364,7 @@ times decreased anywhere from 10% to 99%.
|
|||||||
* Add async version of Google Analytics internal template {{<gh 1711>}}
|
* Add async version of Google Analytics internal template {{<gh 1711>}}
|
||||||
* Add autostart option to YouTube shortcode {{<gh 1784>}}
|
* Add autostart option to YouTube shortcode {{<gh 1784>}}
|
||||||
* Set Date and Lastmod for main home page {{<gh 1903>}}
|
* Set Date and Lastmod for main home page {{<gh 1903>}}
|
||||||
* Allow URL with extension in frontmatter {{<gh 1923>}}
|
* Allow URL with extension in front matter {{<gh 1923>}}
|
||||||
* Add list support in Scratch {{<gh
|
* Add list support in Scratch {{<gh
|
||||||
0xeaba04e82bdfc5d4c29e970f11b4aab9cc0efeaa>}}
|
0xeaba04e82bdfc5d4c29e970f11b4aab9cc0efeaa>}}
|
||||||
* Add file option to gist shortcode {{<gh 1955>}}
|
* Add file option to gist shortcode {{<gh 1955>}}
|
||||||
@@ -639,24 +639,24 @@ A special shout out to {{< gh "@bep" >}} and
|
|||||||
maintainers and their tremendous contributions this release.
|
maintainers and their tremendous contributions this release.
|
||||||
|
|
||||||
### New major features
|
### New major features
|
||||||
* Support for [data files](/extras/datafiles/) in [YAML](http://yaml.org/),
|
* Support for [data files](/templates/data-templates/) in [YAML](http://yaml.org/),
|
||||||
[JSON](http://www.json.org/), or [TOML](https://github.com/toml-lang/toml)
|
[JSON](http://www.json.org/), or [TOML](https://github.com/toml-lang/toml)
|
||||||
located in the `data` directory ({{< gh 885 >}})
|
located in the `data` directory ({{< gh 885 >}})
|
||||||
* Support for [dynamic content](/extras/dynamiccontent/) by loading JSON & CSV
|
* Support for [dynamic content](/templates/data-templates/) by loading JSON & CSV
|
||||||
from remote sources via GetJson and GetCsv in short codes or other layout
|
from remote sources via GetJson and GetCsv in short codes or other layout
|
||||||
files ({{< gh 748 >}})
|
files ({{< gh 748 >}})
|
||||||
* [Pagination support](/extras/pagination/) for home page, sections and
|
* [Pagination support](/templates/pagination/) for home page, sections and
|
||||||
taxonomies ({{< gh 750 >}})
|
taxonomies ({{< gh 750 >}})
|
||||||
* Universal sequencing support
|
* Universal sequencing support
|
||||||
* A new, generic Next/Prev functionality is added to all lists of pages
|
* A new, generic Next/Prev functionality is added to all lists of pages
|
||||||
(sections, taxonomies, etc.)
|
(sections, taxonomies, etc.)
|
||||||
* Add in-section [Next/Prev](/templates/variables/) content pointers
|
* Add in-section [Next/Prev](/variables/) content pointers
|
||||||
* `Scratch` -- [a "scratchpad"](/extras/scratch) for your node- and page-scoped
|
* `Scratch` -- [a "scratchpad"](/functions/scratch/) for your node- and page-scoped
|
||||||
variables
|
variables
|
||||||
* [Cross Reference](/extras/crossreferences/) support to easily link documents
|
* [Cross Reference](/content-management/cross-references/) support to easily link documents
|
||||||
together with the ref and relref shortcodes.
|
together with the ref and relref shortcodes.
|
||||||
* [Ace](http://ace.yoss.si/) template engine support ({{< gh 541 >}})
|
* [Ace](https://github.com/yosssi/ace) template engine support ({{< gh 541 >}})
|
||||||
* A new [shortcode](/extras/shortcodes/) token of `{{</* */>}}` (raw HTML)
|
* A new [shortcode](/content-management/shortcodes/) token of `{{</* */>}}` (raw HTML)
|
||||||
alongside the existing `{{%/* */%}}` (Markdown)
|
alongside the existing `{{%/* */%}}` (Markdown)
|
||||||
* A top level `Hugo` variable (on Page & Node) is added with various build
|
* A top level `Hugo` variable (on Page & Node) is added with various build
|
||||||
information
|
information
|
||||||
@@ -671,10 +671,10 @@ maintainers and their tremendous contributions this release.
|
|||||||
|
|
||||||
### Notable enhancements to existing features
|
### Notable enhancements to existing features
|
||||||
|
|
||||||
* The [shortcode](/extras/shortcodes/) handling is rewritten for speed and
|
* The [shortcode](/content-management/shortcodes/) handling is rewritten for speed and
|
||||||
better error messages.
|
better error messages.
|
||||||
* Several improvements to the [template functions](/templates/functions/):
|
* Several improvements to the [template functions](/functions/):
|
||||||
* `where` is now even more powerful and accepts SQL-like syntax with the
|
* [`where`](/functions/where/) is now even more powerful and accepts SQL-like syntax with the
|
||||||
operators `==`, `eq`; `!=`, `<>`, `ne`; `>=`, `ge`; `>`, `gt`; `<=`,
|
operators `==`, `eq`; `!=`, `<>`, `ne`; `>=`, `ge`; `>`, `gt`; `<=`,
|
||||||
`le`; `<`, `lt`; `in`, `not in`
|
`le`; `<`, `lt`; `in`, `not in`
|
||||||
* `where` template function now also accepts dot chaining key argument
|
* `where` template function now also accepts dot chaining key argument
|
||||||
@@ -690,7 +690,7 @@ maintainers and their tremendous contributions this release.
|
|||||||
* `replace`
|
* `replace`
|
||||||
* `dateFormat`
|
* `dateFormat`
|
||||||
* Several [configurable improvements related to Markdown
|
* Several [configurable improvements related to Markdown
|
||||||
rendering](/overview/configuration/#configure-blackfriday-rendering:a66b35d20295cb764719ac8bd35837ec):
|
rendering](/getting-started/configuration/):
|
||||||
* Configuration of footnote rendering
|
* Configuration of footnote rendering
|
||||||
* Optional support for smart angled quotes, e.g. `"Hugo"` → «Hugo»
|
* Optional support for smart angled quotes, e.g. `"Hugo"` → «Hugo»
|
||||||
* Enable descriptive header IDs
|
* Enable descriptive header IDs
|
||||||
@@ -702,13 +702,13 @@ maintainers and their tremendous contributions this release.
|
|||||||
* Internal change to use byte buffer pool significantly lowering memory usage
|
* Internal change to use byte buffer pool significantly lowering memory usage
|
||||||
and providing measurable performance improvements overall
|
and providing measurable performance improvements overall
|
||||||
* Changes to docs:
|
* Changes to docs:
|
||||||
* A new [Troubleshooting](/troubleshooting/overview/) section is added
|
* A new [Troubleshooting](/troubleshooting/) section is added
|
||||||
* It's now searchable through Google Custom Search ({{< gh 753 >}})
|
* It's now searchable through Google Custom Search ({{< gh 753 >}})
|
||||||
* Some new great tutorials:
|
* Some new great tutorials:
|
||||||
* [Automated deployments with
|
* [Automated deployments with
|
||||||
Wercker](/tutorials/automated-deployments/)
|
Wercker](/tutorials/automated-deployments/)
|
||||||
* [Creating a new theme](/tutorials/creating-a-new-theme/)
|
* [Creating a new theme](/tutorials/creating-a-new-theme/)
|
||||||
* [`hugo new`](/content/archetypes/) now copies the content in addition to the front matter
|
* [`hugo new`](/content-management/archetypes/) now copies the content in addition to the front matter
|
||||||
* Improved unit test coverage
|
* Improved unit test coverage
|
||||||
* Fixed a lot of Windows-related path issues
|
* Fixed a lot of Windows-related path issues
|
||||||
* Improved error messages for template and rendering errors
|
* Improved error messages for template and rendering errors
|
||||||
@@ -730,17 +730,17 @@ This release represents over 90 code commits from 28 different contributors.
|
|||||||
* 10 [new themes](https://github.com/spf13/hugoThemes) created by the community
|
* 10 [new themes](https://github.com/spf13/hugoThemes) created by the community
|
||||||
* Fully themable [Partials](/templates/partials/)
|
* Fully themable [Partials](/templates/partials/)
|
||||||
* [404 template](/templates/404/) support in themes
|
* [404 template](/templates/404/) support in themes
|
||||||
* [Shortcode](/extras/shortcodes/) support in themes
|
* [Shortcode](/content-management/shortcodes/) support in themes
|
||||||
* [Views](/templates/views/) support in themes
|
* [Views](/templates/views/) support in themes
|
||||||
* Inner [shortcode](/extras/shortcodes/) content now treated as Markdown
|
* Inner [shortcode](/content-management/shortcodes/) content now treated as Markdown
|
||||||
* Support for header ids in Markdown (# Header {#myid})
|
* Support for header ids in Markdown (# Header {#myid})
|
||||||
* [Where](/templates/list/) template function to filter lists of content, taxonomies, etc.
|
* [Where](/templates/lists/) template function to filter lists of content, taxonomies, etc.
|
||||||
* [GroupBy](/templates/list/) & [GroupByDate](/templates/list/) methods to group pages
|
* [GroupBy](/templates/lists/) & [GroupByDate](/templates/list/) methods to group pages
|
||||||
* Taxonomy [pages list](/taxonomies/methods/) now sortable, filterable, limitable & groupable
|
* Taxonomy [pages list](/templates/taxonomy-templates/) now sortable, filterable, limitable & groupable
|
||||||
* General cleanup to taxonomies & documentation to make it more clear and consistent
|
* General cleanup to taxonomies & documentation to make it more clear and consistent
|
||||||
* [Showcase](/showcase/) returned and has been expanded
|
* [Showcase](/showcase/) returned and has been expanded
|
||||||
* Pretty links now always have trailing slashes
|
* Pretty links now always have trailing slashes
|
||||||
* [BaseUrl](/overview/configuration/) can now include a subdirectory
|
* [BaseUrl](/getting-started/configuration/) can now include a subdirectory
|
||||||
* Better feedback about draft & future post rendering
|
* Better feedback about draft & future post rendering
|
||||||
* A variety of improvements to [the website](http://gohugo.io/)
|
* A variety of improvements to [the website](http://gohugo.io/)
|
||||||
|
|
||||||
@@ -751,20 +751,20 @@ This release represents over 90 code commits from 28 different contributors.
|
|||||||
This release represents over 110 code commits from 29 different contributors.
|
This release represents over 110 code commits from 29 different contributors.
|
||||||
|
|
||||||
* Considerably faster... about 3 - 4x faster on average
|
* Considerably faster... about 3 - 4x faster on average
|
||||||
* [LiveReload](/extras/livereload/). Hugo will automatically reload the browser when the build is complete
|
* [LiveReload](/getting-started/usage/). Hugo will automatically reload the browser when the build is complete
|
||||||
* Theme engine w/[Theme Repository](https://github.com/spf13/hugoThemes)
|
* Theme engine w/[Theme Repository](https://github.com/spf13/hugoThemes)
|
||||||
* [Menu system](/extras/menus/) with support for active page
|
* [Menu system](/content-management/menus/) with support for active page
|
||||||
* [Builders](/extras/builders/) to quickly create a new site, content or theme
|
* [Builders](/getting-started/usage/) to quickly create a new site, content or theme
|
||||||
* [XML sitemap](/templates/sitemap/) generation
|
* [XML sitemap](/templates/sitemap-template/) generation
|
||||||
* [Integrated Disqus](/extras/comments/) support
|
* [Integrated Disqus](/content-management/comments/) support
|
||||||
* Streamlined [template organization](/templates/overview/)
|
* Streamlined [template organization](/templates/)
|
||||||
* [Brand new docs site](http://gohugo.io/)
|
* [Brand new docs site](http://gohugo.io/)
|
||||||
* Support for publishDate which allows for posts to be dated in the future
|
* Support for publishDate which allows for posts to be dated in the future
|
||||||
* More [sort](/content/ordering/) options
|
* More [sort](/content-management/ordering/) options
|
||||||
* Logging support
|
* Logging support
|
||||||
* Much better error handling
|
* Much better error handling
|
||||||
* More informative verbose output
|
* More informative verbose output
|
||||||
* Renamed Indexes > [Taxonomies](/taxonomies/overview/)
|
* Renamed Indexes > [Taxonomies](/content-management/taxonomies/)
|
||||||
* Renamed Chrome > [Partials](/templates/partials/)
|
* Renamed Chrome > [Partials](/templates/partials/)
|
||||||
|
|
||||||
----
|
----
|
||||||
@@ -773,18 +773,18 @@ This release represents over 110 code commits from 29 different contributors.
|
|||||||
|
|
||||||
This release represents over 110 code commits from 29 different contributors.
|
This release represents over 110 code commits from 29 different contributors.
|
||||||
|
|
||||||
* [Syntax highlighting](/extras/highlighting/) powered by pygments (**slow**)
|
* [Syntax highlighting](/tools/syntax-highlighting/) powered by pygments (**slow**)
|
||||||
* Ability to [sort content](/content/ordering/) many more ways
|
* Ability to [sort content](/templates/ordering-and-grouping/) many more ways
|
||||||
* Automatic [table of contents](/extras/toc/) generation
|
* Automatic [table of contents](/content-management/toc/) generation
|
||||||
* Support for Unicode URLs, aliases and indexes
|
* Support for Unicode URLs, aliases and indexes
|
||||||
* Configurable per-section [permalink](/extras/permalinks/) pattern support
|
* Configurable per-section [permalink](/content-management/urls/) pattern support
|
||||||
* Support for [paired shortcodes](/extras/shortcodes/)
|
* Support for [paired shortcodes](/content-management/shortcodes/)
|
||||||
* Shipping with some [shortcodes](/extras/shortcodes/) (highlight & figure)
|
* Shipping with some [shortcodes](/content-management/shortcodes/) (highlight & figure)
|
||||||
* Adding [canonify](/extras/urls/) option to keep urls relative
|
* Adding [canonify](/content-management/urls/) option to keep urls relative
|
||||||
* A bunch of [additional template functions](/layout/functions/)
|
* A bunch of [additional template functions](/functions/)
|
||||||
* Watching very large sites now works on Mac
|
* Watching very large sites now works on Mac
|
||||||
* RSS generation improved. Limited to 50 items by default, can limit further in [template](/layout/rss/)
|
* RSS generation improved. Limited to 50 items by default, can limit further in [template](/templates/rss/)
|
||||||
* Boolean params now supported in [fm](/content/front-matter/)
|
* Boolean params now supported in [fm](/content-management/front-matter/)
|
||||||
* Launched website [showcase](/showcase/). Show off your own hugo site!
|
* Launched website [showcase](/showcase/). Show off your own hugo site!
|
||||||
* A bunch of [bug fixes](https://github.com/spf13/hugo/commits/master)
|
* A bunch of [bug fixes](https://github.com/spf13/hugo/commits/master)
|
||||||
|
|
||||||
@@ -794,19 +794,19 @@ This release represents over 110 code commits from 29 different contributors.
|
|||||||
|
|
||||||
This release represents over 220 code commits from 22 different contributors.
|
This release represents over 220 code commits from 22 different contributors.
|
||||||
|
|
||||||
* New [command based interface](/overview/usage/) similar to git (`hugo server -s ./`)
|
* New [command based interface](/getting-started/usage/) similar to git (`hugo server -s ./`)
|
||||||
* Amber template support
|
* Amber template support
|
||||||
* [Aliases](/extras/aliases/) (redirects)
|
* [Aliases](/content-management/urls/) (redirects)
|
||||||
* Support for top level pages (in addition to homepage)
|
* Support for top level pages (in addition to homepage)
|
||||||
* Complete overhaul of the documentation site
|
* Complete overhaul of the documentation site
|
||||||
* Full Windows support
|
* Full Windows support
|
||||||
* Better index support including [ordering by content weight](/content/ordering/)
|
* Better index support including [ordering by content weight](/templates/ordering-and-grouping/)
|
||||||
* Add params to site config, available in .Site.Params from templates
|
* Add params to site config, available in .Site.Params from templates
|
||||||
* Friendlier json support
|
* Friendlier JSON support
|
||||||
* Support for html & xml content (with frontmatter support)
|
* Support for html & xml content (with front matter support)
|
||||||
* Support for [summary](/content/summaries/) content divider (<code><!--more--></code>)
|
* Support for [summary](/content-management/summaries/) content divider (<code><!--more--></code>)
|
||||||
* HTML in [summary](/content/summaries/) (when using divider)
|
* HTML in [summary](/content-management/summaries/) (when using divider)
|
||||||
* Added ["Minutes to Read"](/layout/variables/) functionality
|
* Added ["Minutes to Read"](/variables/) functionality
|
||||||
* Support for a custom 404 page
|
* Support for a custom 404 page
|
||||||
* Cleanup of how content organization is handled
|
* Cleanup of how content organization is handled
|
||||||
* Loads of unit and performance tests
|
* Loads of unit and performance tests
|
||||||
@@ -815,11 +815,11 @@ This release represents over 220 code commits from 22 different contributors.
|
|||||||
* Support for relative permalinks
|
* Support for relative permalinks
|
||||||
* Fixed watching being triggered multiple times for the same event
|
* Fixed watching being triggered multiple times for the same event
|
||||||
* Watch now ignores temp files (as created by Vim)
|
* Watch now ignores temp files (as created by Vim)
|
||||||
* Configurable number of posts on [homepage](/layout/homepage/)
|
* Configurable number of posts on [homepage](/templates/homepage/)
|
||||||
* [Front matter](/content/front-matter/) supports multiple types (int, string, date, float)
|
* [Front matter](/content-management/front-matter/) supports multiple types (int, string, date, float)
|
||||||
* Indexes can now use a default template
|
* Indexes can now use a default template
|
||||||
* Addition of truncated bool to content to determine if should show 'more' link
|
* Addition of truncated bool to content to determine if should show 'more' link
|
||||||
* Support for [linkTitles](/layout/variables/)
|
* Support for [linkTitles](/variables/)
|
||||||
* Better handling of most errors with directions on how to resolve
|
* Better handling of most errors with directions on how to resolve
|
||||||
* Support for more date / time formats
|
* Support for more date / time formats
|
||||||
* Support for go 1.2
|
* Support for go 1.2
|
||||||
|
|||||||
File renamed without changes.
@@ -76,13 +76,13 @@ If `where` or `first` receives invalid input or a field name that doesn’t exis
|
|||||||
[homepage]: /templates/homepage/
|
[homepage]: /templates/homepage/
|
||||||
[limitkeyword]: https://www.techonthenet.com/sql/select_limit.php
|
[limitkeyword]: https://www.techonthenet.com/sql/select_limit.php
|
||||||
[mentalmodel]: http://webstyleguide.com/wsg3/3-information-architecture/3-site-structure.html
|
[mentalmodel]: http://webstyleguide.com/wsg3/3-information-architecture/3-site-structure.html
|
||||||
[pagevars]: /variables/pagevars/
|
[pagevars]: /variables/page/
|
||||||
[partials]: /templates/partials/
|
[partials]: /templates/partials/
|
||||||
[RSS 2.0]: http://cyber.law.harvard.edu/rss/rss.html "RSS 2.0 Specification"
|
[RSS 2.0]: http://cyber.law.harvard.edu/rss/rss.html "RSS 2.0 Specification"
|
||||||
[rss]: /templates/rss/
|
[rss]: /templates/rss/
|
||||||
[sections]: /content-management/sections/
|
[sections]: /content-management/sections/
|
||||||
[sectiontemps]: /templates/section-templates
|
[sectiontemps]: /templates/section-templates/
|
||||||
[sitevars]: /variables/site/
|
[sitevars]: /variables/site/
|
||||||
[taxlists]: /templates/taxonomy-templates/#taxonomy-list-templates/
|
[taxlists]: /templates/taxonomy-templates/#taxonomy-list-templates/
|
||||||
[taxvars]: /templates/taxonomy-variables/
|
[taxvars]: /variables/taxonomy/
|
||||||
[taxterms]: /templates/taxonomy-templates/#taxonomy-terms-templates/
|
[taxterms]: /templates/taxonomy-templates/#taxonomy-terms-templates/
|
||||||
@@ -176,7 +176,7 @@ The respective lookup order for each of Hugo's templates has been defined throug
|
|||||||
[sections]: /content-management/sections/
|
[sections]: /content-management/sections/
|
||||||
[sectionlookup]: /templates/section-templates/#section-template-lookup-order
|
[sectionlookup]: /templates/section-templates/#section-template-lookup-order
|
||||||
[single content]: /templates/single-page-templates/
|
[single content]: /templates/single-page-templates/
|
||||||
[singlelookup]: templates/single-page-templates/#single-page-template-lookup-order
|
[singlelookup]: /templates/single-page-templates/#single-page-template-lookup-order
|
||||||
[switch]: https://en.wikipedia.org/wiki/Switch_statement#Fallthrough
|
[switch]: https://en.wikipedia.org/wiki/Switch_statement#Fallthrough
|
||||||
[taxonomylookup]: /templates/taxonomy-templates/#taxonomy-list-template-lookup-order
|
[taxonomylookup]: /templates/taxonomy-templates/#taxonomy-list-template-lookup-order
|
||||||
[termslookup]: /templates/taxonomy-templates/#taxonomy-terms-template-lookup-order
|
[termslookup]: /templates/taxonomy-templates/#taxonomy-terms-template-lookup-order
|
||||||
@@ -15,9 +15,9 @@ toc: true
|
|||||||
|
|
||||||
In Hugo, A list template is any template that will be used to render multiple pieces of content in a single HTML page.
|
In Hugo, A list template is any template that will be used to render multiple pieces of content in a single HTML page.
|
||||||
|
|
||||||
## Examples of List Templates
|
## Example List Templates
|
||||||
|
|
||||||
### Section Template: `post.html`
|
### Section Template
|
||||||
|
|
||||||
This list template is used for [spf13.com](http://spf13.com/). It makes use of [partial templates][partials]. All examples use a [view](/templates/views/) called either "li" or "summary."
|
This list template is used for [spf13.com](http://spf13.com/). It makes use of [partial templates][partials]. All examples use a [view](/templates/views/) called either "li" or "summary."
|
||||||
|
|
||||||
|
|||||||
@@ -50,5 +50,5 @@ Disallow: {{.RelPermalink}}
|
|||||||
This template disallows all the pages of the site by creating one `Disallow` entry for each page.
|
This template disallows all the pages of the site by creating one `Disallow` entry for each page.
|
||||||
|
|
||||||
[config]: /getting-started/configuration/
|
[config]: /getting-started/configuration/
|
||||||
[lookup]: /layouts/lookup-order
|
[lookup]: /templates/lookup-order/
|
||||||
[robots]: http://www.robotstxt.org/
|
[robots]: http://www.robotstxt.org/
|
||||||
@@ -260,7 +260,7 @@ More shortcode examples can be found in the [shortcodes directory for spf13.com]
|
|||||||
[docsshortcodes]: https://github.com/spf13/hugo/tree/master/docs/layouts/shortcodes "See the shortcode source directory for the documentation site you're currently reading."
|
[docsshortcodes]: https://github.com/spf13/hugo/tree/master/docs/layouts/shortcodes "See the shortcode source directory for the documentation site you're currently reading."
|
||||||
[figure]: /content-management/shortcodes/#figure
|
[figure]: /content-management/shortcodes/#figure
|
||||||
[pagevars]: /variables/page/ "See which variables you can leverage in your templating for page vs list templates."
|
[pagevars]: /variables/page/ "See which variables you can leverage in your templating for page vs list templates."
|
||||||
[shortcodesvars]: /variables/shortcode-variables/ "Certain variables are specific to shortcodes, although most .Page variables can be accessed within your shortcode template."
|
[shortcodesvars]: /variables/shortcodes/ "Certain variables are specific to shortcodes, although most .Page variables can be accessed within your shortcode template."
|
||||||
[spf13shortcodes]: https://github.com/spf13/spf13.com/tree/master/layouts/shortcodes "See more examples of shortcodes by visiting the shortcode directory of the source for spf13.com, the blog of Hugo's creator, Steve Francia."
|
[spf13shortcodes]: https://github.com/spf13/spf13.com/tree/master/layouts/shortcodes "See more examples of shortcodes by visiting the shortcode directory of the source for spf13.com, the blog of Hugo's creator, Steve Francia."
|
||||||
[templates]: /templates/ "The templates section of the Hugo docs."
|
[templates]: /templates/ "The templates section of the Hugo docs."
|
||||||
[vimeoexample]: #single-flexible-example-vimeo
|
[vimeoexample]: #single-flexible-example-vimeo
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ categories: [themes]
|
|||||||
tags: [themes, source, organization, directories]
|
tags: [themes, source, organization, directories]
|
||||||
weight: 30
|
weight: 30
|
||||||
draft: false
|
draft: false
|
||||||
aliases: [/themes/creation/]
|
aliases: [/themes/creation/,/tutorials/creating-a-new-theme/]
|
||||||
toc: true
|
toc: true
|
||||||
wip: true
|
wip: true
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Take a look at this list of migration tools if you currently use other logging t
|
|||||||
|
|
||||||
## Jekyll
|
## Jekyll
|
||||||
|
|
||||||
Alternatively, you can follow the manual [migration guide](/tutorials/migrate-from-jekyll-to-hugo/) or use the new [Jekyll import command](/commands/hugo_import_jekyll/).
|
Alternatively, you can use the new [Jekyll import command](/commands/hugo_import_jekyll/).
|
||||||
|
|
||||||
- [JekyllToHugo](https://github.com/SenjinDarashiva/JekyllToHugo) - A Small script for converting Jekyll blog posts to a Hugo site.
|
- [JekyllToHugo](https://github.com/SenjinDarashiva/JekyllToHugo) - A Small script for converting Jekyll blog posts to a Hugo site.
|
||||||
- [ConvertToHugo](https://github.com/coderzh/ConvertToHugo) - Convert your blog from Jekyll to Hugo.
|
- [ConvertToHugo](https://github.com/coderzh/ConvertToHugo) - Convert your blog from Jekyll to Hugo.
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ This template would render as follows, assuming you've set [`uglyURLs`](/content
|
|||||||
{{% /output %}}
|
{{% /output %}}
|
||||||
|
|
||||||
{{% note %}}
|
{{% note %}}
|
||||||
See [Archetypes](/content-management/archetyps) for consistency of `Params` across pieces of content.
|
See [Archetypes](/content-management/archetypes/) for consistency of `Params` across pieces of content.
|
||||||
{{% /note %}}
|
{{% /note %}}
|
||||||
|
|
||||||
### The `.Param` Method
|
### The `.Param` Method
|
||||||
|
|||||||
Reference in new issue
Block a user