diff --git a/content/templates/amber-templating.md b/content/templates/amber-templating.md
index 2e7205032..b02f571b1 100644
--- a/content/templates/amber-templating.md
+++ b/content/templates/amber-templating.md
@@ -2,6 +2,7 @@
title: Amber Templating
linktitle:
description:
+godocref: https://godoc.org/github.com/eknkc/amber
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
@@ -19,12 +20,11 @@ Amber templates are another template type which Hugo supports, in addition to [G
For template documentation, follow the links from the [Amber project][].
-* Amber templates must be named with the amber-suffix, e.g. `list.amber`
+* 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/
-
+[Go templates]: /templates/go-template-primer/
\ No newline at end of file
diff --git a/content/templates/go-template-primer.md b/content/templates/go-template-primer.md
index 356009dd4..d7273e3ec 100644
--- a/content/templates/go-template-primer.md
+++ b/content/templates/go-template-primer.md
@@ -2,6 +2,7 @@
title: Go Template Primer
linktitle:
description:
+godocref: https://golang.org/pkg/html/template/
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
@@ -11,6 +12,468 @@ categories: [templates]
draft: false
slug:
aliases: [/templates/go-templates/]
-toc: false
+toc: true
notes:
----
\ No newline at end of file
+---
+
+Hugo uses the excellent [Go html/template][] library, an extremely lightweight engine that provides just the right amount of logic to be able to create a good static website. If you have used other template systems from different languages or frameworks, you will find a lot of similarities in Go templates.
+
+This document is a brief primer on using Go templates. The [Go docs][gohtmltemplate] go into more depth and cover features that aren't mentioned here.
+
+## Introduction to Go Templates
+
+Go templates provide an extremely simple template language. It adheres to the belief that only the most basic of logic belongs in the template or view layer. One consequence of this simplicity is that Go templates parse very quickly.
+
+A unique characteristic of Go templates is they are content aware. Variables and content will be sanitized depending on the context of where they are used. More details can be found in the [Go docs][gohtmltemplate].
+
+## Basic Syntax
+
+Golang templates are HTML files with the addition of [variables][variablesparams] and
+[functions][].
+
+**Go variables and functions are accessible within {{ }}**
+
+Accessing a predefined variable "foo":
+
+```golang
+{{ foo }}
+```
+
+**Parameters are separated using spaces**
+
+Calling the `add` function with input of 1, 2:
+
+```golang
+{{ add 1 2 }}
+```
+
+**Methods and fields are accessed via dot notation**
+
+Accessing the Page Parameter "bar"
+
+```golang
+{{ .Params.bar }}
+```
+
+**Parentheses can be used to group items together**
+
+```golang
+{{ if or (isset .Params "alt") (isset .Params "caption") }} Caption {{ end }}
+```
+
+## Variables
+
+Each Go template has a struct (object) made available to it. In Hugo, each
+template is passed page struct. More details are available in the [variables and params section][variablesparams].
+
+A variable is accessed by referencing the variable name.
+
+```golang
+
{{ .Title }}
+```
+
+Variables can also be defined and referenced.
+
+```golang
+{{ $address := "123 Main St."}}
+{{ $address }}
+```
+
+## Functions
+
+Go template ships with a few functions which provide basic functionality. The Go template system also provides a mechanism for applications to extend the
+available functions with their own. [Hugo template functions][] provide some additional functionality we believe are useful for building websites. Functions are called by using their name followed by the required parameters separated by spaces. Template functions cannot be added without recompiling Hugo.
+
+**Example 1: Adding numbers**
+
+```golang
+{{ add 1 2 }}
+```
+
+**Example 2: Comparing numbers**
+
+```golang
+{{ lt 1 2 }}
+```
+
+{{% note "Additional Boolean Operators" %}}
+There are more boolean operators than those listed in the Hugo docs in the [Golang template documentation](http://golang.org/pkg/text/template/#hdr-Functions).
+{{% /note %}}
+
+## Includes
+
+When including another template, you will pass to it the data it will be
+able to access. To pass along the current context, please remember to
+include a trailing dot. The templates location will always be starting at
+the /layout/ directory within Hugo.
+
+**Example:**
+
+ {{ template "partials/header.html" . }}
+
+And, starting with Hugo v0.12, you may also use the `partial` call
+for [partial templates](/templates/partials/):
+
+ {{ partial "header.html" . }}
+
+
+## Logic
+
+Go templates provide the most basic iteration and conditional logic.
+
+### Iteration
+
+Just like in Go, the Go templates make heavy use of `range` to iterate over
+a map, array or slice. The following are different examples of how to use
+range.
+
+**Example 1: Using Context**
+
+```golang
+{{ range array }}
+ {{ . }}
+{{ end }}
+```
+
+**Example 2: Declaring value variable name**
+
+```golang
+{{range $element := array}}
+ {{ $element }}
+{{ end }}
+```
+
+**Example 2: Declaring key and value variable name**
+
+```golang
+{{range $index, $element := array}}
+ {{ $index }}
+ {{ $element }}
+{{ end }}
+```
+
+### Conditionals
+
+`if`, `else`, `with`, `or` & `and` provide the framework for handling conditional logic in Go Templates. Like `range`, each statement is closed with an `{{end}}`.
+
+Go Templates treat the following values as false:
+
+* false
+* 0
+* any array, slice, map, or string of length zero
+
+**Example 1: `if`**
+
+```golang
+{{ if isset .Params "title" }}{{ index .Params "title" }}
{{ end }}
+```
+
+**Example 2: `if` … `else`**
+
+```golang
+{{ if isset .Params "alt" }}
+ {{ index .Params "alt" }}
+{{else}}
+ {{ index .Params "caption" }}
+{{ end }}
+```
+
+**Example 3: `and` & `or`**
+
+```golang
+{{ if and (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr")}}
+```
+
+**Example 4: `with`**
+
+An alternative way of writing "`if`" and then referencing the same value
+is to use "`with`" instead. `with` rebinds the context `.` within its scope,
+and skips the block if the variable is absent.
+
+The first example above could be simplified as:
+
+ {{ with .Params.title }}{{ . }}
{{ end }}
+
+**Example 5: `if` … `else if`**
+
+```golang
+{{ if isset .Params "alt" }}
+ {{ index .Params "alt" }}
+{{ else if isset .Params "caption" }}
+ {{ index .Params "caption" }}
+{{ end }}
+```
+
+## Pipes
+
+One of the most powerful components of Go templates is the ability to stack actions one after another. This is done by using pipes. Borrowed from Unix pipes, the concept is simple, each pipeline's output becomes the input of the following pipe.
+
+Because of the very simple syntax of Go templates, the pipe is essential to being able to chain together function calls. One limitation of the pipes is that they only can work with a single value and that value becomes the last parameter of the next pipeline.
+
+A few simple examples should help convey how to use the pipe.
+
+**Example 1:**
+
+```golang
+{{ shuffle (seq 1 5) }}
+```
+
+is the same as
+
+```golang
+{{ (seq 1 5) | shuffle }}
+```
+
+**Example 2:**
+
+```golang
+{{ index .Params "disqus_url" | html }}
+```
+
+Access the page parameter called "disqus_url" and escape the HTML.
+
+The `index` function is a built in to [Go][] built-in. [You can read more about `index` in the Godocs][]. The Godocs have the following to say about`index`:
+
+> ...returns the result of indexing its first argument by the following arguments. Thus "index x 1 2 3" is, in Go syntax, `x[1][2][3]`. Each indexed item must be a map, slice, or array.
+
+**Example 3:**
+
+ {{ if or (or (isset .Params "title") (isset .Params "caption")) (isset .Params "attr") }}
+ Stuff Here
+ {{ end }}
+
+Could be rewritten as
+
+ {{ if isset .Params "caption" | or isset .Params "title" | or isset .Params "attr" }}
+ Stuff Here
+ {{ end }}
+
+### Internet Explorer conditional comments using Pipes
+
+By default, Go Templates remove HTML comments from output. This has the unfortunate side effect of removing Internet Explorer conditional comments. As a workaround, use something like this:
+
+ {{ "" | safeHTML }}
+
+Alternatively, use the backtick (`` ` ``) to quote the IE conditional comments, avoiding the tedious task of escaping every double quotes (`"`) inside, as demonstrated in the [examples](http://golang.org/pkg/text/template/#hdr-Examples) in the Go text/template documentation, e.g.:
+
+```
+{{ `` | safeHTML }}
+```
+
+## Context (a.k.a. the dot)
+
+The most easily overlooked concept to understand about Go templates is that `{{ . }}`
+always refers to the current context. In the top level of your template, this
+will be the data set made available to it. Inside of a iteration, however, it will have
+the value of the current item. When inside of a loop, the context has changed:
+`{{ . }}` will no longer refer to the data available to the entire page. If you need
+to
+access this from within the loop, you will likely want to do one of the following:
+
+1. Set it to a variable instead of depending on the context. For example:
+
+{{% input "range-through-tags-w-variable.html" %}}
+```html
+{{ $title := .Site.Title }}
+
+```
+{{% /input %}}
+
+{{% note %}}
+Notice how once we have entered the loop, the value of `{{ . }}` has changed. We have defined a variable outside of the loop (`{{$title}}`) so we have access to it from within the loop.
+{{% /note %}}
+
+2. Use `$.` to access the global context from anywhere.
+ Here is an equivalent example:
+
+{{% input "range-through-tags-w-global.html" %}}
+```html
+
+```
+{{% /input %}}
+
+This is because `$`, a special variable, is set to the starting value of `.` ("the dot") by default. This is a [documented feature of Go text/template][].
+
+{{% warning "Don't Redefine the Dot" %}}
+The built-in magic of `$` would cease to work if someone were to mischievously redefine the special character; e.g. `{{ $ := .Site }}`. *Don't do it.* You may, of course, recover from this mischief by using `{{ $ := . }}` in a global context to reset `$` to its default value.
+{{% /warning %}}
+
+## Whitespace
+
+Go 1.6 includes the ability to trim the whitespace from either side of a Go tag by including a hyphen (`-`) and space immediately beside the corresponding `{{` or `}}` delimiter.
+
+For instance, the following Go template:
+
+```html
+
+ {{ .Title }}
+
+```
+
+will include the newlines and horizontal tab in its HTML output:
+
+```html
+
+ Hello, World!
+
+```
+
+whereas using
+
+```html
+
+ {{- .Title -}}
+
+```
+
+in that case will output simply
+
+```html
+Hello, World!
+```
+
+Go considers the following characters as whitespace:
+
+* space
+* horizontal tab
+* carriage return
+* newline
+
+## Hugo Parameters
+
+Hugo provides the option of passing values to the template language
+through the site configuration (for sitewide values), or through the meta
+data of each specific piece of content. You can define any values of any
+type (supported by your front matter/config format) and use them however
+you want to inside of your templates.
+
+
+## Using Content (page) Parameters
+
+In each piece of content, you can provide variables to be used by the
+templates. This happens in the [front matter](/content/front-matter/).
+
+An example of this is used in this documentation site. Most of the pages
+benefit from having the table of contents provided. Sometimes the TOC just
+doesn't make a lot of sense. We've defined a variable in our front matter
+of some pages to turn off the TOC from being displayed.
+
+Here is the example front matter:
+
+```
+---
+title: "Permalinks"
+lastmod: 2015-11-30
+date: "2013-11-18"
+aliases:
+ - "/doc/permalinks/"
+groups: ["extras"]
+groups_weight: 30
+notoc: true
+---
+```
+
+Here is the corresponding code inside of the template:
+
+```html
+{{ if not .Params.notoc }}
+
+ {{ .TableOfContents }}
+
+{{ end }}
+```
+
+## Using Site (config) Parameters
+
+In your top-level configuration file (e.g., `config.yaml`) you can define site
+parameters, which are values which will be available to you in partials.
+
+For instance, you might declare:
+
+```yaml
+params:
+ CopyrightHTML: "Copyright © 2013 John Doe. All Rights Reserved."
+ TwitterUser: "spf13"
+ SidebarRecentLimit: 5
+```
+
+Within a footer layout, you might then declare a `