diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-08-17 10:09:42 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-08-17 10:09:42 +0200 |
commit | 873f8805cbfaee2d300f3264413b45b85399b767 (patch) | |
tree | 7c943edc5ffad9b00b6d5081ad8cfb77a4c67a3e /docs/content | |
parent | 37438757788d279c839506d54f460b2ab37db164 (diff) | |
parent | a95896878f4b4a79448b39ce93a4e0d3258b4a43 (diff) |
Merge commit 'a95896878f4b4a79448b39ce93a4e0d3258b4a43'
Diffstat (limited to 'docs/content')
-rw-r--r-- | docs/content/en/content-management/multilingual.md | 2 | ||||
-rw-r--r-- | docs/content/en/getting-started/configuration.md | 11 | ||||
-rw-r--r-- | docs/content/en/getting-started/directory-structure.md | 11 | ||||
-rw-r--r-- | docs/content/en/getting-started/installing.md | 9 | ||||
-rw-r--r-- | docs/content/en/showcase/arolla-cocoon/bio.md | 6 | ||||
-rw-r--r-- | docs/content/en/showcase/arolla-cocoon/featured-template.png | bin | 0 -> 451984 bytes | |||
-rw-r--r-- | docs/content/en/showcase/arolla-cocoon/index.md | 30 | ||||
-rw-r--r-- | docs/content/zh/templates/base.md | 2 |
8 files changed, 61 insertions, 10 deletions
diff --git a/docs/content/en/content-management/multilingual.md b/docs/content/en/content-management/multilingual.md index fab9c17bf..45b614351 100644 --- a/docs/content/en/content-management/multilingual.md +++ b/docs/content/en/content-management/multilingual.md @@ -19,6 +19,8 @@ toc: true You should define the available languages in a `languages` section in your site configuration. +> Also See [Hugo Multilingual Part 1: Content translation](https://regisphilibert.com/blog/2018/08/hugo-multilingual-part-1-managing-content-translation/) + ## Configure Languages The following is an example of a site configuration for a multilingual Hugo project: diff --git a/docs/content/en/getting-started/configuration.md b/docs/content/en/getting-started/configuration.md index 18f9e7025..3f36eb28c 100644 --- a/docs/content/en/getting-started/configuration.md +++ b/docs/content/en/getting-started/configuration.md @@ -44,6 +44,9 @@ config file(s). archetypeDir ("archetypes") : The directory where Hugo finds archetype files (content templates). +assetDir ("assets") +: The directory where Hugo finds asset files used in [Hugo Pipes](/hugo-pipes/). + baseURL : Hostname (and path) to the root, e.g. http://bep.is/ @@ -320,8 +323,8 @@ The default configuration is: ```toml [frontmatter] -date = ["date","publishDate", "lastmod"] -lastmod = [":git" "lastmod", "date","publishDate"] +date = ["date", "publishDate", "lastmod"] +lastmod = [":git", "lastmod", "date", "publishDate"] publishDate = ["publishDate", "date"] expiryDate = ["expiryDate"] ``` @@ -330,7 +333,7 @@ If you, as an example, have a non-standard date parameter in some of your conten ```toml [frontmatter] -date = [ "myDate", ":default"] +date = ["myDate", ":default"] ``` The `:default` is a shortcut to the default settings. The above will set `.Date` to the date value in `myDate` if present, if not we will look in `date`,`publishDate`, `lastmod` and pick the first valid date. @@ -347,7 +350,7 @@ An example: ```toml [frontmatter] -lastmod = ["lastmod" ,":fileModTime", ":default"] +lastmod = ["lastmod", ":fileModTime", ":default"] ``` diff --git a/docs/content/en/getting-started/directory-structure.md b/docs/content/en/getting-started/directory-structure.md index ebfe6646a..bf06dc538 100644 --- a/docs/content/en/getting-started/directory-structure.md +++ b/docs/content/en/getting-started/directory-structure.md @@ -27,6 +27,7 @@ Running the `hugo new site` generator from the command line will create a direct ``` . ├── archetypes +├── assets ├── config.toml ├── content ├── data @@ -44,6 +45,9 @@ The following is a high-level overview of each of the directories with links to : You can create new content files in Hugo using the `hugo new` command. 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`][] +: 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. + [`config.toml`](/getting-started/configuration/) : Every Hugo project should have a configuration file in TOML, YAML, or JSON format at the 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. @@ -58,16 +62,12 @@ used by Hugo when generating your website. You can write these files in YAML, JS : Stores templates in the form of `.html` files that specify how views of your content will be rendered into a static website. Templates include [list pages][lists], your [homepage][], [taxonomy templates][], [partials][], [single page templates][singles], and more. [`static`][] -: Stores all the static content for your future website: images, CSS, JavaScript, etc. When Hugo builds your site, all assets inside your static directory are copied over as-is. A good example of using the `static` folder is for [verifying site ownership on Google Search Console][searchconsole], where you want Hugo to copy over a complete HTML file without modifying its content. +: Stores all the static content: images, CSS, JavaScript, etc. When Hugo builds your site, all assets inside your static directory are copied over as-is. A good example of using the `static` folder is for [verifying site ownership on Google Search Console][searchconsole], where you want Hugo to copy over a complete HTML file without modifying its content. {{% note %}} From **Hugo 0.31** you can have multiple static directories. {{% /note %}} -{{% note %}} -Hugo does not currently ship with an asset pipeline ([#3207](https://github.com/gohugoio/hugo/issues/3207)). You can solicit support from the community in the [Hugo forums](https://discourse.gohugo.io) or check out a few of the [Hugo starter kits](/tools/starter-kits/) for examples of how Hugo developers are managing static assets. -{{% /note %}} - [archetypes]: /content-management/archetypes/ [configuration directives]: /getting-started/configuration/#all-variables-yaml @@ -87,3 +87,4 @@ Hugo does not currently ship with an asset pipeline ([#3207](https://github.com/ [taxonomies]: /content-management/taxonomies/ [taxonomy templates]: /templates/taxonomy-templates/ [types]: /content-management/types/ +[`assets`]: {{< ref "/hugo-pipes/introduction#asset-directory" >}} diff --git a/docs/content/en/getting-started/installing.md b/docs/content/en/getting-started/installing.md index c08a22835..deb2605b1 100644 --- a/docs/content/en/getting-started/installing.md +++ b/docs/content/en/getting-started/installing.md @@ -62,6 +62,14 @@ If you are on a Windows machine and use [Chocolatey][] for package management, y choco install hugo -confirm {{< /code >}} +### Scoop (Windows) + +If you are on a Windows machine and use [Scoop][] for package management, you can install Hugo with the following one-liner: + +```bash +scoop install hugo +``` + ### Source #### Prerequisite Tools @@ -500,6 +508,7 @@ Now that you've installed Hugo, read the [Quick Start guide][quickstart] and exp [quickstart]: /getting-started/quick-start/ [redhatforum]: https://discourse.gohugo.io/t/solved-fedora-copr-repository-out-of-service/2491 [releases]: https://github.com/gohugoio/hugo/releases +[Scoop]: https://scoop.sh/ [snaps]: http://snapcraft.io/docs/core/install [windowsarch]: https://esupport.trendmicro.com/en-us/home/pages/technical-support/1038680.aspx [Windows Environment Variables Editor]: http://eveditor.com/ diff --git a/docs/content/en/showcase/arolla-cocoon/bio.md b/docs/content/en/showcase/arolla-cocoon/bio.md new file mode 100644 index 000000000..f01228828 --- /dev/null +++ b/docs/content/en/showcase/arolla-cocoon/bio.md @@ -0,0 +1,6 @@ + +[Camping Arolla](http://www.camping-arolla.com/) is located in the heart of the Swiss Alps, at an altitude of 1.950 meters. + +The site is built by: + +* [Didier Divinerites](https://github.com/divinerites) diff --git a/docs/content/en/showcase/arolla-cocoon/featured-template.png b/docs/content/en/showcase/arolla-cocoon/featured-template.png Binary files differnew file mode 100644 index 000000000..d95bc5c83 --- /dev/null +++ b/docs/content/en/showcase/arolla-cocoon/featured-template.png diff --git a/docs/content/en/showcase/arolla-cocoon/index.md b/docs/content/en/showcase/arolla-cocoon/index.md new file mode 100644 index 000000000..730b9fda2 --- /dev/null +++ b/docs/content/en/showcase/arolla-cocoon/index.md @@ -0,0 +1,30 @@ +--- + +title: Cocoon & Cosy +date: 2018-08-10 +description: "Showcase: \"Emergency setup a dedicated site in an afternoon.\"" +siteURL: https://www.cocoon-arolla.com +siteSource: https://github.com/divinerites/cocoon +byline: "[Didier Divinerites](https://github.com/divinerites)" + +--- + +Swiss [Arolla campsite](http://www.camping-arolla.com/) runs the highest campsite in Europe and I'm completely re-doing their actuel Website with Hugo. + +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: + +- 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. +- Add a [hugo-easy-gallery / photoswipe](https://github.com/liwenyip/hugo-easy-gallery) on the main page with attractive images. +- Add the promo video with a simple *vimeo* shortcode. +- Replace the Google Maps widget by the [OpenStreetMap](http://www.openstreetmap.org/) equivalent +- Use a [Zotabox](http://www.zotabox.com) contact form. +- Write the content in French & in English directly on the content pages, describe their services, add fun facts and true testimonies. +- Setup a GPRD compliant site with the new Hugo options. +- Use [Netlify](https://www.netlify.com) for publishing it in a breeze. + +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. diff --git a/docs/content/zh/templates/base.md b/docs/content/zh/templates/base.md index 68f245662..4845f608f 100644 --- a/docs/content/zh/templates/base.md +++ b/docs/content/zh/templates/base.md @@ -4,7 +4,7 @@ linktitle: description: The base and block constructs allow you to define the outer shell of your master templates (i.e., the chrome of the page). godocref: https://golang.org/pkg/text/template/#example_Template_block date: 2017-02-01 -publishdate: 2017-02-01 +publishdate: 2018-08-11 lastmod: 2017-02-01 categories: [templates,fundamentals] keywords: [blocks,base] |