diff --git a/docs/.gitignore b/docs/.gitignore index dd088ba8f..190dfb1ab 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,3 +1,4 @@ /.idea /public nohup.out +.DS_Store diff --git a/docs/config.toml b/docs/config.toml index 53e4e9afa..4b60aac58 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -103,6 +103,18 @@ twitter = "GoHugoIO" angledQuotes = false latexDashes = true +[imaging] +# See https://github.com/disintegration/imaging +# CatmullRom is a sharp bicubic filter which should fit the docs site well with its many screenshots. +# Note that you can also set this per image processing. +resampleFilter = "CatmullRom" + +# Defatult JPEG quality setting. Default is 75. +quality = 75 + +anchor = "smart" + + ## As of v0.20, all content files include a default "categories" value that's the same as the section. This was a cheap future-proofing method and should/could be changed accordingly. [taxonomies] category = "categories" @@ -238,6 +250,12 @@ twitter = "GoHugoIO" identifier = "themes" url = "https://themes.gohugo.io/" + [[menu.global]] + name = "Showcase" + weight = 20 + identifier = "showcase" + url = "/showcase/" + # Anything with a weight > 100 gets an external icon [[menu.global]] name = "Community" diff --git a/docs/content/_index.md b/docs/content/_index.md index ec8883c44..c8976eb94 100644 --- a/docs/content/_index.md +++ b/docs/content/_index.md @@ -1,5 +1,5 @@ --- -title: "A Fast and Flexible Website Generator" +title: "The world’s fastest framework for building websites" date: 2017-03-02T12:00:00-05:00 features: - heading: Blistering Speed diff --git a/docs/content/about/what-is-hugo.md b/docs/content/about/what-is-hugo.md index db947e2f9..2c7339f7c 100644 --- a/docs/content/about/what-is-hugo.md +++ b/docs/content/about/what-is-hugo.md @@ -7,7 +7,7 @@ publishdate: 2017-02-01 lastmod: 2017-02-01 layout: single menu: - main: + docs: parent: "about" weight: 10 weight: 10 diff --git a/docs/content/content-management/_index.md b/docs/content/content-management/_index.md index a2fbce523..28f2ecf82 100644 --- a/docs/content/content-management/_index.md +++ b/docs/content/content-management/_index.md @@ -17,4 +17,4 @@ aliases: [/content/,/content/organization] toc: false --- -A static site generator needs to extend beyond front matter and a couple templates to be both scalable and *manageable*. Hugo was designed with not only developers in mind, but also content managers and authors. +A static site generator needs to extend beyond front matter and a couple of templates to be both scalable and *manageable*. Hugo was designed with not only developers in mind, but also content managers and authors. diff --git a/docs/content/content-management/organization/index.md b/docs/content/content-management/organization/index.md index 742a9e5fe..b810f6179 100644 --- a/docs/content/content-management/organization/index.md +++ b/docs/content/content-management/organization/index.md @@ -29,7 +29,7 @@ The illustration shows 3 bundles. Note that the home page bundle cannot contain {{% note %}} -The bundle docuementation is **work in progress**. We will publish more comprehensive docs about this soon. +The bundle documentation is **work in progress**. We will publish more comprehensive docs about this soon. {{% /note %}} diff --git a/docs/content/content-management/urls.md b/docs/content/content-management/urls.md index f0d9dca41..c2c08a4d4 100644 --- a/docs/content/content-management/urls.md +++ b/docs/content/content-management/urls.md @@ -161,7 +161,7 @@ Assuming a `baseURL` of `example.com`, the contents of the auto-generated alias ``` -The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case. If an end user of your website goes to `https://example.com/posts/my-old-url`, they will now be automatically redirected to the newer, correct URL. The addition of `` lets search engine bots know they they should not crawl and index your new alias page. +The `http-equiv="refresh"` line is what performs the redirect, in 0 seconds in this case. If an end user of your website goes to `https://example.com/posts/my-old-url`, they will now be automatically redirected to the newer, correct URL. The addition of `` lets search engine bots know that they should not crawl and index your new alias page. ### Customize You may customize this alias page by creating an `alias.html` template in the diff --git a/docs/content/getting-started/installing.md b/docs/content/getting-started/installing.md index d9ded804d..eb605c2a6 100644 --- a/docs/content/getting-started/installing.md +++ b/docs/content/getting-started/installing.md @@ -67,22 +67,23 @@ choco install hugo -confirm * [Git][installgit] * [Go (latest or previous version)][installgo] -* [govendor][] #### Vendored Dependencies -Hugo uses [govendor][] to vendor dependencies, but we don't commit the vendored packages themselves to the Hugo git repository. Therefore, a simple `go get` is *not* supported because the command is not vendor aware. *You must use `govendor` to fetch Hugo's dependencies.* +Hugo uses [dep][] to vendor dependencies, but we don't commit the vendored packages themselves to the Hugo git repository. Therefore, a simple `go get` is *not* supported because the command is not vendor aware. + +The simplest way is to use [mage][] (a Make alternative for Go projects.) #### Fetch from GitHub {{< code file="from-gh.sh" >}} -go get github.com/kardianos/govendor -govendor get github.com/gohugoio/hugo -go install github.com/gohugoio/hugo +go get github.com/magefile/mage +go get -d github.com/gohugoio/hugo +cd $HOME/go/src/github.com/gohugoio/hugo +mage vendor +mage install {{< /code >}} -`govendor get` will fetch Hugo and all its dependent libraries to `$GOPATH/src/github.com/gohugoio/hugo`, and `go install` compiles everything into a final `hugo` (or `hugo.exe`) executable inside `$GOPATH/bin/`. - {{% note %}} If you are a Windows user, substitute the `$HOME` environment variable above with `%USERPROFILE%`. {{% /note %}} @@ -486,7 +487,8 @@ Now that you've installed Hugo, read the [Quick Start guide][quickstart] and exp [content]: /content-management/ [@dhersam]: https://github.com/dhersam [forum]: https://discourse.gohugo.io -[govendor]: https://github.com/kardianos/govendor +[mage]: https://github.com/magefile/mage +[dep]: https://github.com/golang/dep [highlight shortcode]: /content-management/shortcodes/#highlight [installgit]: http://git-scm.com/ [installgo]: https://golang.org/dl/ diff --git a/docs/content/hosting-and-deployment/deployment-with-wercker.md b/docs/content/hosting-and-deployment/deployment-with-wercker.md index 9b41ed793..ac9d7a3e6 100644 --- a/docs/content/hosting-and-deployment/deployment-with-wercker.md +++ b/docs/content/hosting-and-deployment/deployment-with-wercker.md @@ -128,7 +128,7 @@ git push -u origin master ## Set Up Wercker -To sign up for a free Wercker account, go to and click the the **Sign Up** button on the top right of the home screen. +To sign up for a free Wercker account, go to and click the **Sign Up** button on the top right of the home screen. ![][3] diff --git a/docs/content/hosting-and-deployment/hosting-on-keycdn.md b/docs/content/hosting-and-deployment/hosting-on-keycdn.md index 78337c138..05bac2ff4 100644 --- a/docs/content/hosting-and-deployment/hosting-on-keycdn.md +++ b/docs/content/hosting-and-deployment/hosting-on-keycdn.md @@ -24,7 +24,7 @@ draft: false ## Create a KeyCDN Pull Zone -The first step will be to login to your KeyCDN account and create a new zone. Name this whatever you like and select the [Pull Zone](https://www.keycdn.com/support/create-a-pull-zone/) option. As for the the origin URL, your site will be running on [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/getting_started_part_one.html) with a URL of `https://youruser.gitlab.io/reponame/`. Use this as the Origin URL. +The first step will be to login to your KeyCDN account and create a new zone. Name this whatever you like and select the [Pull Zone](https://www.keycdn.com/support/create-a-pull-zone/) option. As for the origin URL, your site will be running on [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/getting_started_part_one.html) with a URL of `https://youruser.gitlab.io/reponame/`. Use this as the Origin URL. ![Screenshot of KeyCDN's pull zone creation page](/images/hosting-and-deployment/hosting-on-keycdn/keycdn-pull-zone.png) diff --git a/docs/content/news/0-16.md b/docs/content/news/0-16.md index 366862e4d..e33f8e546 100644 --- a/docs/content/news/0-16.md +++ b/docs/content/news/0-16.md @@ -90,7 +90,7 @@ times decreased anywhere from 10% to 99%. * Add config layout and content directory CLI options {{}} * Add boolean value comparison to `where` template function {{}} -* Do not write to to cache when `ignoreCache` is set {{}} +* Do not write to cache when `ignoreCache` is set {{}} * Add option to disable rendering of 404 page {{}} * Mercurial is no longer needed to build Hugo {{}} * Do not create `robots.txt` by default {{}} diff --git a/docs/content/news/0.36-relnotes/featured-hugo-36-poster.png b/docs/content/news/0.36-relnotes/featured-hugo-36-poster.png new file mode 100644 index 000000000..12dec42fc Binary files /dev/null and b/docs/content/news/0.36-relnotes/featured-hugo-36-poster.png differ diff --git a/docs/content/news/0.36-relnotes/index.md b/docs/content/news/0.36-relnotes/index.md new file mode 100644 index 000000000..4e6323287 --- /dev/null +++ b/docs/content/news/0.36-relnotes/index.md @@ -0,0 +1,50 @@ + +--- +date: 2018-02-05 +title: "Hugo 0.36: Smart Image Cropping!" +description: "Hugo 0.36 announces smart image cropping and some important bug fixes." +categories: ["Releases"] +--- + +Hugo `0.36` announces **smart cropping** of images, using the [library](https://github.com/muesli/smartcrop) created by [muesli](https://github.com/muesli). We will work with him to improve this even more in the future, but this is now the default used when cropping images in Hugo. + +Go [here](http://hugotest.bep.is/resourcemeta/smartcrop/) for a list of examples. + +This release represents **7 contributions by 3 contributors** to the main Hugo code base. + +Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs), +which has received **9 contributions by 4 contributors**. A special thanks to [@bep](https://github.com/bep), [@Jibec](https://github.com/Jibec), [@Nick-Rivera](https://github.com/Nick-Rivera), and [@kaushalmodi](https://github.com/kaushalmodi) for their work on the documentation site. + + +Hugo now has: + +* 23100+ [stars](https://github.com/gohugoio/hugo/stargazers) +* 448+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors) +* 197+ [themes](http://themes.gohugo.io/) + +## Notes +Hugo now defaults to **smart crop** when cropping images, if you don't specify it when calling `.Fill`. + +You can get the old default by adding this to your `config.toml`: + +```toml +[imaging] +anchor = "center" +``` +Also, we have removed the superflous anchor name from the processed filenames that does not use this anchor, so it can be wise to run `hugo --gc` once to remove unused images. + +## Enhancements +* Add smart cropping [722086b4](https://github.com/gohugoio/hugo/commit/722086b4ed3e77d1aba6724474bec06d08e7de06) [@bep](https://github.com/bep) [#4375](https://github.com/gohugoio/hugo/issues/4375) + +## Fixes +* Ensure site templates can override theme templates [084cf419](https://github.com/gohugoio/hugo/commit/084cf4191b3c1e7590a4223fd9251019ef5d4c21) [@moorereason](https://github.com/moorereason) [#3505](https://github.com/gohugoio/hugo/issues/3505) +* Add additional test to `TestTemplateLookupOrder` [fc06d5c1](https://github.com/gohugoio/hugo/commit/fc06d5c18bb1e47f90f0297aa8121ee0775e047d) [@moorereason](https://github.com/moorereason) [#3505](https://github.com/gohugoio/hugo/issues/3505) +* Fix broken `TestTemplateLookupOrder` [9a367d9d](https://github.com/gohugoio/hugo/commit/9a367d9d06db6f6cf22121d0397c464ae36e7089) [@moorereason](https://github.com/moorereason) +* Fix JSON array-based data file handling regression [4402c077](https://github.com/gohugoio/hugo/commit/4402c077754991df19c3bbab0c4a671dcfdc192c) [@vassudanagunta](https://github.com/vassudanagunta) [#4361](https://github.com/gohugoio/hugo/issues/4361) +* Increase data directory test coverage [4743de0d](https://github.com/gohugoio/hugo/commit/4743de0d3c7564fc06972074e903d5502d204353) [@vassudanagunta](https://github.com/vassudanagunta) [#4138](https://github.com/gohugoio/hugo/issues/4138) + + + + + + diff --git a/docs/content/showcase/hartwell-insurance/bio.md b/docs/content/showcase/hartwell-insurance/bio.md new file mode 100644 index 000000000..8bfdad49d --- /dev/null +++ b/docs/content/showcase/hartwell-insurance/bio.md @@ -0,0 +1,6 @@ + +Hartwell Insurance is an insurance company set up solely to service the Broker community. + +By combining **Hugo**, **Service Worker** and **Netlify**, we were able to achieve incredible global site performance. + +The site was built by [Tomango](http://www.tomango.co.uk) diff --git a/docs/content/showcase/hartwell-insurance/featured.png b/docs/content/showcase/hartwell-insurance/featured.png new file mode 100644 index 000000000..ced251f98 Binary files /dev/null and b/docs/content/showcase/hartwell-insurance/featured.png differ diff --git a/docs/content/showcase/hartwell-insurance/hartwell-columns.png b/docs/content/showcase/hartwell-insurance/hartwell-columns.png new file mode 100644 index 000000000..eb669b5a3 Binary files /dev/null and b/docs/content/showcase/hartwell-insurance/hartwell-columns.png differ diff --git a/docs/content/showcase/hartwell-insurance/hartwell-lighthouse.png b/docs/content/showcase/hartwell-insurance/hartwell-lighthouse.png new file mode 100644 index 000000000..672a8c1c8 Binary files /dev/null and b/docs/content/showcase/hartwell-insurance/hartwell-lighthouse.png differ diff --git a/docs/content/showcase/hartwell-insurance/hartwell-webpagetest.png b/docs/content/showcase/hartwell-insurance/hartwell-webpagetest.png new file mode 100644 index 000000000..8dc035f3e Binary files /dev/null and b/docs/content/showcase/hartwell-insurance/hartwell-webpagetest.png differ diff --git a/docs/content/showcase/hartwell-insurance/index.md b/docs/content/showcase/hartwell-insurance/index.md new file mode 100644 index 000000000..b291a640f --- /dev/null +++ b/docs/content/showcase/hartwell-insurance/index.md @@ -0,0 +1,69 @@ +--- + +title: Hartwell Insurance + +date: 2018-02-09 + +description: "Showcase: \"Hugo + Netlify + PWA makes for a rapid website.\"" + +siteURL: https://www.hartwell-insurance.com/ + +byline: "[Trys Mudford](http://www.trysmudford.com), Lead Developer, Tomango" + +--- + +We’ve just launched a shiny new website for [Hartwell Insurance](https://www.hartwell-insurance.com/) – I’m really proud of it. It was tackled it in a different way to most previous Tomango site builds, using some fancy new tools and some vintage web standards. + +It’s multi-page, single-page (!) website written in Hugo, a static site generator built with performance as a first-class feature. _I’ve outlined a load of benefits to Hugo & static sites [here](https://why-static.netlify.com/), in case you’re interested._ + +> **In essence, a static site generator pre-renders the whole site into HTML files and serves them like it’s 1995.** + +There’s no Apache or Node backend that does compilation at runtime, it’s all done at the build step. This means the server; Netlify in this case, only has to do one thing – serve files. Unsurprisingly, serving simple files is VERY quick. + +The starter point was the [victor-hugo](https://github.com/netlify/victor-hugo) repository that Netlify have created. It let me dive in with Hugo, PostCSS, BrowserSync and ES6 without setting up any tooling myself – always a win! + +I then took all the content from the design file and moved it into Markdown, putting shortcodes in where necessary. This site did need a number of custom shortcodes for the presentational elements like the expanding circles and full width backgrounds. But mostly it was just clean, semantic HTML with some CSS and JS enhancement thrown in. + +For example, this two column layout shown below. I used CSS Columns with a `break-after: always;` on the `

`. No multi-wrapper or difficult-to-clear shortcodes, just clean HTML. + +![The multi-column setup on Hartwell Insurance](hartwell-columns.png) + +For the ripple effects on the section headings, I used JS to prepend a `` element then animated it with `RequestAnimationFrame`. It adds a nice bit of movement on the page. + +On the [Hartwell Profitmaker](https://www.hartwell-insurance.com/profitmaker/) section, I toyed with the idea of using Vue.js for the calculator, but after giving it some thought, I decided to code in Vanilla. The result, all of the site JS comes in at 3.2KB! + +The plan was to host with Netlify and therefore get access to Netlify Forms. It meant spending 0 minutes on getting a backend set up – I could focus fully on the frontend. + +Cache invalidation isn’t normally something I spend all that much time thinking about when building a site. But as this site was going to be a Progressive Web App, invalidating files would be important to ensure the site didn’t appear broken when we made changes. As I was using Victor-Hugo, I wasn’t really sure how to best tackle this and sadly spent far too many hours wrangling with Webpack and Gulp files to try and get hashed file names working nicely. + +Then; while I was waiting for a haircut, I read a [Netlify blog post](https://www.netlify.com/blog/2017/02/23/better-living-through-caching/) on how they do cache invalidation with HTTP2 and it promptly blew my mind. + +When you request an asset, they send an ETag in the headers which is a hash of the file. There’s also a header to tell the browser not to trust it’s own cache (which sounds a little bit bonkers). + +So when you request the page, it opens a persistent HTTP2 connection up (so no new connections for file requests). When it gets to requesting that asset, the browser sends the ETag back to Netlify and they either return nothing if the ETag matches, or the new file with the new ETag. No `app.klfjlkdsfjdslkfjdslkfdsj.js` or `app.js?v=20180112`. Just a clean `app.js` with instant cache invalidation. Amazing. + +Finally, the [Service Worker](https://www.hartwell-insurance.com/sw.js) could be added. This turned out to be straightforward as the Netlify cache invalidation system solved most of the pain points. I went for a network-first, cache-fallback setup for both assets and HTML. This does mean flaky speeds are reliant on the page connection time, but given we’re on HTTP2, I’m hoping the persistent connection and tiny ETag size will keep it quick. For online connections, every request is up to date and instantly live after any update. Offline connections fall back to every assets’ last cached state. It seems to work really nicely, and there’s no need for an update prompt if assets have changed. + +--- + +## The results + +The WebPageTest results are looking good. The speed index is 456, 10x smaller than the average Alexa top 300,000 score. + +![WebPageTest results](hartwell-webpagetest.png) + +[TestMySite.io](https://testmysite.io/5a7e1bb2df99531a23c9ad2f/hartwell-insurance.com) is return ~2ms time to first byte from the CDN edge nodes. Lighthouse audits are also very promising. There’s still some improvement to be gained lazy-loading the images and inlining the CSS. I’m less excited about the [second suggestion](http://www.trysmudford.com/css-in-2017/), but I’ll certainly look at some lazy-loading, especially as I’m already using `IntersectionObserver` for some animations. + +![Lighthouse results](hartwell-lighthouse.png) + +The most encouraging result is how quick the site is around the world. Most Tomango clients (and their customers) are pretty local and almost exclusively UK-based. We have a dedicated server in Surrey that serves our market pretty well. It did take me by surprise just how much slower a connection from the USA, Australia and Japan to our server was. They’re waiting ~500ms just for the first byte, let alone downloading each asset. + +[Hartwell Insurance](https://www.hartwell-insurance.com/) are a US company so by putting them on our server, we’d be instantly hampering their local response times by literally seconds. This was one of the main reasons for going with Netlify. They provide global CDN hosting that’s quick from anywhere in the world. + +--- + +This project was such a blast to develop, it’s a real pleasure to put new technologies to good use in production, and to see real performance and usability benefits from them. Even using classic web methods of serving folders with files is fun when you’ve been databasing for a while – there’s something really ‘pure’ about it. + +--- + +_This was originally posted on [my website](http://www.trysmudford.com/perfomance-wins-with-hugo-and-netlify/)_ diff --git a/docs/content/showcase/pace-revenue-management/bio.md b/docs/content/showcase/pace-revenue-management/bio.md new file mode 100644 index 000000000..7c7cc9c1c --- /dev/null +++ b/docs/content/showcase/pace-revenue-management/bio.md @@ -0,0 +1,4 @@ + +Pace was started in 2016 to give hotels the super-power to always have the right price. + +We've been using **Hugo+Gulp** from the very beginning and the workflow is proving to scale incredibly well with us as we grow the team and business. diff --git a/docs/content/showcase/pace-revenue-management/featured.png b/docs/content/showcase/pace-revenue-management/featured.png new file mode 100644 index 000000000..fa0948e5f Binary files /dev/null and b/docs/content/showcase/pace-revenue-management/featured.png differ diff --git a/docs/content/showcase/pace-revenue-management/index.md b/docs/content/showcase/pace-revenue-management/index.md new file mode 100644 index 000000000..cb520acb2 --- /dev/null +++ b/docs/content/showcase/pace-revenue-management/index.md @@ -0,0 +1,28 @@ +--- + +title: Pace Revenue Management + +date: 2018-02-08 + +description: "Showcase: \"When we came across Hugo we were blown away.\"" + +siteURL: https://www.paceup.com/ + +# Link to the site's Hugo source code if public and you can/want to share. +# Remove or leave blank if not needed/wanted. + +# Add credit to the article author. Leave blank or remove if not needed/wanted. + +--- + +From the beginning, at Pace, we were focused on solving customer needs and didn't want to over-engineer our marketing or sales. At the same time we didn't want to lock ourselves into a Wordpress, Squarespace or the like. + +The ideal was a fast, simple, static site builder. When we came across Hugo we were blown away. Being a European company we wanted to be multi-lingual from the get-go and allow multiple team-members to collaborate and own their content. We also felt that a tech-company in 2018 should be capable of hosting its own blog in a simple way. + +Here was Hugo, that allowed us to completely separate content from layout. Our sales-team edit a markdown-file, the engineers commit and off we go -- immediately deployable or pre-viewable. + +The only other way to have all that Hugo offers is to go down the full rabbit-hole of building your own server-side React or some such. Possibly Jekyll but again very complex to work with. The alternatives come with too much work for what should be quite simple. + +**Hugo + Gulp + Netlify for the win! Don't over engineer your web presence!** + +Huge thanks to [@bep](https://github.com/bep) and [community](https://discourse.gohugo.io/) for Hugo. diff --git a/docs/content/showcase/template/bio.md b/docs/content/showcase/template/bio.md new file mode 100644 index 000000000..597163340 --- /dev/null +++ b/docs/content/showcase/template/bio.md @@ -0,0 +1,8 @@ + +Add some **general info** about the site here. + +The site is built by: + +* [Person 1](https://example.com) +* [Person 1](https://example.com) + diff --git a/docs/content/showcase/template/featured-template.png b/docs/content/showcase/template/featured-template.png new file mode 100644 index 000000000..4f390132e Binary files /dev/null and b/docs/content/showcase/template/featured-template.png differ diff --git a/docs/content/showcase/template/index.md b/docs/content/showcase/template/index.md new file mode 100644 index 000000000..4210269c8 --- /dev/null +++ b/docs/content/showcase/template/index.md @@ -0,0 +1,49 @@ +--- + +# A suitable title for this article. +title: Hugo Showcase Template + +# Set this to the current date. +date: 2018-02-07 + +description: "A short description of this page." + +# The URL to the site on the internet. +siteURL: https://gohugo.io/ + +# Link to the site's Hugo source code if public and you can/want to share. +# Remove or leave blank if not needed/wanted. +siteSource: https://github.com/gohugoio/hugoDocs + +# Add credit to the article author. Leave blank or remove if not needed/wanted. +byline: "[bep](https://github.com/bep), Hugo Lead" + +--- + +Have a **notable Hugo site[^1]**? We would love to feature it in this **Showcase Section** + +We would really appreciate if you could: + +1. Fork https://github.com/gohugoio/hugoDocs +1. Create a copy of the [content/showcase/template](https://github.com/gohugoio/hugoDocs/tree/master/content/showcase/template) directory with a suitable name. If you now run `hugo server`, your site should show up in [http://localhost:1313/showcase/](http://localhost:1313/showcase/) and on the front page. +2. Adjust the [files](#files) and write a story about your site +3. Create a new pull request in https://github.com/gohugoio/hugoDocs/pulls + +**Note:** The Showcase section uses the latest bells and whistles from Hugo, [resources](/content-management/page-resources/) with [image processing](/content-management/image-processing/), so you need a reasonable up-to-date [Hugo version](https://github.com/gohugoio/hugo/releases). + +## Files + +The content of the [content/showcase/template](https://github.com/gohugoio/hugoDocs/tree/master/content/showcase/template) directory explained: + +index.md +: The main content file. Fill in required front matter metadata and write your story. I does not have to be a novel. It can even be self-promotional, but it should include Hugo in some form. + +bio.md +: A short summary of the website. Site credits (who built it) fits nicely here. + +featured-template.png +: A reasonably sized screenshot of your website. It can be named anything, but the name must start with "featured". The sample image is `1500x750` (2:1 aspect ratio). + + + +[^1]: We want this to show Hugo in its best light, so this is not for the average Hugo blog. In most cases the answer to "Is my site [notabable](http://www.dictionary.com/browse/notable)?" will be obvious, but if in doubt, create an [issue](https://github.com/gohugoio/hugoDocs/issues) with a link and some words, and we can discuss it. But if you have a site with an interesting Hugo story or a company site where the company itself is notable, you are most welcome. diff --git a/docs/content/templates/lists.md b/docs/content/templates/lists.md index 7609339f0..85de5fe09 100644 --- a/docs/content/templates/lists.md +++ b/docs/content/templates/lists.md @@ -143,7 +143,7 @@ This above will output the following HTML: You do *not* have to create an `_index.md` file for every list page (i.e. section, taxonomy, taxonomy terms, etc) or the homepage. If Hugo does not find an `_index.md` within the respective content section when rendering a list template, the page will be created but with no `{{.Content}}` and only the default values for `.Title` etc. -Using this same `layouts/_default/list.html` template and applying it to the the `quotes` section above will render the following output. Note that `quotes` does not have an `_index.md` file to pull from: +Using this same `layouts/_default/list.html` template and applying it to the `quotes` section above will render the following output. Note that `quotes` does not have an `_index.md` file to pull from: {{< code file="example.com/quote/index.html" copy="false" >}} diff --git a/docs/content/tools/frontends.md b/docs/content/tools/frontends.md index ecfce2d18..f41751b49 100644 --- a/docs/content/tools/frontends.md +++ b/docs/content/tools/frontends.md @@ -21,6 +21,7 @@ toc: false * [enwrite](https://github.com/zzamboni/enwrite). Enwrite enables evernote-powered, statically generated blogs and websites. Now posting to your blog or updating your website is as easy as writing a new note in Evernote! * [caddy-hugo](https://github.com/hacdias/caddy-hugo). `caddy-hugo` is an add-on for [Caddy](https://caddyserver.com/) that delivers a good UI to edit the content of your Hugo website. * [Lipi](https://github.com/SohanChy/Lipi). Lipi is a native GUI frontend written in Java to manage your Hugo websites. +* [Netlify CMS](https://netlifycms.org). Netlify CMS is an open source, serverless solution for managing Git based content in static sites, and it works on any platform that can host static sites. A [Hugo/Netlify CMS starter](https://github.com/netlify-templates/one-click-hugo-cms) is available to get new projects running quickly. ## Commercial Services diff --git a/docs/layouts/index.rss.xml b/docs/layouts/index.rss.xml new file mode 100644 index 000000000..1d3498a1e --- /dev/null +++ b/docs/layouts/index.rss.xml @@ -0,0 +1,38 @@ + + + {{ .Site.Title }} – {{ .Title }} + {{ .Permalink }} + Recent Hugo news from gohugo.io + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + + {{ "img/hugo.png" | absURL }} + GoHugo.io + {{ .Permalink }} + + {{ with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range first 50 (where .Site.RegularPages "Type" "in" (slice "news" "showcase")) }} + + {{ .Section | title }}: {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + + {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} + {{ with $img }} + {{ $img := .Resize "640x" }} + {{ printf "]]>" $img.Permalink $img.Width $img.Height | safeHTML }} + {{ end }} + {{ .Content | html }} + + + {{ end }} + + \ No newline at end of file diff --git a/docs/netlify.toml b/docs/netlify.toml index 55e6a89a5..7ecd9ebc4 100644 --- a/docs/netlify.toml +++ b/docs/netlify.toml @@ -1,18 +1,23 @@ [build] - publish = "public" - command = "hugo" +publish = "public" +command = "hugo" [context.production.environment] - HUGO_VERSION = "0.35" - HUGO_ENV = "production" - HUGO_ENABLEGITINFO = "true" +HUGO_VERSION = "0.36" +HUGO_ENV = "production" +HUGO_ENABLEGITINFO = "true" + +[context.deploy-preview] +command = "hugo -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] - HUGO_VERSION = "0.35" +HUGO_VERSION = "0.36" + +[context.branch-deploy] +command = "hugo -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] - HUGO_VERSION = "0.35" +HUGO_VERSION = "0.36" [context.next.environment] - HUGO_BASEURL = "https://next--gohugoio.netlify.com/" - HUGO_ENABLEGITINFO = "true" \ No newline at end of file +HUGO_ENABLEGITINFO = "true" diff --git a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_catmullrom.jpg b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_catmullrom.jpg new file mode 100644 index 000000000..6499e8341 Binary files /dev/null and b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_catmullrom.jpg differ diff --git a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_catmullrom.jpg b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_catmullrom.jpg new file mode 100644 index 000000000..8caa58798 Binary files /dev/null and b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_catmullrom.jpg differ diff --git a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_left.jpg b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_left.jpg deleted file mode 100644 index f9e218242..000000000 Binary files a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_left.jpg and /dev/null differ diff --git a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_right.jpg b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_right.jpg deleted file mode 100644 index fb96b61b6..000000000 Binary files a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_right.jpg and /dev/null differ diff --git a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_left.jpg b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_left.jpg new file mode 100644 index 000000000..69549b2df Binary files /dev/null and b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_left.jpg differ diff --git a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_right.jpg b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_right.jpg new file mode 100644 index 000000000..249708765 Binary files /dev/null and b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_right.jpg differ diff --git a/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_catmullrom.jpg b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_catmullrom.jpg new file mode 100644 index 000000000..634fb0ce1 Binary files /dev/null and b/docs/resources/_gen/images/about/new-in-032/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_catmullrom.jpg differ diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_200x200_fill_q75_catmullrom_smart1.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_200x200_fill_q75_catmullrom_smart1.jpg new file mode 100644 index 000000000..094f2a4f1 Binary files /dev/null and b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_200x200_fill_q75_catmullrom_smart1.jpg differ diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_catmullrom.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_catmullrom.jpg new file mode 100644 index 000000000..6499e8341 Binary files /dev/null and b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q10_catmullrom.jpg differ diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_catmullrom.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_catmullrom.jpg new file mode 100644 index 000000000..8caa58798 Binary files /dev/null and b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_300x0_resize_q75_catmullrom.jpg differ diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_left.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_left.jpg deleted file mode 100644 index f9e218242..000000000 Binary files a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_left.jpg and /dev/null differ diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_right.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_right.jpg deleted file mode 100644 index fb96b61b6..000000000 Binary files a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_box_right.jpg and /dev/null differ diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_left.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_left.jpg new file mode 100644 index 000000000..69549b2df Binary files /dev/null and b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_left.jpg differ diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_right.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_right.jpg new file mode 100644 index 000000000..249708765 Binary files /dev/null and b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x120_fill_q75_catmullrom_right.jpg differ diff --git a/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_catmullrom.jpg b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_catmullrom.jpg new file mode 100644 index 000000000..634fb0ce1 Binary files /dev/null and b/docs/resources/_gen/images/content-management/image-processing/sunset_hu59e56ffff1bc1d8d122b1403d34e039f_90587_90x90_fit_q75_catmullrom.jpg differ diff --git a/docs/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_catmullrom.png b/docs/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_catmullrom.png new file mode 100644 index 000000000..bc604e562 Binary files /dev/null and b/docs/resources/_gen/images/content-management/organization/1-featured-content-bundles_hu3e3ae7839b071119f32acaa20f204198_63640_300x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_480x0_resize_catmullrom.png b/docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_480x0_resize_catmullrom.png new file mode 100644 index 000000000..cf00e1cd6 Binary files /dev/null and b/docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_480x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_640x0_resize_catmullrom.png b/docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_640x0_resize_catmullrom.png new file mode 100644 index 000000000..37ff457ec Binary files /dev/null and b/docs/resources/_gen/images/news/0.33-relnotes/featured-hugo-33-poster_hu45ce9da1cdea6ca61c5f4f5baccdcad4_70230_640x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/news/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_480x0_resize_catmullrom.png b/docs/resources/_gen/images/news/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_480x0_resize_catmullrom.png new file mode 100644 index 000000000..c2ae4527c Binary files /dev/null and b/docs/resources/_gen/images/news/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_480x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/news/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_640x0_resize_catmullrom.png b/docs/resources/_gen/images/news/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_640x0_resize_catmullrom.png new file mode 100644 index 000000000..7788b1fd2 Binary files /dev/null and b/docs/resources/_gen/images/news/0.34-relnotes/featured-34-poster_hud8d73dc5df8d5a35383849a78eea35dd_78317_640x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_480x0_resize_catmullrom.png b/docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_480x0_resize_catmullrom.png new file mode 100644 index 000000000..d08624fb8 Binary files /dev/null and b/docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_480x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_640x0_resize_catmullrom.png b/docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_640x0_resize_catmullrom.png new file mode 100644 index 000000000..61197ee1b Binary files /dev/null and b/docs/resources/_gen/images/news/0.35-relnotes/featured-hugo-35-poster_hua42b1310dd72f60a34e02851ebf2f82e_88519_640x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/news/0.36-relnotes/featured-hugo-36-poster_huf2fee368f65c75d3878561ed4225c39a_67640_480x0_resize_catmullrom.png b/docs/resources/_gen/images/news/0.36-relnotes/featured-hugo-36-poster_huf2fee368f65c75d3878561ed4225c39a_67640_480x0_resize_catmullrom.png new file mode 100644 index 000000000..0084edfa5 Binary files /dev/null and b/docs/resources/_gen/images/news/0.36-relnotes/featured-hugo-36-poster_huf2fee368f65c75d3878561ed4225c39a_67640_480x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/news/0.36-relnotes/featured-hugo-36-poster_huf2fee368f65c75d3878561ed4225c39a_67640_640x0_resize_catmullrom.png b/docs/resources/_gen/images/news/0.36-relnotes/featured-hugo-36-poster_huf2fee368f65c75d3878561ed4225c39a_67640_640x0_resize_catmullrom.png new file mode 100644 index 000000000..a6dafec1d Binary files /dev/null and b/docs/resources/_gen/images/news/0.36-relnotes/featured-hugo-36-poster_huf2fee368f65c75d3878561ed4225c39a_67640_640x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/showcase/hartwell-insurance/featured_hu642e730c6f819b15fc6ebbaa25b0243f_446603_02c2d5bfbe1f2c621df733e4d040574d.png b/docs/resources/_gen/images/showcase/hartwell-insurance/featured_hu642e730c6f819b15fc6ebbaa25b0243f_446603_02c2d5bfbe1f2c621df733e4d040574d.png new file mode 100644 index 000000000..9b158b66c Binary files /dev/null and b/docs/resources/_gen/images/showcase/hartwell-insurance/featured_hu642e730c6f819b15fc6ebbaa25b0243f_446603_02c2d5bfbe1f2c621df733e4d040574d.png differ diff --git a/docs/resources/_gen/images/showcase/hartwell-insurance/featured_hu642e730c6f819b15fc6ebbaa25b0243f_446603_1024x512_fill_catmullrom_top.png b/docs/resources/_gen/images/showcase/hartwell-insurance/featured_hu642e730c6f819b15fc6ebbaa25b0243f_446603_1024x512_fill_catmullrom_top.png new file mode 100644 index 000000000..3324816cc Binary files /dev/null and b/docs/resources/_gen/images/showcase/hartwell-insurance/featured_hu642e730c6f819b15fc6ebbaa25b0243f_446603_1024x512_fill_catmullrom_top.png differ diff --git a/docs/resources/_gen/images/showcase/hartwell-insurance/featured_hu642e730c6f819b15fc6ebbaa25b0243f_446603_640x0_resize_catmullrom.png b/docs/resources/_gen/images/showcase/hartwell-insurance/featured_hu642e730c6f819b15fc6ebbaa25b0243f_446603_640x0_resize_catmullrom.png new file mode 100644 index 000000000..3bb21e8f7 Binary files /dev/null and b/docs/resources/_gen/images/showcase/hartwell-insurance/featured_hu642e730c6f819b15fc6ebbaa25b0243f_446603_640x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/showcase/pace-revenue-management/featured_hu143b6afebcd8780a08aa0a9f8e95dd02_298908_1024x512_fill_catmullrom_top.png b/docs/resources/_gen/images/showcase/pace-revenue-management/featured_hu143b6afebcd8780a08aa0a9f8e95dd02_298908_1024x512_fill_catmullrom_top.png new file mode 100644 index 000000000..c295aafad Binary files /dev/null and b/docs/resources/_gen/images/showcase/pace-revenue-management/featured_hu143b6afebcd8780a08aa0a9f8e95dd02_298908_1024x512_fill_catmullrom_top.png differ diff --git a/docs/resources/_gen/images/showcase/pace-revenue-management/featured_hu143b6afebcd8780a08aa0a9f8e95dd02_298908_640x0_resize_catmullrom.png b/docs/resources/_gen/images/showcase/pace-revenue-management/featured_hu143b6afebcd8780a08aa0a9f8e95dd02_298908_640x0_resize_catmullrom.png new file mode 100644 index 000000000..3bb9e2a67 Binary files /dev/null and b/docs/resources/_gen/images/showcase/pace-revenue-management/featured_hu143b6afebcd8780a08aa0a9f8e95dd02_298908_640x0_resize_catmullrom.png differ diff --git a/docs/resources/_gen/images/showcase/pace-revenue-management/featured_hu143b6afebcd8780a08aa0a9f8e95dd02_298908_978ff9297dc1d5096773813d2df58a6f.png b/docs/resources/_gen/images/showcase/pace-revenue-management/featured_hu143b6afebcd8780a08aa0a9f8e95dd02_298908_978ff9297dc1d5096773813d2df58a6f.png new file mode 100644 index 000000000..e4eb094af Binary files /dev/null and b/docs/resources/_gen/images/showcase/pace-revenue-management/featured_hu143b6afebcd8780a08aa0a9f8e95dd02_298908_978ff9297dc1d5096773813d2df58a6f.png differ diff --git a/docs/resources/_gen/images/showcase/template/featured-template_hu2f0d11388f944348b232a431caeb965b_41270_1024x512_fill_catmullrom_top.png b/docs/resources/_gen/images/showcase/template/featured-template_hu2f0d11388f944348b232a431caeb965b_41270_1024x512_fill_catmullrom_top.png new file mode 100644 index 000000000..aac9edb66 Binary files /dev/null and b/docs/resources/_gen/images/showcase/template/featured-template_hu2f0d11388f944348b232a431caeb965b_41270_1024x512_fill_catmullrom_top.png differ diff --git a/docs/resources/_gen/images/showcase/template/featured-template_hu2f0d11388f944348b232a431caeb965b_41270_34aaa1bbe5cc1b4798bfff8f28e1033e.png b/docs/resources/_gen/images/showcase/template/featured-template_hu2f0d11388f944348b232a431caeb965b_41270_34aaa1bbe5cc1b4798bfff8f28e1033e.png new file mode 100644 index 000000000..fe56cdfbe Binary files /dev/null and b/docs/resources/_gen/images/showcase/template/featured-template_hu2f0d11388f944348b232a431caeb965b_41270_34aaa1bbe5cc1b4798bfff8f28e1033e.png differ diff --git a/docs/resources/_gen/images/showcase/template/featured-template_hu2f0d11388f944348b232a431caeb965b_41270_640x0_resize_catmullrom.png b/docs/resources/_gen/images/showcase/template/featured-template_hu2f0d11388f944348b232a431caeb965b_41270_640x0_resize_catmullrom.png new file mode 100644 index 000000000..1bf56b67b Binary files /dev/null and b/docs/resources/_gen/images/showcase/template/featured-template_hu2f0d11388f944348b232a431caeb965b_41270_640x0_resize_catmullrom.png differ diff --git a/docs/src/package-lock.json b/docs/src/package-lock.json new file mode 100644 index 000000000..48e341a09 --- /dev/null +++ b/docs/src/package-lock.json @@ -0,0 +1,3 @@ +{ + "lockfileVersion": 1 +} diff --git a/docs/themes/gohugoioTheme/archetypes/showcase.md b/docs/themes/gohugoioTheme/archetypes/showcase.md new file mode 100644 index 000000000..d852bb1ca --- /dev/null +++ b/docs/themes/gohugoioTheme/archetypes/showcase.md @@ -0,0 +1,7 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +description: +siteURL: +siteSource: +--- diff --git a/docs/themes/gohugoioTheme/layouts/_default/baseof.html b/docs/themes/gohugoioTheme/layouts/_default/baseof.html index d6c854db0..b7ad4f10e 100755 --- a/docs/themes/gohugoioTheme/layouts/_default/baseof.html +++ b/docs/themes/gohugoioTheme/layouts/_default/baseof.html @@ -22,6 +22,10 @@ {{ end }} + {{ range .AlternativeOutputFormats -}} + + {{ end -}} + {{- partial "head-additions.html" . -}} {{- template "_internal/opengraph.html" . -}} diff --git a/docs/themes/gohugoioTheme/layouts/index.html b/docs/themes/gohugoioTheme/layouts/index.html index 5e8ebbdd4..9dcee424d 100644 --- a/docs/themes/gohugoioTheme/layouts/index.html +++ b/docs/themes/gohugoioTheme/layouts/index.html @@ -9,6 +9,8 @@ {{- partial "home-page-sections/features-icons" . -}} + {{- partial "home-page-sections/showcase.html" . -}} + {{- partial "home-page-sections/features-single" . -}}
diff --git a/docs/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html b/docs/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html new file mode 100644 index 000000000..337fd2fc8 --- /dev/null +++ b/docs/themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html @@ -0,0 +1,35 @@ +
+

Showcase

+ {{/* NOTE: transitions for this section are in themes/gohugoioTheme/src/css/_carousel.css */}} +
+
+
+ {{ range $p := first 10 (where .Site.RegularPages "Section" "showcase") }} + {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} + {{ with $img }} + {{ $big := .Fill "1024x512 top" }} + {{ $small := $big.Resize "512x" }} + + {{with $p.Title}} +
+
+ {{.}} → +
+
+ {{end}} +
+ {{ end }} + {{end}} +
+
+
+ {{/* END */}} +
{{/* using Flex to make the button show up on the right side */}} + See All +
+
\ No newline at end of file diff --git a/docs/themes/gohugoioTheme/layouts/partials/previous-next-links-in-section-with-title.html b/docs/themes/gohugoioTheme/layouts/partials/previous-next-links-in-section-with-title.html new file mode 100644 index 000000000..71a14c0ef --- /dev/null +++ b/docs/themes/gohugoioTheme/layouts/partials/previous-next-links-in-section-with-title.html @@ -0,0 +1,14 @@ +{{ if or .PrevInSection .NextInSection }} +{{/* this div holds these a tags as a unit for flex-box display */}} + +{{ end }} diff --git a/docs/themes/gohugoioTheme/layouts/partials/site-footer.html b/docs/themes/gohugoioTheme/layouts/partials/site-footer.html index fb5b04b81..ef32025eb 100755 --- a/docs/themes/gohugoioTheme/layouts/partials/site-footer.html +++ b/docs/themes/gohugoioTheme/layouts/partials/site-footer.html @@ -1,7 +1,7 @@
- + @@ -41,8 +41,8 @@ -
  - {{ partial "nav-mobile.html" . }} +
+ {{- partial "nav-mobile.html" . -}}
diff --git a/docs/themes/gohugoioTheme/layouts/showcase/list.html b/docs/themes/gohugoioTheme/layouts/showcase/list.html new file mode 100644 index 000000000..89565f342 --- /dev/null +++ b/docs/themes/gohugoioTheme/layouts/showcase/list.html @@ -0,0 +1,46 @@ +{{ define "main" }} +
+
+

+ {{ .Title }} +

+
+ {{ .Content }} +
+
+
+ {{ range (.Paginator 20).Pages }} + {{template "showcase_items" .}} + {{ end }} +
+ +
The Showcase articles are copyright the content authors. Any open source license will be attached.
+
+{{ end }} + + +{{define "showcase_items"}} + +
+ {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} + {{ with $img }} + {{ $big := .Fill "1024x512 top" }} + {{ $small := $big.Resize "512x" }} + + {{end}} +
{{/* the margin aligns to the bottom */}} +

+ {{- .Title -}} +

+
+
+
+ + +{{end}} diff --git a/docs/themes/gohugoioTheme/layouts/showcase/single.html b/docs/themes/gohugoioTheme/layouts/showcase/single.html new file mode 100644 index 000000000..c396f7b05 --- /dev/null +++ b/docs/themes/gohugoioTheme/layouts/showcase/single.html @@ -0,0 +1,99 @@ +{{ define "title" }} +Showcase: {{ .Title }} +{{ end }} + +{{ define "main" }} +
+ + +
+ +
+ {{template "details" .}} +
+ +
+ {{template "main-column" .}} +
+ + + +
+ +
{{/* bottom row */}} + Last Update: {{ .Lastmod.Format "January 2, 2006" }}
+ {{ partial "page-edit.html" . }} +
+
The Showcase articles are copyright the content authors. Any open source license will be attached.
+
+{{ end }} + + + +{{define "main-column"}} + {{ $img := (.Resources.ByType "image").GetMatch "*featured*" }} + {{ with $img }} + {{ $big := .Fill "1024x512 top" }} + {{ $small := $big.Resize "512x" }} + {{ $img.Title }} + {{ end }} + + +{{end}} + +{{define "details"}} + +{{end}} + +{{define "navigation"}} + {{$section := where .Site.RegularPages "Section" .Section}} + {{$number_of_entries := $section | len}} + +{{end}} diff --git a/docs/themes/gohugoioTheme/src/css/_carousel.css b/docs/themes/gohugoioTheme/src/css/_carousel.css new file mode 100644 index 000000000..11fae8702 --- /dev/null +++ b/docs/themes/gohugoioTheme/src/css/_carousel.css @@ -0,0 +1,25 @@ +/* These styles enhance the home page carousel, located here: themes/gohugoioTheme/layouts/partials/home-page-sections/showcase.html */ +.overflow-x-scroll{ + -webkit-overflow-scrolling: touch; +} +.row { + transition: 450ms transform; + font-size: 0; +} +.tile { + transition: 450ms all; +} +.details { + background: -webkit-gradient(linear, left bottom, left top, from(rgba(0,0,0,0.9)), to(rgba(0,0,0,0))); + background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%); + transition: 450ms opacity; +} +.tile:hover .details { + opacity: 1; +} +.row:hover .tile { + opacity: 0.3; +} +.row:hover .tile:hover { + opacity: 1; +} diff --git a/docs/themes/gohugoioTheme/src/css/main.css b/docs/themes/gohugoioTheme/src/css/main.css index 912bf5ce5..3f59a8c06 100755 --- a/docs/themes/gohugoioTheme/src/css/main.css +++ b/docs/themes/gohugoioTheme/src/css/main.css @@ -11,6 +11,7 @@ @import '_documentation-styles'; @import '_algolia'; +@import '_carousel'; @import '_code'; @import '_color-scheme'; @import '_columns'; diff --git a/docs/themes/gohugoioTheme/src/js/lazysizes.js b/docs/themes/gohugoioTheme/src/js/lazysizes.js index dc4ab1186..4eb3950af 100644 --- a/docs/themes/gohugoioTheme/src/js/lazysizes.js +++ b/docs/themes/gohugoioTheme/src/js/lazysizes.js @@ -1,2 +1,3 @@ var lazysizes = require('lazysizes'); // var lsnoscript = require('lazysizes/plugins/noscript/ls.noscript.js'); +var unveilhooks = require('lazysizes/plugins/unveilhooks/ls.unveilhooks.js'); diff --git a/docs/themes/gohugoioTheme/src/package-lock.json b/docs/themes/gohugoioTheme/src/package-lock.json index a977ac90a..c07d45b2f 100644 --- a/docs/themes/gohugoioTheme/src/package-lock.json +++ b/docs/themes/gohugoioTheme/src/package-lock.json @@ -2585,14 +2585,6 @@ } } }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, "string-width": { "version": "1.0.2", "bundled": true, @@ -2603,6 +2595,14 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, "stringstream": { "version": "0.0.5", "bundled": true, @@ -5411,15 +5411,6 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "dev": true }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -5431,6 +5422,15 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", diff --git a/docs/themes/gohugoioTheme/src/package.json b/docs/themes/gohugoioTheme/src/package.json index f0847492b..04bd261f3 100755 --- a/docs/themes/gohugoioTheme/src/package.json +++ b/docs/themes/gohugoioTheme/src/package.json @@ -8,7 +8,7 @@ "license": "MIT", "scripts": { "build:production": "rm -rf ../static/dist && webpack -p", - "build": "webpack --progress --colors --watch", + "build": "webpack --progress --colors --watch", "start": "npm run build" }, "devDependencies": { diff --git a/docs/themes/gohugoioTheme/static/dist/app.bundle.js b/docs/themes/gohugoioTheme/static/dist/app.bundle.js index 47a0fa0e0..fc757f71c 100644 --- a/docs/themes/gohugoioTheme/static/dist/app.bundle.js +++ b/docs/themes/gohugoioTheme/static/dist/app.bundle.js @@ -1,11708 +1,22 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 10); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/** -* Anchor for ID BPNY -**/ -var anchorForId = function anchorForId(id) { - var anchor = document.createElement("a"); - anchor.className = "header-link"; - anchor.href = "#" + id; - anchor.innerHTML = ' '; - return anchor; -}; - -var linkifyAnchors = function linkifyAnchors(level, containingElement) { - var headers = containingElement.getElementsByTagName("h" + level); - for (var h = 0; h < headers.length; h++) { - var header = headers[h]; - - if (typeof header.id !== "undefined" && header.id !== "") { - header.appendChild(anchorForId(header.id)); - } - } -}; - -document.onreadystatechange = function () { - if (this.readyState === "complete") { - var contentBlock = document.getElementsByClassName("prose")[0]; - if (!contentBlock) { - return; - } - for (var level = 2; level <= 2; level++) { - linkifyAnchors(level, contentBlock); - } - } -}; - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var Clipboard = __webpack_require__(11); -new Clipboard('.copy', { - target: function target(trigger) { - return trigger.nextElementSibling; - } -}).on('success', function (e) { - successMessage(e.trigger, 'Copied!'); - e.clearSelection(); -}).on('error', function (e) { - successMessage(e.trigger, fallbackMessage(e.action)); -}); - -function successMessage(elem, msg) { - elem.setAttribute('class', 'copied bg-primary-color-dark f6 absolute top-0 right-0 lh-solid hover-bg-primary-color-dark bn white ph3 pv2'); - elem.setAttribute('aria-label', msg); -} - -function fallbackMessage(elem, action) { - var actionMsg = ''; - var actionKey = action === 'cut' ? 'X' : 'C'; - if (isMac) { - actionMsg = 'Press ⌘-' + actionKey; - } else { - actionMsg = 'Press Ctrl-' + actionKey; - } - return actionMsg; -} - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var article = document.getElementById('prose'); - -if (article) { - var codeBlocks = article.getElementsByTagName('code'); - var _iteratorNormalCompletion = true; - var _didIteratorError = false; - var _iteratorError = undefined; - - try { - for (var _iterator = Object.entries(codeBlocks)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { - var _ref = _step.value; - - var _ref2 = _slicedToArray(_ref, 2); - - var key = _ref2[0]; - var codeBlock = _ref2[1]; - - var widthDif = codeBlock.scrollWidth - codeBlock.clientWidth; - if (widthDif > 0) codeBlock.parentNode.classList.add('expand'); - } - } catch (err) { - _didIteratorError = true; - _iteratorError = err; - } finally { - try { - if (!_iteratorNormalCompletion && _iterator.return) { - _iterator.return(); - } - } finally { - if (_didIteratorError) { - throw _iteratorError; - } - } - } -} - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var docsearch = __webpack_require__(12); -docsearch({ - apiKey: '167e7998590aebda7f9fedcf86bc4a55', - indexName: 'hugodocs', - inputSelector: '#search-input', - debug: true // Set debug to true if you want to inspect the dropdown -}); - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var lazysizes = __webpack_require__(13); -// var lsnoscript = require('lazysizes/plugins/noscript/ls.noscript.js'); - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// Grab any element that has the 'js-toggle' class and add an event listner for the toggleClass function -var toggleBtns = document.getElementsByClassName('js-toggle'); -for (var i = 0; i < toggleBtns.length; i++) { - toggleBtns[i].addEventListener('click', toggleClass, false); -} - -function toggleClass() { - // Define the data target via the dataset "target" (e.g. data-target=".docsmenu") - var content = this.dataset.target.split(' '); - // Find any menu items that are open - var mobileCurrentlyOpen = document.querySelector('.mobilemenu:not(.dn)'); - var desktopCurrentlyOpen = document.querySelector('.desktopmenu:not(.dn)'); - var desktopActive = document.querySelector('.desktopmenu:not(.dn)'); - - // Loop through the targets' divs - for (var i = 0; i < content.length; i++) { - var matches = document.querySelectorAll(content[i]); - //for each, if the div has the 'dn' class (which is "display:none;"), remove it, otherwise, add that class - [].forEach.call(matches, function (dom) { - dom.classList.contains('dn') ? dom.classList.remove('dn') : dom.classList.add('dn'); - return false; - }); - // close the currently open menu items - if (mobileCurrentlyOpen) mobileCurrentlyOpen.classList.add('dn'); - if (desktopCurrentlyOpen) desktopCurrentlyOpen.classList.add('dn'); - if (desktopActive) desktopActive.classList.remove('db'); - } -} - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/, 'js'); - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var scrollDir = __webpack_require__(14); - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// query selector targets Hugo TOC -(function () { - - 'use strict'; - - // Feature Test - - if ('querySelector' in document && 'addEventListener' in window && Array.prototype.forEach) { - - // Function to animate the scroll - var smoothScroll = function smoothScroll(anchor, duration) { - - // Calculate how far and how fast to scroll - var startLocation = window.pageYOffset; - var endLocation = anchor.offsetTop; - var distance = endLocation - startLocation; - var increments = distance / (duration / 16); - var stopAnimation; - - // Scroll the page by an increment, and check if it's time to stop - var animateScroll = function animateScroll() { - window.scrollBy(0, increments); - stopAnimation(); - }; - - // If scrolling down - if (increments >= 0) { - // Stop animation when you reach the anchor OR the bottom of the page - stopAnimation = function stopAnimation() { - var travelled = window.pageYOffset; - if (travelled >= endLocation - increments || window.innerHeight + travelled >= document.body.offsetHeight) { - clearInterval(runAnimation); - } - }; - } - // If scrolling up - else { - // Stop animation when you reach the anchor OR the top of the page - stopAnimation = function stopAnimation() { - var travelled = window.pageYOffset; - if (travelled <= (endLocation || 0)) { - clearInterval(runAnimation); - } - }; - } - - // Loop the animation function - var runAnimation = setInterval(animateScroll, 16); - }; - - // Define smooth scroll links - var scrollToggle = document.querySelectorAll('#TableOfContents ul li a'); - - // For each smooth scroll link - [].forEach.call(scrollToggle, function (toggle) { - - // When the smooth scroll link is clicked - toggle.addEventListener('click', function (e) { - - // Prevent the default link behavior - e.preventDefault(); - - // Get anchor link and calculate distance from the top - var dataID = toggle.getAttribute('href'); - var dataTarget = document.querySelector(dataID); - var dataSpeed = toggle.getAttribute('data-speed'); - - // If the anchor exists - if (dataTarget) { - // Scroll to the anchor - smoothScroll(dataTarget, dataSpeed || 500); - } - }, false); - }); - } -})(); - -/***/ }), -/* 9 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _main = __webpack_require__(9); - -var _main2 = _interopRequireDefault(_main); - -__webpack_require__(0); - -__webpack_require__(1); - -__webpack_require__(2); - -__webpack_require__(3); - -__webpack_require__(4); - -__webpack_require__(5); - -__webpack_require__(7); - -__webpack_require__(8); - -__webpack_require__(6); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -var require;var require;/*! +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=10)}([function(t,e,n){"use strict";var r=function(t){var e=document.createElement("a");return e.className="header-link",e.href="#"+t,e.innerHTML=' ',e},i=function(t,e){for(var n=e.getElementsByTagName("h"+t),i=0;i0&&p.parentNode.classList.add("expand")}}catch(t){a=!0,u=t}finally{try{!s&&l.return&&l.return()}finally{if(a)throw u}}}},function(t,e,n){"use strict";n(12)({apiKey:"167e7998590aebda7f9fedcf86bc4a55",indexName:"hugodocs",inputSelector:"#search-input",debug:!0})},function(t,e,n){"use strict";n(13),n(14)},function(t,e,n){"use strict";function r(){for(var t=this.dataset.target.split(" "),e=document.querySelector(".mobilemenu:not(.dn)"),n=document.querySelector(".desktopmenu:not(.dn)"),r=document.querySelector(".desktopmenu:not(.dn)"),i=0;i=0?function(){var t=window.pageYOffset;(t>=i-s||window.innerHeight+t>=document.body.offsetHeight)&&clearInterval(u)}:function(){window.pageYOffset<=(i||0)&&clearInterval(u)};var u=setInterval(a,16)},e=document.querySelectorAll("#TableOfContents ul li a");[].forEach.call(e,function(e){e.addEventListener("click",function(n){n.preventDefault();var r=e.getAttribute("href"),i=document.querySelector(r),o=e.getAttribute("data-speed");i&&t(i,o||500)},!1)})}}()},function(t,e){},function(t,e,n){"use strict";var r=n(9);!function(t){t&&t.__esModule}(r);n(0),n(1),n(2),n(3),n(4),n(5),n(7),n(8),n(6)},function(t,e,n){var r,r;/*! * clipboard.js v1.7.1 * https://zenorocha.github.io/clipboard.js * * Licensed MIT © Zeno Rocha */ -(function(f){if(true){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Clipboard = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0 && arguments[0] !== undefined ? arguments[0] : {}; - - this.action = options.action; - this.container = options.container; - this.emitter = options.emitter; - this.target = options.target; - this.text = options.text; - this.trigger = options.trigger; - - this.selectedText = ''; - } - }, { - key: 'initSelection', - value: function initSelection() { - if (this.text) { - this.selectFake(); - } else if (this.target) { - this.selectTarget(); - } - } - }, { - key: 'selectFake', - value: function selectFake() { - var _this = this; - - var isRTL = document.documentElement.getAttribute('dir') == 'rtl'; - - this.removeFake(); - - this.fakeHandlerCallback = function () { - return _this.removeFake(); - }; - this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true; - - this.fakeElem = document.createElement('textarea'); - // Prevent zooming on iOS - this.fakeElem.style.fontSize = '12pt'; - // Reset box model - this.fakeElem.style.border = '0'; - this.fakeElem.style.padding = '0'; - this.fakeElem.style.margin = '0'; - // Move element out of screen horizontally - this.fakeElem.style.position = 'absolute'; - this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px'; - // Move element to the same position vertically - var yPosition = window.pageYOffset || document.documentElement.scrollTop; - this.fakeElem.style.top = yPosition + 'px'; - - this.fakeElem.setAttribute('readonly', ''); - this.fakeElem.value = this.text; - - this.container.appendChild(this.fakeElem); - - this.selectedText = (0, _select2.default)(this.fakeElem); - this.copyText(); - } - }, { - key: 'removeFake', - value: function removeFake() { - if (this.fakeHandler) { - this.container.removeEventListener('click', this.fakeHandlerCallback); - this.fakeHandler = null; - this.fakeHandlerCallback = null; - } - - if (this.fakeElem) { - this.container.removeChild(this.fakeElem); - this.fakeElem = null; - } - } - }, { - key: 'selectTarget', - value: function selectTarget() { - this.selectedText = (0, _select2.default)(this.target); - this.copyText(); - } - }, { - key: 'copyText', - value: function copyText() { - var succeeded = void 0; - - try { - succeeded = document.execCommand(this.action); - } catch (err) { - succeeded = false; - } - - this.handleResult(succeeded); - } - }, { - key: 'handleResult', - value: function handleResult(succeeded) { - this.emitter.emit(succeeded ? 'success' : 'error', { - action: this.action, - text: this.selectedText, - trigger: this.trigger, - clearSelection: this.clearSelection.bind(this) - }); - } - }, { - key: 'clearSelection', - value: function clearSelection() { - if (this.trigger) { - this.trigger.focus(); - } - - window.getSelection().removeAllRanges(); - } - }, { - key: 'destroy', - value: function destroy() { - this.removeFake(); - } - }, { - key: 'action', - set: function set() { - var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy'; - - this._action = action; - - if (this._action !== 'copy' && this._action !== 'cut') { - throw new Error('Invalid "action" value, use either "copy" or "cut"'); - } - }, - get: function get() { - return this._action; - } - }, { - key: 'target', - set: function set(target) { - if (target !== undefined) { - if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) { - if (this.action === 'copy' && target.hasAttribute('disabled')) { - throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute'); - } - - if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) { - throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes'); - } - - this._target = target; - } else { - throw new Error('Invalid "target" value, use a valid Element'); - } - } - }, - get: function get() { - return this._target; - } - }]); - - return ClipboardAction; - }(); - - module.exports = ClipboardAction; -}); - -},{"select":5}],8:[function(require,module,exports){ -(function (global, factory) { - if (typeof define === "function" && define.amd) { - define(['module', './clipboard-action', 'tiny-emitter', 'good-listener'], factory); - } else if (typeof exports !== "undefined") { - factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener')); - } else { - var mod = { - exports: {} - }; - factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener); - global.clipboard = mod.exports; - } -})(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) { - 'use strict'; - - var _clipboardAction2 = _interopRequireDefault(_clipboardAction); - - var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter); - - var _goodListener2 = _interopRequireDefault(_goodListener); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - default: obj - }; - } - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { - return typeof obj; - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - var _createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - - function _possibleConstructorReturn(self, call) { - if (!self) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } - - return call && (typeof call === "object" || typeof call === "function") ? call : self; - } - - function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); - } - - subClass.prototype = Object.create(superClass && superClass.prototype, { - constructor: { - value: subClass, - enumerable: false, - writable: true, - configurable: true - } - }); - if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; - } - - var Clipboard = function (_Emitter) { - _inherits(Clipboard, _Emitter); - - /** - * @param {String|HTMLElement|HTMLCollection|NodeList} trigger - * @param {Object} options - */ - function Clipboard(trigger, options) { - _classCallCheck(this, Clipboard); - - var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this)); - - _this.resolveOptions(options); - _this.listenClick(trigger); - return _this; - } - - /** - * Defines if attributes would be resolved using internal setter functions - * or custom functions that were passed in the constructor. - * @param {Object} options - */ - - - _createClass(Clipboard, [{ - key: 'resolveOptions', - value: function resolveOptions() { - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - this.action = typeof options.action === 'function' ? options.action : this.defaultAction; - this.target = typeof options.target === 'function' ? options.target : this.defaultTarget; - this.text = typeof options.text === 'function' ? options.text : this.defaultText; - this.container = _typeof(options.container) === 'object' ? options.container : document.body; - } - }, { - key: 'listenClick', - value: function listenClick(trigger) { - var _this2 = this; - - this.listener = (0, _goodListener2.default)(trigger, 'click', function (e) { - return _this2.onClick(e); - }); - } - }, { - key: 'onClick', - value: function onClick(e) { - var trigger = e.delegateTarget || e.currentTarget; - - if (this.clipboardAction) { - this.clipboardAction = null; - } - - this.clipboardAction = new _clipboardAction2.default({ - action: this.action(trigger), - target: this.target(trigger), - text: this.text(trigger), - container: this.container, - trigger: trigger, - emitter: this - }); - } - }, { - key: 'defaultAction', - value: function defaultAction(trigger) { - return getAttributeValue('action', trigger); - } - }, { - key: 'defaultTarget', - value: function defaultTarget(trigger) { - var selector = getAttributeValue('target', trigger); - - if (selector) { - return document.querySelector(selector); - } - } - }, { - key: 'defaultText', - value: function defaultText(trigger) { - return getAttributeValue('text', trigger); - } - }, { - key: 'destroy', - value: function destroy() { - this.listener.destroy(); - - if (this.clipboardAction) { - this.clipboardAction.destroy(); - this.clipboardAction = null; - } - } - }], [{ - key: 'isSupported', - value: function isSupported() { - var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut']; - - var actions = typeof action === 'string' ? [action] : action; - var support = !!document.queryCommandSupported; - - actions.forEach(function (action) { - support = support && !!document.queryCommandSupported(action); - }); - - return support; - } - }]); - - return Clipboard; - }(_tinyEmitter2.default); - - /** - * Helper function to retrieve attribute value. - * @param {String} suffix - * @param {Element} element - */ - function getAttributeValue(suffix, element) { - var attribute = 'data-clipboard-' + suffix; - - if (!element.hasAttribute(attribute)) { - return; - } - - return element.getAttribute(attribute); - } - - module.exports = Clipboard; -}); - -},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8) -}); - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -/*! docsearch 2.4.1 | © Algolia | github.com/algolia/docsearch */ -(function webpackUniversalModuleDefinition(root, factory) { - if(true) - module.exports = factory(); - else if(typeof define === 'function' && define.amd) - define([], factory); - else if(typeof exports === 'object') - exports["docsearch"] = factory(); - else - root["docsearch"] = factory(); -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 46); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var DOM = __webpack_require__(1); - -function escapeRegExp(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); -} - -module.exports = { - // those methods are implemented differently - // depending on which build it is, using - // $... or angular... or Zepto... or require(...) - isArray: null, - isFunction: null, - isObject: null, - bind: null, - each: null, - map: null, - mixin: null, - - isMsie: function() { - // from https://github.com/ded/bowser/blob/master/bowser.js - return (/(msie|trident)/i).test(navigator.userAgent) ? - navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; - }, - - // http://stackoverflow.com/a/6969486 - escapeRegExChars: function(str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); - }, - - isNumber: function(obj) { return typeof obj === 'number'; }, - - toStr: function toStr(s) { - return s === undefined || s === null ? '' : s + ''; - }, - - cloneDeep: function cloneDeep(obj) { - var clone = this.mixin({}, obj); - var self = this; - this.each(clone, function(value, key) { - if (value) { - if (self.isArray(value)) { - clone[key] = [].concat(value); - } else if (self.isObject(value)) { - clone[key] = self.cloneDeep(value); - } - } - }); - return clone; - }, - - error: function(msg) { - throw new Error(msg); - }, - - every: function(obj, test) { - var result = true; - if (!obj) { - return result; - } - this.each(obj, function(val, key) { - result = test.call(null, val, key, obj); - if (!result) { - return false; - } - }); - return !!result; - }, - - any: function(obj, test) { - var found = false; - if (!obj) { - return found; - } - this.each(obj, function(val, key) { - if (test.call(null, val, key, obj)) { - found = true; - return false; - } - }); - return found; - }, - - getUniqueId: (function() { - var counter = 0; - return function() { return counter++; }; - })(), - - templatify: function templatify(obj) { - if (this.isFunction(obj)) { - return obj; - } - var $template = DOM.element(obj); - if ($template.prop('tagName') === 'SCRIPT') { - return function template() { return $template.text(); }; - } - return function template() { return String(obj); }; - }, - - defer: function(fn) { setTimeout(fn, 0); }, - - noop: function() {}, - - formatPrefix: function(prefix, noPrefix) { - return noPrefix ? '' : prefix + '-'; - }, - - className: function(prefix, clazz, skipDot) { - return (skipDot ? '' : '.') + prefix + clazz; - }, - - escapeHighlightedString: function(str, highlightPreTag, highlightPostTag) { - highlightPreTag = highlightPreTag || ''; - var pre = document.createElement('div'); - pre.appendChild(document.createTextNode(highlightPreTag)); - - highlightPostTag = highlightPostTag || ''; - var post = document.createElement('div'); - post.appendChild(document.createTextNode(highlightPostTag)); - - var div = document.createElement('div'); - div.appendChild(document.createTextNode(str)); - return div.innerHTML - .replace(RegExp(escapeRegExp(pre.innerHTML), 'g'), highlightPreTag) - .replace(RegExp(escapeRegExp(post.innerHTML), 'g'), highlightPostTag); - } -}; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -module.exports = { - element: null -}; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - - -var hasOwn = Object.prototype.hasOwnProperty; -var toString = Object.prototype.toString; - -module.exports = function forEach (obj, fn, ctx) { - if (toString.call(fn) !== '[object Function]') { - throw new TypeError('iterator must be a function'); - } - var l = obj.length; - if (l === +l) { - for (var i = 0; i < l; i++) { - fn.call(ctx, obj[i], i, obj); - } - } else { - for (var k in obj) { - if (hasOwn.call(obj, k)) { - fn.call(ctx, obj[k], k, obj); - } - } - } -}; - - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -module.exports = function clone(obj) { - return JSON.parse(JSON.stringify(obj)); -}; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// This file hosts our error definitions -// We use custom error "types" so that we can act on them when we need it -// e.g.: if error instanceof errors.UnparsableJSON then.. - -var inherits = __webpack_require__(20); - -function AlgoliaSearchError(message, extraProperties) { - var forEach = __webpack_require__(2); - - var error = this; - - // try to get a stacktrace - if (typeof Error.captureStackTrace === 'function') { - Error.captureStackTrace(this, this.constructor); - } else { - error.stack = (new Error()).stack || 'Cannot get a stacktrace, browser is too old'; - } - - this.name = 'AlgoliaSearchError'; - this.message = message || 'Unknown error'; - - if (extraProperties) { - forEach(extraProperties, function addToErrorObject(value, key) { - error[key] = value; - }); - } -} - -inherits(AlgoliaSearchError, Error); - -function createCustomError(name, message) { - function AlgoliaSearchCustomError() { - var args = Array.prototype.slice.call(arguments, 0); - - // custom message not set, use default - if (typeof args[0] !== 'string') { - args.unshift(message); - } - - AlgoliaSearchError.apply(this, args); - this.name = 'AlgoliaSearch' + name + 'Error'; - } - - inherits(AlgoliaSearchCustomError, AlgoliaSearchError); - - return AlgoliaSearchCustomError; -} - -// late exports to let various fn defs and inherits take place -module.exports = { - AlgoliaSearchError: AlgoliaSearchError, - UnparsableJSON: createCustomError( - 'UnparsableJSON', - 'Could not parse the incoming response as JSON, see err.more for details' - ), - RequestTimeout: createCustomError( - 'RequestTimeout', - 'Request timedout before getting a response' - ), - Network: createCustomError( - 'Network', - 'Network issue, see err.more for details' - ), - JSONPScriptFail: createCustomError( - 'JSONPScriptFail', - '