diff --git a/docs/content/content/front-matter.md b/docs/content/content/front-matter.md index c0ad1514c..40e094ef6 100644 --- a/docs/content/content/front-matter.md +++ b/docs/content/content/front-matter.md @@ -86,10 +86,10 @@ Field names are always normalized to lowercase (e.g. `camelCase: true` is availa * **type** The type of the content (will be derived from the directory automatically if unset) * **weight** Used for sorting * **markup** (Experimental) Specify "rst" for reStructuredText (requires - `rst2html`,) or "md" (default) for the Markdown -* **slug** The token to appear in the tail of the URL + `rst2html`) or "md" (default) for Markdown +* **slug** The token to appear in the tail of the URL, *or*
* **url** The full path to the content from the web root.
-*If neither slug or url is present, the filename will be used.* +*If neither `slug` or `url` is present, the filename will be used.* diff --git a/docs/content/content/summaries.md b/docs/content/content/summaries.md index 3b8c5af1c..35acaaddb 100644 --- a/docs/content/content/summaries.md +++ b/docs/content/content/summaries.md @@ -22,9 +22,9 @@ When using automatic summaries, Hugo will strip all HTML tags from the summary. ## User-defined: manual summary split: -Hugo also provides an easy way to customize where a piece of content will be split with its summary content divider: <!--more-->. The summary content divider is Hugo's version of a "more tag", "summary divider", "excerpt separator", etc. found in other systems. For the summary content divider to be valid, it most be entered as <!--more-->; with no additional spaces or other characters between the <!-- and --> tags. +Hugo also provides an easy way to customize where a piece of content will be split with its summary content divider: <!--more-->. The summary content divider is Hugo's version of a "more tag", "summary divider", "excerpt separator", etc. found in other systems. For the summary content divider to be valid, it must be entered exactly as <!--more-->, all lowercase with no additional spaces or other characters between the <!-- and --> tags. -If the summary content divider exists within a piece of content, Hugo will split the content at that point, instead of its default split point of 70 words. The content prior to the summary content provider will be used as that content's summary and the summary content divider will be replaced with a `Read More` link. When the full content is rendered, the summary content provider, <!--more-->, is elided from the output. +If the summary content divider exists within a piece of content, Hugo will split the content at that point instead of its default split point of 70 words. The content prior to the summary content divider will be used as that content's summary, and the summary content divider will be replaced with a `Read More` link. When the full content is rendered, the summary content divider, <!--more-->, is elided from the output. When using user-defined summaries, <!--more-->, Hugo will preserve the HTML in the summary. diff --git a/docs/content/extras/highlighting.md b/docs/content/extras/highlighting.md index 49e68c071..ac32abc7d 100644 --- a/docs/content/extras/highlighting.md +++ b/docs/content/extras/highlighting.md @@ -43,7 +43,7 @@ Highlight takes exactly one required parameter of language and requires a closing shortcode. ### Example -The example has an extra space between the “{{” and “%” characters to prevent rendering here. Since this example is a code block, we use Github flavored Markdown's code fences, ```, to delimit the code. If you are using standard Markdown, instead of the code fence delimiters, each line must be preceeded by 4 spaces to identify each line as a line of code. Not doing either will result in the text being rendered as HTML. This will prevent Pytment highlighting from working. +The example has an extra space between the “`{{`” and “`%`” characters to prevent rendering here. Since this example is a code block, we use GitHub flavored Markdown's code fences, ```, to delimit the code. If you are using standard Markdown, instead of the code fence delimiters, each line must be preceeded by 4 spaces to identify each line as a line of code. Not doing either will result in the text being rendered as HTML. This will prevent Pygments highlighting from working. ``` {{ % highlight html %}} diff --git a/docs/content/overview/quickstart.md b/docs/content/overview/quickstart.md index 4f1ff2420..738f27aa4 100644 --- a/docs/content/overview/quickstart.md +++ b/docs/content/overview/quickstart.md @@ -10,8 +10,8 @@ title: Hugo Quickstart Guide weight: 10 --- -_This quickstart depends on features introduced in hugo v0.11. If you -have an earlier version of hugo you will need to [upgrade](/overview/installing/) before +_This quickstart depends on features introduced in Hugo v0.11. If you +have an earlier version of Hugo, you will need to [upgrade](/overview/installing/) before proceeding._ ## Step 1. Install Hugo @@ -79,7 +79,9 @@ We still lack any templates to tell us how to display the content. Hugo has rich theme support and a growing set of themes to choose from: - git clone --recursive https://github.com/spf13/hugoThemes themes +```bash +git clone --recursive https://github.com/spf13/hugoThemes themes +``` ## Step 5. Run Hugo diff --git a/docs/content/taxonomies/overview.md b/docs/content/taxonomies/overview.md index 579864a17..8789c417d 100644 --- a/docs/content/taxonomies/overview.md +++ b/docs/content/taxonomies/overview.md @@ -15,12 +15,12 @@ title: Taxonomy Overview weight: 10 --- -Hugo includes support for user defined groupings of content called +Hugo includes support for user-defined groupings of content called taxonomies. Taxonomies give us a way to classify our content so we can demonstrate relationships in a variety of logical ways. The default taxonomies for Hugo are tags and categories. These -taxonomies are common to many website systems (WordPress, Drupal, +taxonomies are common to many website systems (e.g. WordPress, Drupal, Jekyll). Unlike all of those systems, Hugo makes it trivial to customize the taxonomies you will be using for your site however you wish. Another good use for taxonomies is to group a set of posts into a series. Other diff --git a/docs/content/templates/404.md b/docs/content/templates/404.md index 1591782fc..b8b905da7 100644 --- a/docs/content/templates/404.md +++ b/docs/content/templates/404.md @@ -13,14 +13,14 @@ title: 404.html Templates weight: 100 --- -When using Hugo with [GitHub Pages](http://pages.github.com/) you can provide +When using Hugo with [GitHub Pages](http://pages.github.com/), you can provide your own 404 template by creating a 404.html file in the root. 404 pages are of the type "node" and have all the [node variables](/layout/variables/) available to use in the templates. In addition to the standard node variables, the homepage has access to -all site content accessible from .Data.Pages +all site content accessible from `.Data.Pages`. ▾ layouts/ 404.html diff --git a/docs/content/templates/functions.md b/docs/content/templates/functions.md index e35c35cdd..30b4c4f1e 100644 --- a/docs/content/templates/functions.md +++ b/docs/content/templates/functions.md @@ -30,18 +30,19 @@ and other basic tools; these are listed in the Return true if the parameter is set. Takes either a slice, array or channel and an index or a map and a key as input. -e.g. {{ if isset .Params "project_url" }} {{ index .Params "project_url" }}{{ end }} +e.g. `{{ if isset .Params "project_url" }} {{ index .Params "project_url" }}{{ end }}` ### echoParam If parameter is set, then echo it. -e.g. {{echoParam .Params "project_url" }} +e.g. `{{echoParam .Params "project_url" }}` ### eq Return true if the parameters are equal. e.g. - {{ if eq .Section "blog" }}current{{ end}}" + + {{ if eq .Section "blog" }}current{{ end }} ### first Slices an array to only the first X elements. @@ -49,8 +50,9 @@ Slices an array to only the first X elements. Works on [lists](/templates/list/), [taxonomies](/taxonomies/displaying/), [terms](/templates/terms/), [groups](/templates/list/) e.g. + {{ range first 10 .Data.Pages }} - {{ .Render "summary"}} + {{ .Render "summary" }} {{ end }} ### where @@ -76,8 +78,11 @@ e.g. Checks if an element is in an array (or slice) and returns a boolean. The elements supported are strings, integers and floats (only float64 will match as expected). In addition, it can also check if a substring exists in a string. e.g. + {{ if in .Params.tags "Git" }}Follow me on GitHub!{{ end }} + or + {{ if in "this string contains a substring" "substring" }}Substring found!{{ end }} ### intersect @@ -86,6 +91,7 @@ Given two arrays (or slices), this function will return the common elements in t A useful example of this functionality is a 'similar posts' block. Create a list of links to posts where any of the tags in the current post match any tags in other posts. e.g. +