Update functions content footer and added new funcs for menus

This commit is contained in:
Ryan Watters committed 2017-02-21 01:55:58 -06:00
1 parent d2f2d9a3f0
commit 03d0a338a7
20 files changed
+139 -93

No files matched your search

+26 -24
View File
@@ -9,9 +9,8 @@ weight:
categories: [templating] categories: [templating]
tags: [lists,sections,menus] tags: [lists,sections,menus]
draft: false draft: false
slug:
aliases: [/extras/menus/] aliases: [/extras/menus/]
toc: false toc: true
needsreview: true needsreview: true
--- ---
@@ -71,32 +70,35 @@ well.
**A single menu:** **A single menu:**
--- ```yaml
menu: "main" ---
--- menu: "main"
---
```
**Multiple menus:** **Multiple menus:**
--- ```yaml
menu: ["main", "footer"] ---
--- menu: ["main", "footer"]
---
```
### Advanced ### Advanced
If more control is required, then the advanced approach gives you the Take the advanced approach if more control is required. All of the menu entry properties listed above are available.
control you want. All of the menu entry properties listed above are
available.
--- ```yaml
menu: ---
main: menu:
parent: 'extras' main:
weight: 20 parent: 'extras'
--- weight: 20
---
```
## Adding Non-content Entries to a Menu
## Adding (non-content) entries to a menu
You can also add entries to menus that aren’t attached to a piece of You can also add entries to menus that aren’t attached to a piece of
content. This takes place in the sitewide [config file](/overview/configuration/). content. This takes place in the sitewide [config file](/overview/configuration/).
@@ -143,11 +145,11 @@ Identifier should be unique (within a menu).
The following order is used to determine an Identifier: The following order is used to determine an Identifier:
> Name > LinkTitle > Title. * Name >
* LinkTitle >
* Title
This means that the title will be used unless This means that `title` will be used unless `linktitle` is present, etc. In practice, Name and Identifier are never displayed and only used to structure relationships.
linktitle is present, etc. In practice Name and Identifier are never
displayed and only used to structure relationships.
In this example, the top level of the menu is defined in the config file In this example, the top level of the menu is defined in the config file
and all content entries are attached to one of these entries via the and all content entries are attached to one of these entries via the
@@ -155,4 +157,4 @@ and all content entries are attached to one of these entries via the
## Rendering Menus ## Rendering Menus
See [Menu Templates](/templates/menu-templates/). See [Menu Templates](/templates/menu-templates/) for more information on how to render your site menus to your deployable Hugo website.
@@ -10,9 +10,9 @@ tags: [docs,documentation,community]
weight: 20 weight: 20
draft: false draft: false
slug: slug:
aliases: [] aliases: [/docs-contribute/,/docscontrib/]
toc: true toc: true
notesforauthors: needsreview: true
--- ---
Documentation is an integral part of any open source project. The Hugo docs were completely reworked in anticipation of the release of v0.19, but there is always room for improvement. Documentation is an integral part of any open source project. The Hugo docs were completely reworked in anticipation of the release of v0.19, but there is always room for improvement.
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
title: Functions Quick Reference title: Functions Quick Reference
linktitle: Overview linktitle: Quick Reference
description: Comprehensive list of Hugo templating functions, including basic and advanced usage examples. description: Comprehensive list of Hugo templating functions, including basic and advanced usage examples.
date: 2017-02-01 date: 2017-02-01
publishdate: 2017-02-01 publishdate: 2017-02-01
+16
View File
@@ -0,0 +1,16 @@
---
title: haschildren
linktitle: HasChildren
description:
godocref:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [functions]
tags: [menus]
toc: false
draft: false
aliases: []
---
Use in [menu templates](/templates/menu-templates/).
+14
View File
@@ -0,0 +1,14 @@
---
title: hasmenucurrent
linktitle: HasMenuCurrent
description:
godocref:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [functions]
tags: [menus]
toc: false
draft: false
aliases: []
---
+14
View File
@@ -0,0 +1,14 @@
---
title: ismenucurrent
linktitle: IsMenuCurrent
description:
godocref:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [functions]
tags: [menus]
toc: false
draft: false
aliases: []
---
+4 -4
View File
@@ -17,7 +17,7 @@ notesforauthors:
## Testing Installation with Hugo Help ## Testing Installation with Hugo Help
Once you have [installed Hugo][install], make sure it is in your `PATH` (or provide a path to it). You can test that Hugo has been installed correctly via the `help` command: Once you have [installed Hugo][install], make sure it is in your `PATH`. You can test that Hugo has been installed correctly via the `help` command:
```bash ```bash
hugo help hugo help
@@ -143,8 +143,7 @@ Hugo may not be the first static site generator to utilize LiveReload
technology, but it’s the first to do it right. technology, but it’s the first to do it right.
The combination of Hugo’s insane build speed and LiveReload make The combination of Hugo’s insane build speed and LiveReload make
crafting your content pure joy. Virtually instantly after you hit save crafting your content pure joy. Your updated content appears virtually instantly in your browser as soon as you save your changes.
your rebuilt content will appear in your browser.
### LiveReload ### LiveReload
@@ -154,7 +153,7 @@ Hugo comes with [LiveReload](https://github.com/livereload/livereload-js) built
hugo server hugo server
``` ```
This will run a full functioning web server while simultaneously watching your file system for additions, deletions, or changes within the following This will run a fully functioning web server while simultaneously watching your file system for additions, deletions, or changes within the following the following areas of your [project organization][directorystructure]
* `/static/*` * `/static/*`
* `/content/*` * `/content/*`
@@ -255,6 +254,7 @@ Interested? Here are some great tutorials contributed by Hugo users:
[Amazon S3]: http://aws.amazon.com/s3/ [Amazon S3]: http://aws.amazon.com/s3/
[Apache]: http://httpd.apache.org/ "Apache HTTP Server" [Apache]: http://httpd.apache.org/ "Apache HTTP Server"
[CloudFront]: http://aws.amazon.com/cloudfront/ "Amazon CloudFront" [CloudFront]: http://aws.amazon.com/cloudfront/ "Amazon CloudFront"
[directorystructure]: /getting-started/directory-structure/
[DreamHost]: http://www.dreamhost.com/ [DreamHost]: http://www.dreamhost.com/
[Firebase Hosting]: https://firebase.google.com/docs/hosting/ [Firebase Hosting]: https://firebase.google.com/docs/hosting/
[GitHub Pages]: https://pages.github.com/ [GitHub Pages]: https://pages.github.com/
@@ -1,5 +1,5 @@
--- ---
title: Deployment with rysnc title: Deployment with Rysnc
linktitle: linktitle:
description: description:
date: 2017-02-01 date: 2017-02-01
+41 -37
View File
@@ -23,50 +23,54 @@ able to build your menu however you want.
The following is an example: The following is an example:
<!--sidebar start--> ```html
<aside> <!--sidebar start-->
<div id="sidebar" class="nav-collapse"> <aside>
<!-- sidebar menu start--> <div id="sidebar" class="nav-collapse">
<ul class="sidebar-menu"> <!-- sidebar menu start-->
{{ $currentPage := . }} <ul class="sidebar-menu">
{{ range .Site.Menus.main }} {{ $currentPage := . }}
{{ if .HasChildren }} {{ range .Site.Menus.main }}
{{ if .HasChildren }}
<li class="sub-menu{{if $currentPage.HasMenuCurrent "main" . }} active{{end}}"> <li class="sub-menu{{if $currentPage.HasMenuCurrent "main" . }} active{{end}}">
<a href="javascript:;" class=""> <a href="javascript:;" class="">
{{ .Pre }} {{ .Pre }}
<span>{{ .Name }}</span> <span>{{ .Name }}</span>
<span class="menu-arrow arrow_carrot-right"></span> <span class="menu-arrow arrow_carrot-right"></span>
</a> </a>
<ul class="sub"> <ul class="sub">
{{ range .Children }} {{ range .Children }}
<li{{if $currentPage.IsMenuCurrent "main" . }} class="active"{{end}}><a href="{{.URL}}"> {{ .Name }} </a> </li> <li{{if $currentPage.IsMenuCurrent "main" . }} class="active"{{end}}><a href="{{.URL}}"> {{ .Name }} </a> </li>
{{ end }} {{ end }}
</ul>
{{else}}
<li>
<a href="{{.URL}}">
{{ .Pre }}
<span>{{ .Name }}</span>
</a>
{{end}}
</li>
{{end}}
<li> <a href="https://github.com/spf13/hugo/issues" target="blank">Questions and Issues</a> </li>
<li> <a href="#" target="blank">Edit this Page</a> </li>
</ul> </ul>
<!-- sidebar menu end--> {{else}}
</div> <li>
</aside> <a href="{{.URL}}">
<!--sidebar end--> {{ .Pre }}
<span>{{ .Name }}</span>
</a>
{{end}}
</li>
{{end}}
<li> <a href="https://github.com/spf13/hugo/issues" target="blank">Questions and Issues</a> </li>
<li> <a href="#" target="blank">Edit this Page</a> </li>
</ul>
<!-- sidebar menu end-->
</div>
</aside>
<!--sidebar end-->
```
> **Note**: use the `absLangURL` or `relLangURL` if your theme makes use of the [multilingual feature](/content-management/multilingual-mode/). In contrast to `absURL` and `relURL` it adds the correct language prefix to the url. [Read more](/functions/). {{% note "`absLangURL` and `relLangURL`" %}}
Use the `absLangURL` or `relLangURL` if your theme makes use of the [multilingual feature](/content-management/multilingual-mode/). In contrast to `absURL` and `relURL`, these two functions add the correct language prefix to the url. [Read more](/functions/abslangurl).
{{% /note %}}
## Section Menu for "the Lazy Blogger" ## Section Menu for "the Lazy Blogger"
To enable this menu, add this to your site config, i.e. `config.toml`: To enable this menu, add the following to your site `config`:
``` ```toml
SectionPagesMenu = "main" SectionPagesMenu = "main"
``` ```
+7 -9
View File
@@ -10,7 +10,7 @@ tags: [themes, source, organization, directories]
weight: 30 weight: 30
draft: false draft: false
aliases: [/themes/creation/] aliases: [/themes/creation/]
toc: false toc: true
needsreview: true needsreview: true
--- ---
@@ -33,6 +33,11 @@ A theme consists of templates and static assets such as javascript and css
files. Themes can also optionally provide [archetypes](/content/archetypes/) files. Themes can also optionally provide [archetypes](/content/archetypes/)
which are archetypal content types used by the `hugo new` command. which are archetypal content types used by the `hugo new` command.
{{% note "Use the Hugo Generator Tag" %}}
The [`.Hugo.Generator`](/variables-and-params/other/) tag is included in all themes featured in the [Hugo Them Showcase](/http://themes.gohugo.io). We ask that you include the generator tag in all sites and themes you create with Hugo. The generator tag is significant in that it allows the Hugo team to track Hugo's usage and popularity.
{{% /note %}}
### Layouts ### Layouts
Hugo is built around the concept that things should be as simple as possible. Hugo is built around the concept that things should be as simple as possible.
@@ -72,15 +77,8 @@ common to organize the static content into:
The actual structure is entirely up to you, the theme creator, on how you would like to organize your files. The actual structure is entirely up to you, the theme creator, on how you would like to organize your files.
### Archetypes ### Archetypes
If your theme makes use of specific keys in the front matter, it is a good idea If your theme makes use of specific keys in the front matter, it is a good idea
to provide an archetype for each content type you have. Archetypes follow the to provide an archetype for each content type you have. Archetypes follow the
[guidelines provided](/content/archetypes/). [guidelines provided](/content/archetypes/).
### Generator meta tag
With a growing community around Hugo we recommend theme creators to include the [Generator meta tag](/templates/variables/) with `.Hugo.Generator` in the `<head>` of your HTML code. The output might looks like `<meta name="generator" content="Hugo 0.13" />` and helps us to analyse the usage and popularity of Hugo.
+1 -1
View File
@@ -1 +1 @@
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box;border-radius:0px !important;outline:none}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}html,body{margin:0px;padding:0px;outline:none;border:none;font-size:18px;font-family:"muli","Helvetica Neue","Helvetica","Roboto","Arial",sans-serif;color:#222;line-height:1.6;font-weight:300;overflow-x:hidden}body{font-size:90%;overflow-x:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media only screen and (min-width: 760px){body{font-size:95%}}@media only screen and (min-width: 960px){body{font-size:100%}}strong{font-weight:600;color:#222}p{margin-top:0px;margin-bottom:1.5em;line-height:1.6}@font-face{font-family:'fontello';src:url("/fonts/fontello/fontello.eot");src:url("/fonts/fontello/fontello.woff2") format("woff2"),url("/fonts/fontello/fontello.woff") format("woff"),url("/fonts/fontello/fontello.ttf") format("truetype"),url("/fonts/fontello/fontello.svg?78165468#fontello") format("svg");font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:"fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-alert:before{content:'\e810'}.icon-angle-double-right:before{content:'\f101'}.icon-attach:before{content:'\e820'}.icon-attention:before{content:'\e80f'}.icon-bash:before{content:'\e804'}.icon-bell:before{content:'\e80d'}.icon-cancel:before{content:'\e81e'}.icon-caution:before{content:'\e80f'}.icon-chrome:before{content:'\e841'}.icon-clipboard:before{content:'\e817'}.icon-code:before{content:'\f121'}.icon-cog-alt:before{content:'\e814'}.icon-css3:before{content:'\f13c'}.icon-docs:before{content:'\f15c'}.icon-download:before{content:'\e815'}.icon-facebook-official:before{content:'\f230'}.icon-firefox:before{content:'\e840'}.icon-flag:before{content:'\e813'}.icon-forum:before{content:'\f03d';margin-right:.3em}.icon-github:before{content:'\f09b'}.icon-gitter:before{content:'\e819'}.icon-go:before{content:'\e801'}.icon-golang:before{content:'\e801'}.icon-heart:before{content:'\e81d'}.icon-help:before{content:'\e81b'}.icon-home:before{content:'\e812'}.icon-html.input:before{content:'\e81f'}.icon-html5:before{content:'\e800'}.icon-html:before{content:'\e800'}.icon-hugo:before{content:'\e81f'}.icon-ie:before{content:'\e843'}.icon-info:before{content:'\e811'}.icon-instagram:before{content:'\f32d'}.icon-javascript:before{content:'\e802'}.icon-js:before{content:'\e802'}.icon-json:before{content:'\e81c'}.icon-link:before{content:'\e816'}.icon-linkedin:before{content:'\f30c'}.icon-love:before{content:'\e81d'}.icon-mail:before{content:'\e821'}.icon-markdown:before{content:'\e80e'}.icon-md:before{content:'\e80e'}.icon-note:before{content:'\e80d'}.icon-opera:before{content:'\e842'}.icon-pdf:before{content:'\f1c1'}.icon-pencil:before{content:'\e80c'}.icon-picture:before{content:'\e808'}.icon-quLine truncated /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;box-sizing:content-box;border-radius:0px !important;outline:none}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit}html,body{margin:0px;padding:0px;outline:none;border:none;font-size:18px;font-family:"muli","Helvetica Neue","Helvetica","Roboto","Arial",sans-serif;color:#222;line-height:1.6;font-weight:300;overflow-x:hidden}body{font-size:90%;overflow-x:hidden;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}@media only screen and (min-width: 760px){body{font-size:95%}}@media only screen and (min-width: 960px){body{font-size:100%}}strong{font-weight:600;color:#222}p{margin-top:0px;margin-bottom:1.5em;line-height:1.6}@font-face{font-family:'fontello';src:url("/fonts/fontello/fontello.eot");src:url("/fonts/fontello/fontello.woff2") format("woff2"),url("/fonts/fontello/fontello.woff") format("woff"),url("/fonts/fontello/fontello.ttf") format("truetype"),url("/fonts/fontello/fontello.svg?78165468#fontello") format("svg");font-weight:normal;font-style:normal}[class^="icon-"]:before,[class*=" icon-"]:before{font-family:"fontello";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-alert:before{content:'\e810'}.icon-angle-double-right:before{content:'\f101'}.icon-attach:before{content:'\e820'}.icon-attention:before{content:'\e80f'}.icon-bash:before{content:'\e804'}.icon-bell:before{content:'\e80d'}.icon-cancel:before{content:'\e81e'}.icon-caution:before{content:'\e80f'}.icon-chrome:before{content:'\e841'}.icon-clipboard:before{content:'\e817'}.icon-code:before{content:'\f121'}.icon-cog-alt:before{content:'\e814'}.icon-css3:before{content:'\f13c'}.icon-docs:before{content:'\f15c'}.icon-download:before{content:'\e815'}.icon-facebook-official:before{content:'\f230'}.icon-firefox:before{content:'\e840'}.icon-flag:before{content:'\e813'}.icon-forum:before{content:'\f03d';margin-right:.3em}.icon-github:before{content:'\f09b'}.icon-gitter:before{content:'\e819'}.icon-go:before{content:'\e801'}.icon-golang:before{content:'\e801'}.icon-heart:before{content:'\e81d'}.icon-help:before{content:'\e81b'}.icon-home:before{content:'\e812'}.icon-html.input:before{content:'\e81f'}.icon-html5:before{content:'\e800'}.icon-html:before{content:'\e800'}.icon-hugo:before{content:'\e81f'}.icon-ie:before{content:'\e843'}.icon-info:before{content:'\e811'}.icon-instagram:before{content:'\f32d'}.icon-javascript:before{content:'\e802'}.icon-js:before{content:'\e802'}.icon-json:before{content:'\e81c'}.icon-link:before{content:'\e816'}.icon-linkedin:before{content:'\f30c'}.icon-love:before{content:'\e81d'}.icon-mail:before{content:'\e821'}.icon-markdown:before{content:'\e80e'}.icon-md:before{content:'\e80e'}.icon-note:before{content:'\e80d'}.icon-opera:before{content:'\e842'}.icon-pdf:before{content:'\f1c1'}.icon-pencil:before{content:'\e80c'}.icon-picture:before{content:'\e808'}.icon-quLine truncated
+1 -1
View File
@@ -11,5 +11,5 @@ draft: true
slug: "" slug: ""
aliases: [] aliases: []
toc: false toc: false
notesforauthors: "Categories are not required metadata but should mirror the section name (e.g., a file in Functions should contain `categories: [functions]`). If you are adding a document to a specific section of the Hugo docs, be sure to use the appropriate archetype. For more information, visit gohugo.io/contribute-to-hugo/contribute-to-the-hugo-docs/. As always, you can delete `notesforauthors:` before publication or modify accordingly." z_notesforauthors: "Go to gohugo.io/docscontrib for info on req fields"
--- ---
+2 -2
View File
@@ -9,5 +9,5 @@ categories: [functions]
toc: false toc: false
draft: false draft: false
aliases: [] aliases: []
notesforauthors: "Functions do not include 'weight' because they are sorted by title. Keep the 'title:' value all lowercase for sorting purposes. Always include a 'linktitle' with casing that reflects actual usage of the function. EVERY function needs a description, even if it's only a sentence or two. If possible, include the full URL for the related godoc in `godocref:`." z_notesforauthors: "Go to gohugo.io/docscontrib for info on req fields"
--- ---
+1 -1
View File
@@ -9,5 +9,5 @@ categories: [showcase]
tags: [] tags: []
image: "yourimage.jpg" image: "yourimage.jpg"
toc: false toc: false
notesforauthors: "For the image, only include the file name *without* a directory/path, which is taken care of in the templating. See the showcase contribution page at gohugo.io/contribute-to-hugo/add-your-site-to-the-showcase/ for more details. As always, feel free to delete `notesforauthors` or modify for anyone in the future who may edit the content in this file." z_notesforauthors: "Go to gohugo.io/docscontrib for info on req fields"
--- ---
@@ -8,5 +8,5 @@ tags: []
draft: false draft: false
aliases: [] aliases: []
toc: true toc: true
notesforauthors: "All troubleshooting docs should include two h2-headings, one for 'Trouble:' and one for 'Solution:'. Additional h2-headings include 'Discussion Forum Threads', 'Related Hugo Issues', and 'Additional References'." z_notesforauthors: "Go to gohugo.io/docscontrib for info on req fields"
--- ---
+3 -5
View File
@@ -13,8 +13,6 @@ tags: [tutorials]
weight: weight:
draft: false draft: false
aliases: [] aliases: []
notesforauthors: "1. The publishdate and lastmod are in the context of Hugo and not necessarily the original publication for your website. Tutorials are ordered according to title. z_notesforauthors: "Go to gohugo.io/docscontrib for info on req fields"
2. TAGS ARE IMPORTANT, but keep the categories at "tutorials." Please try to reuse existing tags whenever possible (see gohugo.io/tags on the docs site). ---
3. `author:`, `authorurl:`, and `originalurl:` are all optional. If used, please include the *full url*. `originalurl:` is the link to the originally published article, if there is one.
4. As always, feel free to remove 'notesforauthors' before publishing your tutorial."
---
+1 -1
View File
@@ -8,7 +8,7 @@
{{partial "content-header-links.html" . }} {{partial "content-header-links.html" . }}
{{partial "tags.html" . }} {{partial "tags.html" . }}
{{if .Params.needsreview }} {{if .Params.needsreview }}
<div id="beingreviewed">UNDERGOING REVIEW</div> <div id="beingreviewed">WORK IN PROGRESS</div>
{{end}} {{end}}
</header> </header>
<div class="body-copy"> <div class="body-copy">
@@ -16,7 +16,7 @@
<i class="fa fa-chevron-left"></i> <i class="fa fa-chevron-left"></i>
<div class="page-info"> <div class="page-info">
<span>Previous</span> <span>Previous</span>
<h5 class="{{$section}}">{{.Title}} of {{.Section | humanize | title}}</h5> <h5 class="{{$section}}">{{.Title}}{{if ne .Section "functions"}} of {{.Section | humanize | title}}{{end}}</h5>
</div> </div>
</a> </a>
{{ end }} {{ end }}
@@ -21,7 +21,7 @@
{{end}} {{end}}
{{ else }} {{ else }}
{{range (where $.Site.Pages "Section" $section).ByWeight}} {{range (where $.Site.Pages "Section" $section).ByWeight}}
<li class="submenu-item"><a class="submenu-item-link {{$section}}{{if eq ($.Scratch.Get "url") .URL}} active-page{{end}}" href="{{.Permalink}}">{{with .LinkTitle}}{{. | markdownify }}{{else}}{{.Title | markdownify}}{{end}}</a></li> <li class="submenu-item"><a class="submenu-item-link {{$section}}{{if eq ($.Scratch.Get "url") .URL}} active-page{{end}}" href="{{with .Params.redirecturl}}{{.}}{{else}}{{.Permalink}}{{end}}">{{with .LinkTitle}}{{. | markdownify }}{{else}}{{.Title | markdownify}}{{end}}</a></li>
{{end}} {{end}}
{{- end }} {{- end }}
</ul> </ul>
@@ -5,7 +5,7 @@ $S:480px;
$SM: 560px; $SM: 560px;
$M:760px; $M:760px;
$L:960px; $L:960px;
$XL:1240px; $XL:1200px;
$HUGE:1600px; $HUGE:1600px;
//Color Palette //Color Palette