Update amber and ace sections

This commit is contained in:
Ryan Watters committed 2017-02-18 01:12:57 -06:00
1 parent fa1e478041
commit 960707a4a0
10 files changed
+82 -20

No files matched your search

+1 -1
View File
@@ -472,7 +472,7 @@ Let's assume you would like to have a shortcode to be replaced by the current ye
```
{{% /input %}}
More shortcode examples can be found in the [shortcodes directory for spf13.com][] and [shortcodes directory for the Hugo docs][].
More shortcode examples can be found in the [shortcodes directory for spf13.com][] and the [shortcodes directory for the Hugo docs][].
[cross-references]: /content-management/cross-references/
[Instagram]: https://www.instagram.com/
+48 -1
View File
@@ -2,6 +2,7 @@
title: Ace Templating
linktitle:
description:
godocref: https://godoc.org/github.com/yosssi/ace
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
@@ -15,4 +16,50 @@ toc: false
notes:
---
> Without the fear of falling, there is no joy in flight. - [Ryan Watters](https://www.google.com)
In addition to [Go templates][] and [Amber templates][], Hugo supports the powerful Ace templates.
For template documentation, follow the links from the [Ace project](https://github.com/yosssi/ace).
* Ace templates must be named with the ace-suffix; e.g., `list.ace`
* It's possible to use both Go templates and Ace templates side by side and even include one into the other
* Full Go template syntax support, including all the useful helper [template functions][]
* Partials can be included both with the Ace and the Go template syntax. For example, the following two will have the same output in Ace:
* `= include partials/foo.html .`
* `{{ partial "foo" . }}`
One noticeable difference between Ace and the other templating engines in Hugo is [Ace's inheritance support through base and inner templates][].
In Hugo, the Ace base template will be chosen with the same rule set as for [Go base templates][].
```
.:
index.ace
./blog:
single.ace
baseof.ace
./_default:
baseof.ace list.ace single.ace single-baseof.ace
```
{{% note %}}
Note that the `html` suffix is needed, even if the filename is suffixed `ace`. This does not work from inside a theme ([issue #763](https://github.com/spf13/hugo/issues/763)).
{{% /note %}}
Some examples for the layout files above:
* Home page: `./index.ace` + `./_default/baseof.ace`
* Single page in the `blog` section: `./blog/single.ace` + `./blog/baseof.ace`
* Single page in another section: `./_default/single.ace` + `./_default/single-baseof.ace`
* Taxonomy page in any section: `./_default/list.ace` + `./_default/baseof.ace`
{{% note %}}
In most cases, one `baseof.ace` in `_default` will suffice. An Ace template without a reference to a base section (e.g., `= content`) will be handled as a standalone template.
{{% /note %}}
[Ace's inheritance support through base and inner templates]: https://github.com/yosssi/ace/tree/master/examples/base_inner_template
[Amber templates]: /templates/amber-templating/
[template functions]: /functions/
[Go templates]: /templates/go-template-primer/
[Go base templates]: /templates/base-templates-and-blocks/
+16 -2
View File
@@ -9,8 +9,22 @@ weight:
tags: [amber,layout]
categories: [templates]
draft: false
slug:
slug: [/templates/amber/]
aliases:
toc: false
notes:
---
---
Amber templates are another template type which Hugo supports, in addition to [Go templates][] and [Ace templates][] templates.
For template documentation, follow the links from the [Amber project][].
* Amber templates must be named with the amber-suffix, e.g. `list.amber`
* Partials in Amber or HTML can be included with the Amber template syntax:
* `import ../partials/test.html `
* `import ../partials/test_a.amber `
[Ace templates]: /templates/ace-templating/
[Amber project]: https://github.com/eknkc/amber
[Go templates]: /templates/go-template-primer/
@@ -2,6 +2,7 @@
title: Base Templates and Blocks
linktitle:
description:
godocref:
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
@@ -10,7 +11,7 @@ tags: [blocks,base]
categories: [templates]
draft: false
slug:
aliases:
aliases: [/templates/blocks/]
toc: false
notes:
---
+1 -1
View File
@@ -10,7 +10,7 @@ tags: []
categories: [templates]
draft: false
slug:
aliases:
aliases: [/templates/go-templates/]
toc: false
notes:
---
+3 -3
View File
@@ -32,7 +32,7 @@ templates:
url: "templates"
haschildren: true
sortsubpagesby: "weight"
desc: "Pagination, homepage, rss/sitemap, template types and lookup order, and data"
desc: "Pagination, homepage, rss, sitemap, lookup order, and data templates"
functions:
order: 6
title: "Functions"
@@ -60,7 +60,7 @@ hostinganddeployment:
url: "hosting-and-deployment"
haschildren: true
sortsubpagesby: "weight"
desc: "Site builds and community-aggregated tutorials on automated deploymentsand popular hosting solutions"
desc: "Site builds, automated deployments, and popular hosting solutions, as explained by the Hugo community"
# migratingtohugo:
# order: 10
# title: "Migrating to Hugo"
@@ -74,7 +74,7 @@ tutorials:
url: "tutorials"
haschildren: true
sortsubpagesby: "weight"
desc: "Community-aggregated articles on methods to approaching different projects using Hugo"
desc: "Community-aggregated articles and code examples for approaching different projects using Hugo"
developertools:
order: 12
title: "Developer Tools"
+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-quoteLine 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-quoteLine truncated
@@ -1,6 +1,6 @@
<div class="content-header-links">
{{- if .Params.godocref -}}
<a target="_blank" class="tooltip godoc-link" data-tooltip="Golang Ref" href="{{.Params.godocref}}" >
<a target="_blank" class="tooltip right godoc-link" data-tooltip="See the related Godocs for {{.Title}}" href="{{.Params.godocref}}" >
{{ partial "svg-icons/godoc-icon.html" .}}
</a>
{{- end -}}
@@ -53,8 +53,8 @@ a.tooltip {
}
&.right {
&:hover::before {
left: 0px;
right: auto;
right: 0px;
left: auto;
}
}
&.edit-link:hover {
@@ -1,7 +1,7 @@
.breadcrumbs {
list-style: none;
display: inline-block;
margin-top:3px;
margin-top: 3px;
li {
float: left;
a {
@@ -22,11 +22,11 @@
// filter:grayscale(100%);
}
span {
margin-left:4px;
margin-left: 4px;
}
}
&:nth-child(even) {
margin-left:-8px;
margin-left: -8px;
a {
background-color: $breadcrumb-navigation-bg-color;
&:before {
@@ -49,7 +49,7 @@
}
}
}
&:last-child {
&:last-child::not(first-child) {
a {
padding-right: 15px;
@include border-radius(0 4px 4px 0);
@@ -80,9 +80,9 @@
}
&:hover {
background-color: $breadcrumb-navigation-bg-color-active;
color:$breadcrumb-navigation-text-color-active;
color: $breadcrumb-navigation-text-color-active;
img {
filter:grayscale(0%);
filter: grayscale(0%);
}
&:before {
border-color: $breadcrumb-navigation-bg-color-active;
@@ -94,4 +94,4 @@
}
}
}
}
}