{{ .Title }}
@@ -159,6 +159,11 @@ It is also possible to add syntax highlighting with GitHub flavored code fences. ``` ```` +## List of Chroma Highlighting Languages + +The full list of Chroma lexers and their aliases (which is the identifier used in the `hightlight` template func or when doing highlighting in code fences): + +{{< chroma-lexers >}} ## Highlight with Pygments Classic diff --git a/docs/content/content-management/taxonomies.md b/docs/content/content-management/taxonomies.md index 1a59ebe3e..287c6f899 100644 --- a/docs/content/content-management/taxonomies.md +++ b/docs/content/content-management/taxonomies.md @@ -103,23 +103,14 @@ When taxonomies are used---and [taxonomy templates][] are provided---Hugo will a Taxonomies must be defined in your [website configuration][config] before they can be used throughout the site. You need to provide both the plural and singular labels for each taxonomy. For example, `singular key = "plural value"` for TOML and `singular key: "plural value"` for YAML. -### Example: TOML Taxonomy Configuration +### Example: Taxonomy Configuration -``` +{{< code-toggle copy="false" >}} [taxonomies] tag = "tags" category = "categories" series = "series" -``` - -### Example: YAML Taxonomy Configuration - -``` -taxonomies: - tag: "tags" - category: "categories" - series: "series" -``` +{{ code-toggle >}} ### Preserve Taxonomy Values @@ -145,53 +136,16 @@ Assigning content to a taxonomy is done in the [front matter][]. Simply create a If you would like the ability to quickly generate content files with preconfigured taxonomies or terms, read the docs on [Hugo archetypes](/content-management/archetypes/). {{% /note %}} -### Example: TOML Front Matter with Taxonomies +### Example: Front Matter with Taxonomies -``` -+++ +{{< code-toggle copy="false">}} title = "Hugo: A fast and flexible static site generator" tags = [ "Development", "Go", "fast", "Blogging" ] categories = [ "Development" ] series = [ "Go Web Dev" ] slug = "hugo" project_url = "https://github.com/gohugoio/hugo" -+++ -``` - -### Example: YAML Front Matter with Taxonomies - -``` ---- -title: "Hugo: A fast and flexible static site generator" -tags: ["Development", "Go", "fast", "Blogging"] -categories: ["Development"] -series: ["Go Web Dev"] -slug: "hugo" -project_url: "https://github.com/gohugoio/hugo" ---- -``` - -### Example: JSON Front Matter with Taxonomies - -``` -{ - "title": "Hugo: A fast and flexible static site generator", - "tags": [ - "Development", - "Go", - "fast", - "Blogging" - ], - "categories" : [ - "Development" - ], - "series" : [ - "Go Web Dev" - ], - "slug": "hugo", - "project_url": "https://github.com/gohugoio/hugo" -} -``` +{{ code-toggle >}} ## Order Taxonomies @@ -199,29 +153,15 @@ A content file can assign weight for each of its associate taxonomies. Taxonomic The following TOML and YAML examples show a piece of content that has a weight of 22, which can be used for ordering purposes when rendering the pages assigned to the "a", "b" and "c" values of the `tags` taxonomy. It has also been assigned the weight of 44 when rendering the "d" category page. -### Example: TOML Taxonomic `weight` +### Example: Taxonomic `weight` -``` -+++ +{{< code-toggle copy="false" >}} title = "foo" tags = [ "a", "b", "c" ] tags_weight = 22 categories = ["d"] categories_weight = 44 -+++ -``` - -### Example: YAML Taxonomic `weight` - -``` ---- -title: foo -tags: [ "a", "b", "c" ] -tags_weight: 22 -categories: ["d"] -categories_weight: 44 ---- -``` +{{ code-toggle >}} By using taxonomic weight, the same piece of content can appear in different positions in different taxonomies. diff --git a/docs/content/content-management/urls.md b/docs/content/content-management/urls.md index dd91fbced..d33725b72 100644 --- a/docs/content/content-management/urls.md +++ b/docs/content/content-management/urls.md @@ -29,19 +29,12 @@ These examples use the default values for `publishDir` and `contentDir`; i.e., ` For example, if one of your [sections][] is called `post` and you want to adjust the canonical path to be hierarchical based on the year, month, and post title, you could set up the following configurations in YAML and TOML, respectively. -### YAML Permalinks Configuration Example +### Permalinks Configuration Example -{{< code file="config.yml" copy="false" >}} +{{< code-toggle file="config" copy="false" >}} permalinks: post: /:year/:month/:title/ -{{< /code >}} - -### TOML Permalinks Configuration Example - -{{< code file="config.toml" copy="false" >}} -[permalinks] - post = "/:year/:month/:title/" -{{< /code >}} +{{< /code-toggle >}} Only the content under `post/` will have the new URL structure. For example, the file `content/post/sample-entry.md` with `date: 2017-02-27T19:20:00-05:00` in its front matter will render to `public/2017/02/sample-entry/index.html` at build time and therefore be reachable at `https://example.com/2017/02/sample-entry/`. diff --git a/docs/content/functions/where.md b/docs/content/functions/where.md index 3aa03296b..eb3111215 100644 --- a/docs/content/functions/where.md +++ b/docs/content/functions/where.md @@ -22,7 +22,7 @@ needsexample: true `where` filters an array to only the elements containing a matching value for a given field. -``` +```go-html-template {{ range where .Data.Pages "Section" "post" }} {{ .Content }} {{ end }} @@ -36,7 +36,7 @@ series: golang +++ ``` -``` +```go-html-template {{ range where .Site.Pages "Params.series" "golang" }} {{ .Content }} {{ end }} @@ -44,7 +44,7 @@ series: golang It can also be used with the logical operators `!=`, `>=`, `in`, etc. Without an operator, `where` compares a given field with a matching value equivalent to `=`. -``` +```go-html-template {{ range where .Data.Pages "Section" "!=" "post" }} {{ .Content }} {{ end }} @@ -81,7 +81,7 @@ The following logical operators are available with `where`: ## Use `where` with `intersect` -``` +```go-html-template {{ range where .Site.Pages ".Params.tags" "intersect" .Params.tags }} {{ if ne .Permalink $.Permalink }} {{ .Render "summary" }} @@ -113,7 +113,7 @@ The following grabs the first five content files in `post` using the [default or You can also nest `where` clauses to drill down on lists of content by more than one parameter. The following first grabs all pages in the "blog" section and then ranges through the result of the first `where` clause and finds all pages that are *not* featured: -``` +```go-html-template {{ range where (where .Data.Pages "Section" "blog" ) ".Params.featured" "!=" "true" }} ``` @@ -128,7 +128,7 @@ Only the following operators are available for `nil` * `=`, `==`, `eq`: True if the given field is not set. * `!=`, `<>`, `ne`: True if the given field is set. -``` +```go-html-template {{ range where .Data.Pages ".Params.specialpost" "!=" nil }} {{ .Content }} {{ end }} @@ -140,7 +140,7 @@ This is especially important for themes, but to list the most relevant pages on This will, by default, list pages from the _section with the most pages_. -```html +```go-html-template {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} ``` diff --git a/docs/content/getting-started/code-toggle.md b/docs/content/getting-started/code-toggle.md index ae3e3e84b..3e6b7da0d 100644 --- a/docs/content/getting-started/code-toggle.md +++ b/docs/content/getting-started/code-toggle.md @@ -15,7 +15,7 @@ toc: true This is an exemple for the Config Toggle shortcode. Its purpose is to let users choose a Config language by clicking on its corresponding tab. Upon doing so, every Code toggler on the page will be switched to the target language. Also, target language will be saved in user's `localStorage` so when they go to a different pages, Code Toggler display their last "toggled" config language. -## That Congig Toggler +## That Config Toggler {{< code-toggle file="config">}} @@ -72,4 +72,4 @@ blackfriday: plainIDAnchors: true extensions: - hardLineBreak -{{< /code >}} \ No newline at end of file +{{< /code >}} diff --git a/docs/content/getting-started/configuration.md b/docs/content/getting-started/configuration.md index ba2c87e82..8da25fd58 100644 --- a/docs/content/getting-started/configuration.md +++ b/docs/content/getting-started/configuration.md @@ -250,9 +250,11 @@ Similar to the template [lookup order][], Hugo has a default set of rules for se In your `config` file, you can direct Hugo as to how you want your website rendered, control your website's menus, and arbitrarily define site-wide parameters specific to your project. -## YAML Configuration +## Example Configuration -{{< code file="config.yml">}} +The following is a typical example of a configuration file. The values nested under `params:` will populate the [`.Site.Params`][] variable for use in [templates][]: + +{{< code-toggle file="config">}} baseURL: "https://yoursite.example.com/" title: "My Hugo Site" footnoteReturnLinkContents: "↩" @@ -266,49 +268,7 @@ params: - "foo1" - "foo2" SidebarRecentLimit: 5 -{{< /code >}} - -The following is a typical example of a YAML configuration file. The values nested under `params:` will populate the [`.Site.Params`][] variable for use in [templates][]: - -{{< code file="config.yml">}} -baseURL: "https://yoursite.example.com/" -title: "My Hugo Site" -footnoteReturnLinkContents: "↩" -permalinks: - post: /:year/:month/:title/ -params: - Subtitle: "Hugo is Absurdly Fast!" - AuthorName: "Jon Doe" - GitHubUser: "spf13" - ListOfFoo: - - "foo1" - - "foo2" - SidebarRecentLimit: 5 -{{< /code >}} - -## TOML Configuration - -The following is an example of a TOML configuration file. The values under `[params]` will populate the `.Site.Params` variable for use in [templates][]: - -{{< code file="config.toml">}} -contentDir = "content" -layoutDir = "layouts" -publishDir = "public" -buildDrafts = false -baseURL = "https://yoursite.example.com/" -canonifyURLs = true -title = "My Hugo Site" - -[taxonomies] - category = "categories" - tag = "tags" - -[params] - subtitle = "Hugo is Absurdly Fast!" - author = "John Doe" -{{< /code >}} - - +{{< /code-toggle >}} ## Configure with Environment Variables @@ -416,22 +376,13 @@ However, if you have specific needs with respect to Markdown, Hugo exposes some 2. Blackfriday flags must be grouped under the `blackfriday` key and can be set on both the site level *and* the page level. Any setting on a page will override its respective site setting. {{% /note %}} -{{< code file="bf-config.toml" >}} +{{< code-toggle file="config" >}} [blackfriday] angledQuotes = true fractions = false plainIDAnchors = true extensions = ["hardLineBreak"] -{{< /code >}} - -{{< code file="bf-config.yml" >}} -blackfriday: - angledQuotes: true - fractions: false - plainIDAnchors: true - extensions: - - hardLineBreak -{{< /code >}} +{{< /code-toggle >}} ## Configure Additional Output Formats diff --git a/docs/content/news/0.27-relnotes-ready.md b/docs/content/news/0.27-relnotes-ready.md index 3dd02d455..9251c3768 100644 --- a/docs/content/news/0.27-relnotes-ready.md +++ b/docs/content/news/0.27-relnotes-ready.md @@ -9,7 +9,7 @@ categories: ["Releases"] Hugo `0.27`comes with fast and flexible **Related Content** ([3b4f17bb](https://github.com/gohugoio/hugo/commit/3b4f17bbc9ff789faa581ac278ad109d1ac5b816) [@bep](https://github.com/bep) [#98](https://github.com/gohugoio/hugo/issues/98)). To add this to your site, put something like this in your single page template: -```html +```go-html-template {{ $related := .Site.RegularPages.Related . | first 5 }} {{ with $related }}See Also
diff --git a/docs/content/news/0.27-relnotes.md b/docs/content/news/0.27-relnotes.md index a4ead0816..92fc3a7b0 100644 --- a/docs/content/news/0.27-relnotes.md +++ b/docs/content/news/0.27-relnotes.md @@ -11,7 +11,7 @@ images: Hugo `0.27`comes with fast and flexible **Related Content** ([3b4f17bb](https://github.com/gohugoio/hugo/commit/3b4f17bbc9ff789faa581ac278ad109d1ac5b816) [@bep](https://github.com/bep) [#98](https://github.com/gohugoio/hugo/issues/98)). To add this to your site, put something like this in your single page template: -```html +```go-html-template {{ $related := .Site.RegularPages.Related . | first 5 }} {{ with $related }}See Also
diff --git a/docs/content/news/0.35-relnotes/index.md b/docs/content/news/0.35-relnotes/index.md index 6ce614dfa..80b4afd7b 100644 --- a/docs/content/news/0.35-relnotes/index.md +++ b/docs/content/news/0.35-relnotes/index.md @@ -74,7 +74,7 @@ Hugo now has: * Only set `url` if permalink in metadata and remove duplicate confirm msg [3752348e](https://github.com/gohugoio/hugo/commit/3752348ef13ced8f6f528b42ee7d76a12a97ae5c) [@lildude](https://github.com/lildude) [#1887](https://github.com/gohugoio/hugo/issues/1887) * Start Resources :counter first time they're used [7b472e46](https://github.com/gohugoio/hugo/commit/7b472e46084b603045b87cea870ffc73ac1cf7e7) [@bep](https://github.com/bep) [#4335](https://github.com/gohugoio/hugo/issues/4335) * Update to Go 1.9.3 [a91aba1c](https://github.com/gohugoio/hugo/commit/a91aba1c1562259dffd321a608f38c38dd4d5aeb) [@bep](https://github.com/bep) [#4328](https://github.com/gohugoio/hugo/issues/4328) -* Support pages without front matter [91bb774a](https://github.com/gohugoio/hugo/commit/91bb774ae4e129f7ed0624754b31479c960ef774) [@vassudanagunta](https://github.com/vassudanagunta) [#4320](https://github.com/gohugoio/hugo/issues/4320)[#4320](https://github.com/gohugoio/hugo/issues/4320) +* Support pages without front matter [91bb774a](https://github.com/gohugoio/hugo/commit/91bb774ae4e129f7ed0624754b31479c960ef774) [@vassudanagunta](https://github.com/vassudanagunta) [#4320](https://github.com/gohugoio/hugo/issues/4320) * Add page metadata dates tests [3f0379ad](https://github.com/gohugoio/hugo/commit/3f0379adb72389954ca2be6a9f2ebfcd65c6c440) [@vassudanagunta](https://github.com/vassudanagunta) * Re-generate CLI docs [1e27d058](https://github.com/gohugoio/hugo/commit/1e27d0589118a114e49c032e4bd68b4798e44a5b) [@bep](https://github.com/bep) * Remove and update deprecation status [d418c2c2](https://github.com/gohugoio/hugo/commit/d418c2c2eacdc1dc6fffe839e0a90600867878ca) [@bep](https://github.com/bep) diff --git a/docs/content/news/0.38-relnotes/featured-poster.png b/docs/content/news/0.38-relnotes/featured-poster.png new file mode 100644 index 000000000..1e7988c8f Binary files /dev/null and b/docs/content/news/0.38-relnotes/featured-poster.png differ diff --git a/docs/content/news/0.38-relnotes/index.md b/docs/content/news/0.38-relnotes/index.md index 1bfa7e14c..88ef88872 100644 --- a/docs/content/news/0.38-relnotes/index.md +++ b/docs/content/news/0.38-relnotes/index.md @@ -1,16 +1,15 @@ --- date: 2018-04-02 -title: "0.38" -description: "0.38" +title: "The Easter Egg Edition" +description: "Hugo 0.38: Date and slug from filenames, multiple content dirs, config from themes, language merge func …" categories: ["Releases"] --- - - - Hugo `0.38` is an **Easter egg** filled with good stuff. We now support fetching **date and slug from the content filename**, making the move from Jekyll even easier. And you can now set `contentDir` per language with intelligent merging, and themes can now provide configuration ... Also worth mentioning is several improvements in the [Chroma](https://github.com/alecthomas/chroma) highlighter, most notable support for Go templates. +We are working hard to get the documentation up-to-date with the new features, but you can also see them in action with the full source at [hugotest.bep.is](http://hugotest.bep.is/). + This release represents **39 contributions by 4 contributors** to the main Hugo code base. [@bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [@anthonyfok](https://github.com/anthonyfok), [@felicianotech](https://github.com/felicianotech), and [@paulcmal](https://github.com/paulcmal) for their ongoing contributions. diff --git a/docs/content/news/0.38.1-relnotes/index.md b/docs/content/news/0.38.1-relnotes/index.md index 73cdeb247..b900b6fb0 100644 --- a/docs/content/news/0.38.1-relnotes/index.md +++ b/docs/content/news/0.38.1-relnotes/index.md @@ -1,8 +1,8 @@ --- date: 2018-04-05 -title: "0.38.1" -description: "0.38.1" +title: "Some Live Reload Fixes" +description: "Hugo 0.38.1 fixes some live reload issues introduced in 0.38." categories: ["Releases"] images: - images/blog/hugo-bug-poster.png diff --git a/docs/content/news/0.38.2-relnotes/index.md b/docs/content/news/0.38.2-relnotes/index.md index 33cae7476..d69c5f5b3 100644 --- a/docs/content/news/0.38.2-relnotes/index.md +++ b/docs/content/news/0.38.2-relnotes/index.md @@ -1,8 +1,8 @@ --- date: 2018-04-09 -title: "0.38.2" -description: "0.38.2" +title: "Hugo 0.38.2: Two Bugfixes" +description: "0.38.2 fixes --contentDir flag handling and \".\" in content filenames." categories: ["Releases"] images: - images/blog/hugo-bug-poster.png diff --git a/docs/content/templates/data-templates.md b/docs/content/templates/data-templates.md index c0b2b5145..460a657ef 100644 --- a/docs/content/templates/data-templates.md +++ b/docs/content/templates/data-templates.md @@ -95,16 +95,16 @@ Discover a new favorite bass player? Just add another `.toml` file in the same d ## Example: Accessing Named Values in a Data File -Assume you have the following YAML structure in your `User0123.yml` data file located directly in `data/`: +Assume you have the following data structure in your `User0123.[yml|toml|json]` data file located directly in `data/`: -``` +{{< code-toggle file="User0123" >}} Name: User0123 "Short Description": "He is a **jolly good** fellow." Achievements: - "Can create a Key, Value list from Data File" - "Learns Hugo" - "Reads documentation" -``` +{{ code-toggle >}} You can use the following code to render the `Short Description` in your layout:: @@ -213,12 +213,16 @@ If you don't like caching at all, you can fully disable caching with the command Currently, you can only use those authentication methods that can be put into an URL. [OAuth][] and other authentication methods are not implemented. -### Load Local files +## Load Local files To load local files with `getJSON` and `getCSV`, the source files must reside within Hugo's working directory. The file extension does not matter, but the content does. It applies the same output logic as above in [Calling the Functions with a URL](#calling-the-functions-with-a-url). +{{% note %}} +The local CSV files to be loaded using `getCSV` must be located **outside** of the `data` directory. +{{% /note %}} + ## LiveReload with Data Files There is no chance to trigger a [LiveReload][] when the content of a URL changes. However, when a *local* file changes (i.e., `data/*` and `themes/-
+{{ range .Site.Data.docs.chroma.lexers }}
+
- {{ .Name }} +
- {{ delimit .Aliases ", " }} +{{ end }} +
{{- with $file -}}
0&&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(13)({apiKey:"167e7998590aebda7f9fedcf86bc4a55",indexName:"hugodocs",inputSelector:"#search-input",debug:!0})},function(t,e,n){"use strict";n(14),n(15)},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,n){"use strict";function r(t){if(t.target){t.preventDefault();var e=t.currentTarget,n=e.getAttribute("data-toggle-tab")}else var n=t;window.localStorage&&window.localStorage.setItem("configLangPref",n);for(var r=document.querySelectorAll("[data-toggle-tab='"+n+"']"),i=document.querySelectorAll("[data-pane='"+n+"']"),a=0;a 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__(13);
+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__(14);
+// var lsnoscript = require('lazysizes/plugins/noscript/ls.noscript.js');
+var unveilhooks = __webpack_require__(15);
+
+/***/ }),
+/* 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__(16);
+
+/***/ }),
+/* 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, __webpack_require__) {
+
+"use strict";
+
+
+/**
+ * Scripts which manages Code Toggle tabs.
+ */
+var i;
+// store tabs variable
+var allTabs = document.querySelectorAll("[data-toggle-tab]");
+var allPanes = document.querySelectorAll("[data-pane]");
+
+function toggleTabs(event) {
+
+ if (event.target) {
+ event.preventDefault();
+ var clickedTab = event.currentTarget;
+ var targetKey = clickedTab.getAttribute("data-toggle-tab");
+ } else {
+ var targetKey = event;
+ }
+ // We store the config language selected in users' localStorage
+ if (window.localStorage) {
+ window.localStorage.setItem("configLangPref", targetKey);
+ }
+ var selectedTabs = document.querySelectorAll("[data-toggle-tab='" + targetKey + "']");
+ var selectedPanes = document.querySelectorAll("[data-pane='" + targetKey + "']");
+
+ for (var i = 0; i < allTabs.length; i++) {
+ allTabs[i].classList.remove("active");
+ allPanes[i].classList.remove("active");
+ }
+
+ for (var i = 0; i < selectedTabs.length; i++) {
+ selectedTabs[i].classList.add("active");
+ selectedPanes[i].classList.add("active");
+ }
+}
+
+for (i = 0; i < allTabs.length; i++) {
+ allTabs[i].addEventListener("click", toggleTabs);
+}
+// Upon page load, if user has a prefered language in its localStorage, tabs are set to it.
+if (window.localStorage.getItem('configLangPref')) {
+ toggleTabs(window.localStorage.getItem('configLangPref'));
+}
+
+/***/ }),
+/* 10 */
+/***/ (function(module, exports) {
+
+// removed by extract-text-webpack-plugin
+
+/***/ }),
+/* 11 */
+/***/ (function(module, exports, __webpack_require__) {
+
+"use strict";
+
+
+var _main = __webpack_require__(10);
+
+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__(9);
+
+__webpack_require__(6);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+/***/ }),
+/* 12 */
+/***/ (function(module, exports, __webpack_require__) {
+
+var require;var require;/*!
* clipboard.js v1.7.1
* https://zenorocha.github.io/clipboard.js
*
* Licensed MIT © Zeno Rocha
*/
-!function(e){t.exports=e()}(function(){var t;return function t(e,n,i){function o(a,u){if(!n[a]){if(!e[a]){var c="function"==typeof r&&r;if(!u&&c)return r(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};e[a][0].call(h.exports,function(t){var n=e[a][1][t];return o(n||t)},h,h.exports,t,e,n,i)}return n[a].exports}for(var s="function"==typeof r&&r,a=0;a0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":i(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=s})},{select:5}],8:[function(e,n,r){!function(i,o){if("function"==typeof t&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],o);else if(void 0!==r)o(n,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var s={exports:{}};o(s,i.clipboardAction,i.tinyEmitter,i.goodListener),i.clipboard=s.exports}}(this,function(t,e,n,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var c=i(e),l=i(n),h=i(r),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===f(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,h.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new c.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(l.default);t.exports=d})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)})},function(t,e,n){/*! docsearch 2.4.1 | © Algolia | github.com/algolia/docsearch */
-!function(e,n){t.exports=n()}(0,function(){return 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={};return 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=46)}([function(t,e,n){"use strict";function r(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var i=n(1);t.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(t){return"number"==typeof t},toStr:function(t){return void 0===t||null===t?"":t+""},cloneDeep:function(t){var e=this.mixin({},t),n=this;return this.each(e,function(t,r){t&&(n.isArray(t)?e[r]=[].concat(t):n.isObject(t)&&(e[r]=n.cloneDeep(t)))}),e},error:function(t){throw new Error(t)},every:function(t,e){var n=!0;return t?(this.each(t,function(r,i){if(!(n=e.call(null,r,i,t)))return!1}),!!n):n},any:function(t,e){var n=!1;return t?(this.each(t,function(r,i){if(e.call(null,r,i,t))return n=!0,!1}),n):n},getUniqueId:function(){var t=0;return function(){return t++}}(),templatify:function(t){if(this.isFunction(t))return t;var e=i.element(t);return"SCRIPT"===e.prop("tagName")?function(){return e.text()}:function(){return String(t)}},defer:function(t){setTimeout(t,0)},noop:function(){},formatPrefix:function(t,e){return e?"":t+"-"},className:function(t,e,n){return(n?"":".")+t+e},escapeHighlightedString:function(t,e,n){e=e||"";var i=document.createElement("div");i.appendChild(document.createTextNode(e)),n=n||"";var o=document.createElement("div");o.appendChild(document.createTextNode(n));var s=document.createElement("div");return s.appendChild(document.createTextNode(t)),s.innerHTML.replace(RegExp(r(i.innerHTML),"g"),e).replace(RegExp(r(o.innerHTML),"g"),n)}}},function(t,e,n){"use strict";t.exports={element:null}},function(t,e){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(t,e,i){if("[object Function]"!==r.call(e))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var s=0;s was loaded but did not call our provided callback"),JSONPScriptError:i("JSONPScriptError","
{{.}}
diff --git a/docs/netlify.toml b/docs/netlify.toml
index 5955d26cd..0f24d5ae3 100644
--- a/docs/netlify.toml
+++ b/docs/netlify.toml
@@ -3,7 +3,7 @@ publish = "public"
command = "hugo"
[context.production.environment]
-HUGO_VERSION = "0.37.1"
+HUGO_VERSION = "0.38.2"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"
@@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true"
command = "hugo --enableGitInfo"
[context.split1.environment]
-HUGO_VERSION = "0.37.1"
+HUGO_VERSION = "0.38.2"
HUGO_ENV = "production"
[context.deploy-preview]
command = "hugo -b $DEPLOY_PRIME_URL"
[context.deploy-preview.environment]
-HUGO_VERSION = "0.37.1"
+HUGO_VERSION = "0.38.2"
[context.branch-deploy]
command = "hugo -b $DEPLOY_PRIME_URL"
[context.branch-deploy.environment]
-HUGO_VERSION = "0.37.1"
+HUGO_VERSION = "0.38.2"
[context.next.environment]
HUGO_ENABLEGITINFO = "true"
diff --git a/docs/resources/_gen/images/news/0.38-relnotes/featured-poster_hudf8012d38ef42d46a6cab1b31156bf3a_69978_480x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/0.38-relnotes/featured-poster_hudf8012d38ef42d46a6cab1b31156bf3a_69978_480x0_resize_catmullrom_2.png
new file mode 100644
index 000000000..ec2bf453c
Binary files /dev/null and b/docs/resources/_gen/images/news/0.38-relnotes/featured-poster_hudf8012d38ef42d46a6cab1b31156bf3a_69978_480x0_resize_catmullrom_2.png differ
diff --git a/docs/resources/_gen/images/news/0.38-relnotes/featured-poster_hudf8012d38ef42d46a6cab1b31156bf3a_69978_640x0_resize_catmullrom_2.png b/docs/resources/_gen/images/news/0.38-relnotes/featured-poster_hudf8012d38ef42d46a6cab1b31156bf3a_69978_640x0_resize_catmullrom_2.png
new file mode 100644
index 000000000..b97d27f32
Binary files /dev/null and b/docs/resources/_gen/images/news/0.38-relnotes/featured-poster_hudf8012d38ef42d46a6cab1b31156bf3a_69978_640x0_resize_catmullrom_2.png differ
diff --git a/docs/themes/gohugoioTheme/data/sponsors.toml b/docs/themes/gohugoioTheme/data/sponsors.toml
index 5e35a25dc..eb9964f39 100644
--- a/docs/themes/gohugoioTheme/data/sponsors.toml
+++ b/docs/themes/gohugoioTheme/data/sponsors.toml
@@ -11,7 +11,7 @@ logo = "/images/sponsors/linode-logo_standard_light_medium.png"
copy = ""
[[banners]]
-name = ""
-link = ""
-logo = ""
+name = "eSolia"
+link = "https://esolia.com/"
+logo = "/images/sponsors/esolia-logo.svg"
copy = ""
\ No newline at end of file
diff --git a/docs/themes/gohugoioTheme/src/css/_tabs.css b/docs/themes/gohugoioTheme/src/css/_tabs.css
index 4ed15b63d..6e0022cc9 100644
--- a/docs/themes/gohugoioTheme/src/css/_tabs.css
+++ b/docs/themes/gohugoioTheme/src/css/_tabs.css
@@ -7,13 +7,17 @@
outline: none;
background-color:white;
}
+.tab-pane code{
+ background:#f1f2f2;
+ border-radius:0;
+}
.tab-pane .chroma{
background:none;
padding:0;
}
.tab-button.active{
- border-bottom-color:#f3f4f4;
- background-color: #f4f4f4;
+ border-bottom-color:#f1f2f2;
+ background-color: #f1f2f2;
}
.tab-content .tab-pane{
display: none;
diff --git a/docs/themes/gohugoioTheme/static/dist/app.bundle.js b/docs/themes/gohugoioTheme/static/dist/app.bundle.js
index 6391e71e9..7ea75e36f 100644
--- a/docs/themes/gohugoioTheme/static/dist/app.bundle.js
+++ b/docs/themes/gohugoioTheme/static/dist/app.bundle.js
@@ -1,22 +1,11890 @@
-!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=11)}([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;i