summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-01-31 11:08:08 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-01-31 11:08:08 +0100
commit158e1151cdfbdebd2e4a527e828d8a0b17933787 (patch)
treeb73947184a82fe10366dbefe7e3f2d0e415ae801
parentf0c0ece44d55b6c2997cbd106d1bc099ea1a2fa7 (diff)
parent337d0c5f516ee085205e8abefdb7f87e6d33ca05 (diff)
-rw-r--r--docs/archetypes/default.md12
-rw-r--r--docs/archetypes/functions.md (renamed from docs/themes/gohugoioTheme/archetypes/functions.md)0
-rw-r--r--docs/config.toml3
-rw-r--r--docs/content/about/features.md2
-rw-r--r--docs/content/about/new-in-032/index.md10
-rw-r--r--docs/content/about/what-is-hugo.md4
-rw-r--r--docs/content/content-management/archetypes.md2
-rw-r--r--docs/content/content-management/front-matter.md8
-rw-r--r--docs/content/content-management/image-processing/index.md141
-rw-r--r--docs/content/content-management/image-processing/sunset.jpgbin0 -> 90587 bytes
-rw-r--r--docs/content/content-management/multilingual.md26
-rw-r--r--docs/content/content-management/organization/1-featured-content-bundles.pngbin0 -> 63640 bytes
-rw-r--r--docs/content/content-management/organization/index.md (renamed from docs/content/content-management/organization.md)23
-rw-r--r--docs/content/content-management/page-bundles.md182
-rw-r--r--docs/content/content-management/page-resources.md184
-rw-r--r--docs/content/content-management/taxonomies.md2
-rw-r--r--docs/content/contribute/documentation.md4
-rw-r--r--docs/content/functions/cond.md26
-rw-r--r--docs/content/functions/int.md25
-rw-r--r--docs/content/getting-started/configuration.md2
-rw-r--r--docs/content/getting-started/installing.md12
-rw-r--r--docs/content/hosting-and-deployment/deployment-with-nanobox.md7
-rw-r--r--docs/content/hosting-and-deployment/hosting-on-github.md151
-rw-r--r--docs/content/hosting-and-deployment/hosting-on-netlify.md2
-rw-r--r--docs/content/news/0.33-relnotes-ready.md10
-rw-r--r--docs/content/news/0.34-relnotes-ready.md12
-rw-r--r--docs/content/templates/homepage.md7
-rw-r--r--docs/content/templates/lists.md2
-rw-r--r--docs/content/templates/lookup-order.md183
-rw-r--r--docs/content/templates/menu-templates.md122
-rw-r--r--docs/content/templates/rss.md9
-rw-r--r--docs/content/templates/section-templates.md15
-rw-r--r--docs/content/templates/shortcode-templates.md6
-rw-r--r--docs/content/templates/single-page-templates.md19
-rw-r--r--docs/content/templates/sitemap-template.md2
-rw-r--r--docs/content/templates/taxonomy-templates.md25
-rw-r--r--docs/content/tools/editors.md2
-rw-r--r--docs/content/tools/migrations.md1
-rw-r--r--docs/content/tools/search.md3
-rw-r--r--docs/content/variables/menus.md19
-rw-r--r--docs/content/variables/page.md1
-rw-r--r--docs/data/docs.json464
-rw-r--r--docs/layouts/shortcodes/datatable-filtered.html28
-rw-r--r--docs/layouts/shortcodes/imgproc.html10
-rw-r--r--docs/netlify.toml6
-rw-r--r--docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_box_center.jpgbin0 -> 1939 bytes
-rw-r--r--docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_box_center.jpgbin0 -> 5141 bytes
-rw-r--r--docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_left.jpgbin0 -> 1714 bytes
-rw-r--r--docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_right.jpgbin0 -> 1668 bytes
-rw-r--r--docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_box_center.jpgbin0 -> 1295 bytes
-rw-r--r--docs/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_box_center.pngbin0 -> 21101 bytes
-rw-r--r--docs/static/images/blog/hugo-33-poster.pngbin0 -> 70230 bytes
-rw-r--r--docs/static/images/blog/hugo-34-poster.pngbin0 -> 78317 bytes
-rw-r--r--docs/themes/gohugoioTheme/archetypes/default.md13
-rw-r--r--docs/themes/gohugoioTheme/archetypes/showcase.md13
-rw-r--r--docs/themes/gohugoioTheme/archetypes/tutorials.md16
-rwxr-xr-xdocs/themes/gohugoioTheme/layouts/_default/baseof.html4
-rw-r--r--docs/themes/gohugoioTheme/layouts/partials/twitter_cards.html17
58 files changed, 1333 insertions, 504 deletions
diff --git a/docs/archetypes/default.md b/docs/archetypes/default.md
index 42eb9e04e..f30f01f74 100644
--- a/docs/archetypes/default.md
+++ b/docs/archetypes/default.md
@@ -1,11 +1,13 @@
---
-title: "{{ replace .TranslationBaseName "-" " " | title }}"
-date: {{ .Date }}
+linktitle: ""
description: ""
+godocref: ""
+publishdate: ""
+lastmod: ""
categories: []
-keywords: []
+tags: []
+weight: 00
slug: ""
aliases: []
toc: false
-draft: true
----
+--- \ No newline at end of file
diff --git a/docs/themes/gohugoioTheme/archetypes/functions.md b/docs/archetypes/functions.md
index 0a5dd344f..0a5dd344f 100644
--- a/docs/themes/gohugoioTheme/archetypes/functions.md
+++ b/docs/archetypes/functions.md
diff --git a/docs/config.toml b/docs/config.toml
index 346b66d03..61fd44303 100644
--- a/docs/config.toml
+++ b/docs/config.toml
@@ -98,7 +98,8 @@ twitter = "GoHugoIO"
## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
[blackfriday]
plainIDAnchors = true
- hrefTargetBlank = true
+ # See https://github.com/gohugoio/hugo/issues/2424
+ hrefTargetBlank = false
angledQuotes = false
latexDashes = true
diff --git a/docs/content/about/features.md b/docs/content/about/features.md
index f3f490cba..9d29c5bd3 100644
--- a/docs/content/about/features.md
+++ b/docs/content/about/features.md
@@ -55,7 +55,6 @@ toc: true
* Support for [Go][], [Amber], and [Ace][] HTML templates
* [Syntax highlighting][] powered by [Pygments][]
-See what's coming next in the [Hugo roadmap][].
[Ace]: /templates/alternatives/
[aliases]: /content-management/urls/#aliases
@@ -71,7 +70,6 @@ See what's coming next in the [Hugo roadmap][].
[Google Analytics]: https://google-analytics.com/
[homepage]: /templates/homepage/
[hostanywhere]: /hosting-and-deployment/
-[Hugo roadmap]: /about/roadmap
[install]: /getting-started/installing/
[LiveReload]: /getting-started/usage/
[organization for your projects]: /getting-started/directory-structure/
diff --git a/docs/content/about/new-in-032/index.md b/docs/content/about/new-in-032/index.md
index 0ae93b557..41bd58937 100644
--- a/docs/content/about/new-in-032/index.md
+++ b/docs/content/about/new-in-032/index.md
@@ -126,15 +126,15 @@ Image operations in Hugo currently **do not preserve EXIF data** as this is not
_The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_
-{{< imgproc sunset Resize "300x" >}}
+{{< imgproc sunset Resize "300x" />}}
-{{< imgproc sunset Fill "90x120 left" >}}
+{{< imgproc sunset Fill "90x120 left" />}}
-{{< imgproc sunset Fill "90x120 right" >}}
+{{< imgproc sunset Fill "90x120 right" />}}
-{{< imgproc sunset Fit "90x90" >}}
+{{< imgproc sunset Fit "90x90" />}}
-{{< imgproc sunset Resize "300x q10" >}}
+{{< imgproc sunset Resize "300x q10" />}}
This is the shortcode used in the examples above:
diff --git a/docs/content/about/what-is-hugo.md b/docs/content/about/what-is-hugo.md
index c61fa2d40..db947e2f9 100644
--- a/docs/content/about/what-is-hugo.md
+++ b/docs/content/about/what-is-hugo.md
@@ -19,7 +19,7 @@ toc: true
Hugo is a general-purpose website framework. Technically speaking, Hugo is a [static site generator][]. Unlike systems that dynamically build a page with each visitor request, Hugo builds pages when you create or update your content. Since websites are viewed far more often than they are edited, Hugo is designed to provide an optimal viewing experience for your website's end users and an ideal writing experience for website authors.
-Websites built with Hugo are extremely fast and secure. Hugo sites can be hosted anywhere, including [Netlify][], [Heroku][], [GoDaddy][], [DreamHost][], [GitHub Pages][], [Surge][], [Aerobatic][], [Firebase][], [Google Cloud Storage][], [Amazon S3][], [Rackspace][], [Azure][], and [CloudFront][] and work well with CDNs. Hugo sites run without the need for a database or dependencies on expensive runtimes like Ruby, Python, or PHP.
+Websites built with Hugo are extremely fast and secure. Hugo sites can be hosted anywhere, including [Netlify][], [Heroku][], [GoDaddy][], [DreamHost][], [GitHub Pages][], [GitLab Pages][], [Surge][], [Aerobatic][], [Firebase][], [Google Cloud Storage][], [Amazon S3][], [Rackspace][], [Azure][], and [CloudFront][] and work well with CDNs. Hugo sites run without the need for a database or dependencies on expensive runtimes like Ruby, Python, or PHP.
We think of Hugo as the ideal website creation tool with nearly instant build times, able to rebuild whenever a change is made.
@@ -50,7 +50,7 @@ Hugo is for people building a blog, a company site, a portfolio site, documentat
[DreamHost]: http://www.dreamhost.com/
[Firebase]: https://firebase.google.com/docs/hosting/ "Firebase static hosting"
[GitHub Pages]: https://pages.github.com/
-[GitLab]: https://about.gitlab.com
+[GitLab Pages]: https://about.gitlab.com/features/pages/
[Go language]: https://golang.org/
[GoDaddy]: https://www.godaddy.com/ "Godaddy.com Hosting"
[Google Cloud Storage]: http://cloud.google.com/storage/
diff --git a/docs/content/content-management/archetypes.md b/docs/content/content-management/archetypes.md
index c6b8bde76..269fda6db 100644
--- a/docs/content/content-management/archetypes.md
+++ b/docs/content/content-management/archetypes.md
@@ -173,7 +173,7 @@ title = "post from custom archetype"
As an example of archetypes in practice, the following is the `functions` archetype from the Hugo docs:
{{< code file="archetypes/functions.md" >}}
-{{< readfile file="/themes/gohugoioTheme/archetypes/functions.md" >}}
+{{< readfile file="/archetypes/functions.md" >}}
{{< /code >}}
{{% note %}}
diff --git a/docs/content/content-management/front-matter.md b/docs/content/content-management/front-matter.md
index b9123db23..01afb2e60 100644
--- a/docs/content/content-management/front-matter.md
+++ b/docs/content/content-management/front-matter.md
@@ -103,6 +103,9 @@ There are a few predefined variables that Hugo is aware of. See [Page Variables]
`expiryDate`
: the datetime at which the content should no longer be published by Hugo; expired content will not be rendered unless the `--buildExpired` flag is passed to the `hugo` command.
+`headless`
+: if `true`, sets a leaf bundle to be [headless][headless-bundle].
+
`isCJKLanguage`
: if `true`, Hugo will explicitly treat the content as a CJK language; both `.Summary` and `.WordCount` work properly in CJK languages.
@@ -127,6 +130,9 @@ There are a few predefined variables that Hugo is aware of. See [Page Variables]
`publishDate`
: if in the future, content will not be rendered unless the `--buildFuture` flag is passed to `hugo`.
+`resources`
+: used for configuring page bundle resources. See [Page Resources][page-resources].
+
`slug`
: appears as the tail of the output URL. A value specified in front matter will override the segment of the URL based on the filename.
@@ -186,11 +192,13 @@ It's possible to set some options for Markdown rendering in a content's front ma
[content type]: /content-management/types/
[contentorg]: /content-management/organization/
[definetype]: /content-management/types/#defining-a-content-type "Learn how to specify a type and a layout in a content's front matter"
+[headless-bundle]: /content-management/page-bundles/#headless-bundle
[json]: https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf "Specification for JSON, JavaScript Object Notation"
[lists]: /templates/lists/#ordering-content "See how to order content in list pages; for example, templates that look to specific _index.md for content and front matter."
[lookup]: /templates/lookup-order/ "Hugo traverses your templates in a specific order when rendering content to allow for DRYer templating."
[ordering]: /templates/lists/ "Hugo provides multiple ways to sort and order your content in list templates"
[outputs]: /templates/output-formats/ "With the release of v22, you can output your content to any text format using Hugo's familiar templating"
+[page-resources]: /content-management/page-resources/
[pagevars]: /variables/page/
[section]: /content-management/sections/
[taxweight]: /content-management/taxonomies/
diff --git a/docs/content/content-management/image-processing/index.md b/docs/content/content-management/image-processing/index.md
new file mode 100644
index 000000000..d31f28dce
--- /dev/null
+++ b/docs/content/content-management/image-processing/index.md
@@ -0,0 +1,141 @@
+---
+title: "Image Processing"
+description: "Image Page resources can be resized and cropped."
+date: 2018-01-24T13:10:00-05:00
+lastmod: 2018-01-26T15:59:07-05:00
+linktitle: "Image Processing"
+categories: ["content management"]
+keywords: [bundle,content,resources,images]
+weight: 4004
+draft: false
+toc: true
+menu:
+ docs:
+ parent: "content-management"
+ weight: 32
+---
+
+## The Image Page Resource
+
+The `image` is a [Page Resource]({{< relref "content-management/page-resources" >}}), and the processing methods listed below does not work on images inside your `/static` folder.
+
+
+To get all images in a [Page Bundle]({{< relref "content-management/organization#page-bundles" >}}):
+
+
+```html
+{{ with .Resources.ByType "image" }}
+{{ end }}
+
+```
+
+## Image Processing Methods
+
+
+The `image` resource implements the methods `Resize`, `Fit` and `Fill`, each returning the transformed image using the specified dimensions and processing options.
+
+Resize
+: Resizes the image to the specified width and height.
+
+```go
+// Resize to a width of 600px and preserve ratio
+{{ $image := $resource.Resize "600x" }}
+
+// Resize to a height of 400px and preserve ratio
+{{ $image := $resource.Resize "x400" }}
+
+// Resize to a width 600px and a height of 400px
+{{ $image := $resource.Resize "600x400" }}
+```
+
+Fit
+: Scale down the image to fit the given dimensions while maintaining aspect ratio. Both height and width are required.
+
+```go
+{{ $image := $resource.Fit "600x400" }}
+```
+
+Fill
+: Resize and crop the image to match the given dimensions. Both height and width are required.
+
+```go
+{{ $image := $resource.Fill "600x400" }}
+```
+
+
+{{% note %}}
+Image operations in Hugo currently **do not preserve EXIF data** as this is not supported by Go's [image package](https://github.com/golang/go/search?q=exif&type=Issues&utf8=%E2%9C%93). This will be improved on in the future.
+{{% /note %}}
+
+
+## Image Processing Options
+
+In addition to the dimensions (e.g. `600x400`), Hugo supports a set of additional image options.
+
+
+JPEG Quality
+: Only relevant for JPEG images, values 1 to 100 inclusive, higher is better. Default is 75.
+
+```go
+{{ $image.Resize "600x q50" }}
+```
+
+Rotate
+: Rotates an image by the given angle counter-clockwise. The rotation will be performed first to get the dimensions correct. The main use of this is to be able to manually correct for [EXIF orientation](https://github.com/golang/go/issues/4341) of JPEG images.
+
+```go
+{{ $image.Resize "600x r90" }}
+```
+
+Anchor
+: Only relevant for the `Fill` method. This is useful for thumbnail generation where the main motive is located in, say, the left corner.
+Valid are `Center`, `TopLeft`, `Top`, `TopRight`, `Left`, `Right`, `BottomLeft`, `Bottom`, `BottomRight`.
+
+```go
+{{ $image.Fill "300x200 BottomLeft" }}
+```
+
+Resample Filter
+: Filter used in resizing. Default is `Box`, a simple and fast resampling filter appropriate for downscaling.
+
+Examples are: `Box`, `NearestNeighbor`, `Linear`, `Gaussian`.
+
+See https://github.com/disintegration/imaging for more. If you want to trade quality for faster processing, this may be a option to test.
+
+```go
+{{ $image.Resize "600x400 Gaussian" }}
+```
+
+### Image Processing Examples
+
+_The photo of the sunset used in the examples below is Copyright [Bjørn Erik Pedersen](https://commons.wikimedia.org/wiki/User:Bep) (Creative Commons Attribution-Share Alike 4.0 International license)_
+
+
+{{< imgproc sunset Resize "300x" />}}
+
+{{< imgproc sunset Fill "90x120 left" />}}
+
+{{< imgproc sunset Fill "90x120 right" />}}
+
+{{< imgproc sunset Fit "90x90" />}}
+
+{{< imgproc sunset Resize "300x q10" />}}
+
+
+This is the shortcode used in the examples above:
+
+
+{{< code file="layouts/shortcodes/imgproc.html" >}}
+{{< readfile file="layouts/shortcodes/imgproc.html" >}}
+{{< /code >}}
+
+And it is used like this:
+
+```html
+{{</* imgproc sunset Resize "300x" /*/>}}
+```
+
+
+{{% note %}}
+**Tip:** Note the self-closing shortcode syntax above. The `imgproc` shortcode can be called both with and without **inner content**.
+{{% /note %}} \ No newline at end of file
diff --git a/docs/content/content-management/image-processing/sunset.jpg b/docs/content/content-management/image-processing/sunset.jpg
new file mode 100644
index 000000000..7d7307bed
--- /dev/null
+++ b/docs/content/content-management/image-processing/sunset.jpg
Binary files differ
diff --git a/docs/content/content-management/multilingual.md b/docs/content/content-management/multilingual.md
index 31d409109..22271b4c8 100644
--- a/docs/content/content-management/multilingual.md
+++ b/docs/content/content-management/multilingual.md
@@ -17,7 +17,7 @@ aliases: [/content/multilingual/,/content-management/multilingual/,/tutorials/cr
toc: true
---
-You should define the available languages in a `Languages` section in your site configuration.
+You should define the available languages in a `languages` section in your site configuration.
## Configure Languages
@@ -30,22 +30,24 @@ copyright = "Everything is mine"
[params.navigation]
help = "Help"
-[Languages]
-[Languages.en]
+[languages]
+[languages.en]
title = "My blog"
weight = 1
linkedin = "english-link"
-[Languages.fr]
+[languages.fr]
copyright = "Tout est à moi"
title = "Mon blog"
weight = 2
linkedin = "lien-francais"
-[Languages.fr.navigation]
+
+# skip params key for front matte