Attempt to fix scroll on focus issues in iOS

This commit is contained in:
Ryan Watters 2017-03-09 18:06:29 -06:00
parent 9e999539de
commit 60c2babf0e
184 changed files with 236 additions and 227 deletions

View File

@ -16,6 +16,8 @@ disablePathToLower = false
disableRSS = false
# Set to false if you want a sitemap.xml created at the site root
disableSitemap = false
# Allows use of emoji shorthand directly in content
enableEmoji = true
# Set the unicode character used for the "return" link in page footnotes.
footnotereturnlinkcontents = "↩"
# Create an array of files you don't want hugo to build
@ -61,11 +63,7 @@ watch = true
# Add GA Tracking Code Here. This leverages a built-in (ie, "internal") partial from HUGO: https://gohugo.io/extras/analytics#configuring-google-analytics
googleanalyticstrackingcode = ""
## Critical Render Path. If true, site style will be embedded in a <style> tag in each html <head> as part of Gulp Build. False puts a typical <link> to the stylesheet in <head>>
usecrp = false
## Include jQuery 2.2.4 in your site head. (see /static/assets/js)
includejq = false
## Date the Site is Published, use YYYY-MM-DD
sitepublishdate = ""
usecrp = true
## Twitter handle without the "@"
twitterhandle = "GoHugoIO"
## Facebook URL
@ -73,26 +71,22 @@ watch = true
## Default Image for Social Sharing. This image should live at static/images/
defaultsocialimage = "hugodefaultsocial.png"
## Setting this to true will add a "noindex" to *every* page on the site
removefromexternalsearch = true
## This is used when the BaseURL does not need to modified (eg, in share links)
siteaddress = "https://hugodocsconcept.netlify.com"
removefromexternalsearch = false
## This is used when the BaseURL does not need to modified (eg, in share links or in prerender, prefetch, etc to control for relativeURLs setting)
siteaddress = "https://hugodocs.info"
## Gh repo for site footer (include trailing slash)
ghrepo = "https://github.com/spf13/hugo/"
## GitHub Docs Repository Base URL (include trailing slash)
### https://github.com/spf13/hugo/tree/master/docs
### Edit content repo (set to automatically enter "edit" mode => good for "improve this page" links)
ghdocsrepo = "https://github.com/rdwatters/hugo-docs-concept/edit/master/"
### Edit content repo
## Github Wiki for Documentation
ghdocswiki = ""
## Github Wiki for Development
ghdevwiki = ""
## Gitter URL
gitter = "https://gitter.im/spf13/hugo"
## Discuss Forum URL
forum = "https://discuss.hugo.io"
gtmid = ""
# Set to true to include a CDN call to FontAwesome (not that Hugo docs currently hosts its own FA (see pipeline/scss/_variables.scss))
# Set to true to include a CDN call to FontAwesome (as of 2017-03-09, Hugo docs currently hosts its own customize fontell font [see _fontello.scss])
usefontawesome = false
# MARKDOWN
## Configuration for BlackFriday markdown parser: https://github.com/russross/blackfriday
[blackfriday]
@ -103,4 +97,4 @@ watch = true
[taxonomies]
tag = "tags"
category = "categories"
category = ""

View File

@ -241,7 +241,7 @@ Themes section organization has only changed slightly in that the 6 content page
* Base templates
* Hugo Lists (introduces the lists concept [i.e. sections, taxonomies, etc]); this includes one of multiple forthcoming visualizations for Hugo architecture
* Rendering Hugo Lists (i.e., ordering, grouping, etc)
* Shortcodes and menus (templating), pagination, data, traversing local files, data-driven content, and data files have all moved out from "Extras" and into templating. *Note that there is only one stylesheet in the local example now* {{< emo ":wink:" >}}.
* Shortcodes and menus (templating), pagination, data, traversing local files, data-driven content, and data files have all moved out from "Extras" and into templating. *Note that there is only one stylesheet in the local example now*..
* **2017-02-26**. I am currently working on a new example for `readDir`.
### Taxonomies
@ -376,7 +376,7 @@ Apache License - 60
* Template Lookup Order -15
* Base Templates And Blocks - 20
* Lists in Hugo - 22
* Rendering Lists in Hugo - 27
* Ordering and Grouping Hugo Lists - 27
* Homepage Template - 30
* Section Templates - 40
* Taxonomy Templates - 50

View File

@ -4,7 +4,7 @@ linktitle: Comments
description: Hugo ships with an internal Disqus template that requires negligible effort to implement, but Disqus isn't the only commenting system that will work with your new Hugo website.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
lastmod: 2017-03-09
tags: [sections,content,organization, fundamentals]
categories: [project organization]
weight: 140
@ -52,6 +52,7 @@ There are a few alternatives to commenting on static sites for those who do not
* [Static Man](https://staticman.net/)
* [IntenseDebate](http://intensedebate.com/)
* [Livefyre](http://livefyre.com/)
* [Graph Comment][]
* [Muut](http://muut.com/)
* [多说](http://duoshuo.com/) ([Duoshuo](http://duoshuo.com/), popular in China)
* [isso](http://posativ.org/isso/) (Self-hosted, Python)
@ -74,6 +75,7 @@ It is in early development but shows promise. If you have interest, please help
[disqussetup]: https://disqus.com/profile/signup/
[forum]: https://discuss.gohugo.io
[front matter]: /content-management/front-matter/
[Graph Comment]: https://graphcomment.com/
[kaijuissue]: https://github.com/spf13/kaiju/issues/new
[issotutorial]: https://stiobhart.net/2017-02-24-isso-comments/
[partials]: /templates/partials/

View File

@ -18,12 +18,12 @@ toc: true
Markdown is the native content format for Hugo and is rendered using the excellent [Blackfriday project][blackfriday], a blazingly fast parser written in Golang.
{{% note "Deeply Nested Lists" %}}
Before you begin writing your content in markdown, Blackfriday has a known issue [(#329)](https://github.com/russross/blackfriday/issues/329) with handling deeply nested lists. Luckily, there is an easy workaround. Use 4-spaces (i.e., <kbd>tab</kbd>) rather than 2-space indentations to delimit nesting of lists in your content.
Before you begin writing your content in markdown, Blackfriday has a known issue [(#329)](https://github.com/russross/blackfriday/issues/329) with handling deeply nested lists. Luckily, there is an easy workaround. Use 4-spaces (i.e., <kbd>tab</kbd>) rather than 2-space indentations.
{{% /note %}}
## Configuring Markdown Rendering
You can configure multiple aspects of Blackfriday. For more information, see [how to configure your Hugo projects][config]:
You can configure multiple aspects of Blackfriday as show in the following list. See the docs on [Configuration][config] for the full list of explicit directions you can give to Hugo when rendering your site.
{{< readfile file="content/readfiles/bfconfig.md" markdown="true" >}}
@ -33,7 +33,7 @@ Hugo provides some convenient methods for extending markdown.
### Task Lists
Hugo supports GitHub-styled task lists (i.e., TODO lists) for the Blackfriday markdown renderer. If you do not want to use this feature, you can disable it in your configuration.
Hugo supports [GitHub-styled task lists (i.e., TODO lists)][gfmtasks] for the Blackfriday markdown renderer. If you do not want to use this feature, you can disable it in your configuration.
#### Example Task List Input
@ -97,7 +97,7 @@ For example, for Asciidoc files, Hugo will try to call the `asciidoctor` or `asc
To use these formats, just use the standard extension and the front matter exactly as you would do with natively supported `.md` files.
{{% warning "Performance of External Helpers" %}}
Because additional format are external commands---with the exception of org mode---generation performance will rely heavily on the performance of the external tool used. As this feature is still in its infancy, feedback is especially welcome.
Because additional formats are external commands---with the exception of org mode---generation performance will rely heavily on the performance of the external tool you are using. As this feature is still in its infancy, feedback is welcome.
{{% /warning %}}
[ascii]: http://asciidoc.org/
@ -106,6 +106,7 @@ Because additional format are external commands---with the exception of org mode
[config]: /getting-started/configuration/
[developer tools]: /tools/
[fireball]: https://daringfireball.net/projects/markdown/
[gfmtasks]: https://guides.github.com/features/mastering-markdown/#syntax
[helperssource]: https://github.com/spf13/hugo/blob/77c60a3440806067109347d04eb5368b65ea0fe8/helpers/general.go#L65
[hl]: /tools/syntax-highlighting/
[hlsc]: /content-management/shortcodes/#highlight

View File

@ -10,13 +10,14 @@ tags: ["front matter", "yaml", "toml", "json", "metadata", "archetypes"]
weight: 30
draft: false
aliases: [/content/front-matter/]
wip: true
toc: true
---
**Front matter** allows you to keep metadata attached to an instance of a [content type][]---i.e., embedded inside a content file---and is one of the many features that gives Hugo its strength. Hugo supports a few different formats for front matter, each with their own identifying tokens.
**Front matter** allows you to keep metadata attached to an instance of a [content type][]---i.e., embedded inside a content file---and is one of the many features that gives Hugo its strength.
## Supported Front Matter Formats
## Front Matter Formats
Hugo supports three formats for front matter, each with their own identifying tokens.
TOML
: identified by opening and closing `+++`.
@ -25,9 +26,9 @@ YAML
: identified by opening and closing `---` *or* opening `---` and closing `...`
JSON
: a single JSON object which is surrounded by '`{`' and '`}`', each on their own line.
: a single JSON object surrounded by '`{`' and '`}`', each on their own line.
### TOML Front Matter Example
### TOML Example
```toml
+++
@ -43,7 +44,7 @@ slug = "spf13-vim-3-0-release-and-new-website"
+++
```
### YAML Front Matter Example
### YAML Example
```yaml
---
@ -59,7 +60,7 @@ slug: "spf13-vim-3-0-release-and-new-website"
---
```
### JSON Front Matter Example
### JSON Example
```json
{
@ -79,7 +80,7 @@ slug: "spf13-vim-3-0-release-and-new-website"
There are a few predefined variables that Hugo is aware of and utilizes.
### Required Front Matter Variables
### Required
`title`
: The title for the content
@ -94,7 +95,7 @@ There are a few predefined variables that Hugo is aware of and utilizes.
: These will use the field name of the plural form of the index (see tags and
categories above)
### Optional Front Matter Variables
### Optional
`aliases`
: An array of one or more aliases (e.g. old published path of a renamed content) that would be created to redirect to this content. See [Aliases][] for details.
@ -109,7 +110,7 @@ categories above)
: If true, explicitly treat the content as CJKLanguage (`.Summary` and `.WordCount` can work properly in CJKLanguage)
`markup`
: **Experimental**; specify `"rst"` for reStructuredText (requires`rst2html`) or `"md"` (default) for Markdown
: **experimental**; specify `"rst"` for reStructuredText (requires`rst2html`) or `"md"` (default) for Markdown
`publishdate`
: If in the future, content will not be rendered unless `hugo` is called with `--buildFuture`
@ -128,33 +129,33 @@ the multilingual feature.
: Used for sorting
{{% note "Hugo's Default URL Destinations" %}}
If neither `slug` nor `url` is present, and [permalinks are not configured otherwise](/content-management/urls/#permalinks), the filename will be used to create the URL for a page. See [Content Organization][contentorg] and [URL Management][urls].
If neither `slug` nor `url` is present, and [permalinks are not configured otherwise](/content-management/urls/#permalinks), the filename will be used to create the URL for a page. See [Content Organization](/content-management/organization) and [URL Management](/content-management/urls/).
{{% /note %}}
### User-Defined
The user can also create any variable they want. These will be placed into the `.Params` variable available to the templates.
You can add fields to your front matter arbitrarily to meet your needs. These user-defined key-values are placed into a single `.Params` variable for use in your templates:
```yaml
include_toc: true
show_comments: false
```
These two user-defined fields can then be accessed via `.Params.include_toc` and `.Params.show_comments`, respectively. The [Variables][] section provides more information on using Hugo's page- and site-level variables in your templates.
{{% note %}}
Field names are always normalized to lowercase (e.g., `camelCase: true` is available as `.Params.camelcase`) for both Hugo's built-in *and* user-defined variables.
Field names are always normalized to lowercase; e.g., `camelCase: true` is available as `.Params.camelcase`.
{{% /note %}}
**Show example toml and yaml front matter**
## Ordering Through Front Matter
You can assign content-specific `weight` in the front matter of your content. These values are especially useful for [ordering][] in list views. You can use `weight` for ordering of content and the convention of [`<TAXONOMY>_weight`][taxweight] for ordering content within a taxonomy. See [Ordering and Grouping Hugo Lists][] to see how `weight` can be used to organize your content in list views.
## Overriding Global Blackfriday Configuration
It's possible to set some options for Markdown rendering in the page's front matter as an override to the site-wide configuration.
It's possible to set some options for Markdown rendering in a content's front matter as an override to the options set in your site `config`.
See [site configuration][config] for more information on setting up global Blackfriday options.
User-Define Parameter (`.Params`)
## Assigning `weight`
### Assigning `weight` for Ordering Content
### Assigning `weight` for Ordering Taxonomies
See [site configuration][config] for more information on Blackfriday configuration options.
## Front Matter Format Specs
@ -167,6 +168,8 @@ User-Define Parameter (`.Params`)
[contentorg]: /content-management/organization/
[content type]: /content-management/types/
[JSON Spec]: /documents/ecma-404-json-spec.pdf "Specification for JSON, JavaScript Object Notation"
[ordering]: /templates/ordering-and-grouping/ "Hugo provides multiple ways to sort and order your content in list templates"
[taxweight]: /content-management/taxonomies/
[TOML Spec]: https://github.com/toml-lang/toml "Specification for TOML, Tom's Obvious Minimal Language"
[urls]: /content-management/urls/
[YAML Spec]: http://yaml.org/spec/ "Specification for YAML, YAML Ain't Markup Language"

View File

@ -5,8 +5,8 @@ description: Hugo's simple yet powerful menu system allows you to add content to
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [templating]
tags: [lists,sections,menus]
categories: [content management]
tags: [menus]
draft: false
weight: 120
aliases: [/extras/menus/]

View File

@ -9,7 +9,7 @@ categories: [content management]
tags: [lists,sections,content types,organization]
weight: 50
draft: false
aliases: [/content-management/sections/,/content/sections/]
aliases: [/content/sections/]
toc: true
---

View File

@ -209,7 +209,7 @@ project_url: "https://github.com/spf13/hugo"
}
```
## Adding Taxonomic `weight` to Content
## Ordering Taxonomies with `weight`
A content file can assign weight for each of its associate taxonomies. Taxonomic weight can be used for sorting or ordering content in [taxonomy list templates][] and is declared in a content file's [front matter][]. The convention for declaring taxonomic weight is `taxonomyname_weight`.

View File

@ -17,9 +17,9 @@ Documentation is a critical component of any open-source project. The Hugo docs
## Create Your Fork
It's best to make changes to the Hugo docs on your local machine to check for consistent visual styling. Make sure you've created a fork of Hugo on GitHub and cloned the repository locally on your machine. For more information, you can use the [GitHub docs for "forking"][ghforking] or see [Hugo's extensive development contribution guide][hugodev].
It's best to make changes to the Hugo docs on your local machine to check for consistent visual styling. Make sure you've created a fork of Hugo on GitHub and cloned the repository locally on your machine. For more information, you can see[GitHub's documentation on "forking"][ghforking] or follow along with [Hugo's evelopment contribution guide][hugodev].
You can then create a separate branch for your additions. Note that you can choose a different descriptive branch name that best fits the type of content. The following is an example of a branch name you might use for adding a new website to the showcase:
You can then create a separate branch for your additions. Choose a different descriptive branch name that best fits the type of content. The following is an example of a branch name you might use for adding a new website to the showcase:
```git
git checkout -b jon-doe-showcase-addition
@ -168,7 +168,7 @@ Your options for languages are `xml`/`html`, `go`/`golang`, `md`/`markdown`/`mkd
The Hugo documentation comes with very robust shortcodes to help you add interactive code snippets.
{{% note %}}
With both `code` and `output` shortcodes, *you must include triple back ticks and language declaration*. This was done by design so that the shortcode wrappers were easily added to legacy documentation and will be that much easier to remove if needed in future versions of the Hugo docs. We assume that the triple-back-tick syntax will live longer than our current, pretty shortcode. {{< emo ":smile:" >}}
With the `code` shortcodes, *you must include triple back ticks and a language declaration*. This was done by design so that the shortcode wrappers were easily added to legacy documentation and will be that much easier to remove if needed in future versions of the Hugo docs. We assume that the triple-back-tick syntax will live longer than our current, pretty shortcode.
{{% /note %}}
#### `code`

View File

@ -19,30 +19,16 @@ deprecated: false
See the [Emoji cheat sheet][emojis] for available emoticons.
```
{{ "I :heart: Hugo" | emojify }}
```
The `emojify` function can be called in your templates but not directly in your content files by default. To add emojis directly into content without further templating or shortcode considerations, set `enableEmoji` to `true` in your site's [configuration][config].
The `emojify` function can be called in your templates but not directly in your content files. However, emojis are most often seen inline. The following is a very simple [shortcode template][sc] you can use to add emojis quickly while you write content. It is also the `emo` shortcode used for the Hugo docs. ([See Hugo Docs Shortcodes Source][scsource].)
## Example
{{% code file="layouts/shortcodes/emo.html" download="emo.html" %}}
```golang
{{< readfile file="layouts/shortcodes/emo.html" >}}
```
{{% /code %}}
When enabled, you can write emoji shorthand directly into your content files; e.g. <code>I :</code><code>heart</code><code>: Hugo!</code>:
You can then call the shortcode directly in your content using the following:
I :heart: Hugo!
{{% code file="content/functions/emojify.md" %}}
```golang
I {{</* emo ":heart:" */>}} Hugo!
```
{{% /code %}}
The preceding use of the `emo` shortcode called in content will display as follows:
I {{< emo ":heart:" >}} Hugo!
[config]: /getting-started/configuration/
[emojis]: http://www.emoji-cheat-sheet.com/
[sc]: /templates/shortcode-templates/
[scsource]: https://github.com/spf13/hugo/tree/master/docs/layouts/shortcodes

View File

@ -308,6 +308,15 @@ watch = true
```
{{% /code %}}
{{% note %}}
If you are developing your site on a \*nix machine, here is a handy shortcut for finding a configuration option from the command line:
```bash
~/sites/yourhugosite
hugo config | grep emoji
enableemoji: true
```
{{% /note %}}
## Environmental Variables
In addition to the 3 configuration file options already mentioned, website configuration can be accomplished through operating system environment variables.
@ -333,7 +342,7 @@ ignoreFiles = [ "\\.foo$", "\\.boo$" ]
The above is a list of regular expressions. Note that the backslash (`\`) character is escaped in this example to keep TOML happy.
## Configuring Blackfriday Rendering
## Configuring Blackfriday
[Blackfriday](https://github.com/russross/blackfriday) is Hugo's built-in
Markdown rendering engine.
@ -370,7 +379,7 @@ blackfriday:
```
{{% /code %}}
## Specs for Configuration Formats
## Configuration Format Specs
* [TOML Spec][toml]
* [YAML Spec][yaml]

View File

@ -1,10 +1,10 @@
---
title: Directory Structure
linktitle: Directory Structure
description: Hugo's CLI scaffolds a project's directory structure nearly instantly and then takes that single directory and uses it as the input for creating a complete website.
description: Hugo's CLI scaffolds a project directory structure and then takes that single directory and uses it as the input for creating a complete website.
date: 2017-01-02
publishdate: 2017-01-02
lastmod: 2017-01-02
publishdate: 2017-02-01
lastmod: 2017-03-09
categories: [project organization]
tags: [source, organization, directories,fundamentals]
weight: 50
@ -14,12 +14,12 @@ aliases: [/overview/source-directory/]
toc: true
---
<!-- copied from old overview/source-directory -->
Hugo takes a single directory and uses it as the input for creating a complete
website.
## Directory Scaffolding in New Hugo Sites
## Directory Scaffolding in `new hugo site`
The top level of a source directory will typically have the following elements:
@ -40,7 +40,7 @@ Learn more about the different directories and what their purpose is:
* [data](/templates/data-templates/)
* [i18n](/content-management/multilingual/)
* [archetypes](/content-management/archetypes/)
* [content](/content-managemt/organization/)
* [content](/content-management/organization/)
* [layouts](/templates/)
* [static](/themes/creating-a-theme/)
* [themes](/themes/)

View File

@ -14,7 +14,7 @@ toc: true
wip: true
---
## Testing Installation with `hugo help`
## Testing Installation
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:
@ -27,7 +27,8 @@ The output you see in your console should be similar to the following:
```bash
hugo is the main command, used to build your Hugo site.
Hugo is a Fast and Flexible Static Site Generator built with love by spf13 and friends in Go.
Hugo is a Fast and Flexible Static Site Generator
built with love by spf13 and friends in Go.
Complete documentation is available at http://gohugo.io/.
@ -37,6 +38,7 @@ Usage:
Available Commands:
benchmark Benchmark Hugo by building a site a number of times.
check Contains some verification checks
config Print the site configuration
convert Convert your content to different formats
env Print Hugo version and environment info
@ -49,51 +51,48 @@ Available Commands:
version Print the version number of Hugo
Flags:
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
-D, --buildDrafts include content marked as draft
-E, --buildExpired include expired content
-F, --buildFuture include content with publishdate in the future
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
--canonifyURLs if true, all relative URLs will be canonicalized using baseURL
--cleanDestinationDir Remove files from destination not found in static directories
--config string config file (default is path/config.yaml|json|toml)
-c, --contentDir string filesystem path to content directory
-d, --destination string filesystem path to write files to
--disable404 Do not render 404 page
--disableRSS Do not build RSS files
--disableSitemap Do not build Sitemap file
--enableGitInfo Add Git revision, date and author info to the pages
--forceSyncStatic Copy all files when static is changed.
--i18n-warnings Print missing translations
--ignoreCache Ignores the cache directory
-l, --layoutDir string filesystem path to layout directory
--log Enable Logging
--logFile string Log File path (if set, logging enabled automatically)
--noChmod Don't sync permission mode of files
--noTimes Don't sync modification time of files
--pluralizeListTitles Pluralize titles in lists using inflect (default true)
--preserveTaxonomyNames Preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu")
--quiet build in quiet mode
--renderToMemory render to memory (only useful for benchmark testing)
-s, --source string filesystem path to read files relative from
--stepAnalysis display memory and timing of different steps of the program
-t, --theme string theme to use (located in /themes/THEMENAME/)
--uglyURLs if true, use /filename.html instead of /filename/
-v, --verbose verbose output
--verboseLog verbose logging
-w, --watch watch filesystem for changes and recreate as needed
Additional help topics:
hugo check Contains some verification checks
Use "hugo [command] --help" for more information about a command.
-b, --baseURL string hostname (and path) to the root, e.g. http://spf13.com/
-D, --buildDrafts include content marked as draft
-E, --buildExpired include expired content
-F, --buildFuture include content with publishdate in the future
--cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/
--canonifyURLs if true, all relative URLs will be canonicalized using baseURL
--cleanDestinationDir Remove files from destination not found in static directories
--config string config file (default is path/config.yaml|json|toml)
-c, --contentDir string filesystem path to content directory
-d, --destination string filesystem path to write files to
--disable404 Do not render 404 page
--disableKinds stringSlice Disable different kind of pages (home, RSS etc.)
--disableRSS Do not build RSS files
--disableSitemap Do not build Sitemap file
--enableGitInfo Add Git revision, date and author info to the pages
--forceSyncStatic Copy all files when static is changed.
--i18n-warnings Print missing translations
--ignoreCache Ignores the cache directory
-l, --layoutDir string filesystem path to layout directory
--log Enable Logging
--logFile string Log File path (if set, logging enabled automatically)
--noChmod Don't sync permission mode of files
--noTimes Don't sync modification time of files
--pluralizeListTitles Pluralize titles in lists using inflect (default true)
--preserveTaxonomyNames Preserve taxonomy names as written ("Gérard Depardieu" vs "gerard-depardieu")
--quiet build in quiet mode
--renderToMemory render to memory (only useful for benchmark testing)
-s, --source string filesystem path to read files relative from
--stepAnalysis display memory and timing of different steps of the program
-t, --theme string theme to use (located in /themes/THEMENAME/)
--themesDir string filesystem path to themes directory
--uglyURLs if true, use /filename.html instead of /filename/
-v, --verbose verbose output
--verboseLog verbose logging
-w, --watch watch filesystem for changes and recreate as needed
```
## Common Usage
The most common usage is probably to run `hugo` with your current directory being the input directory.
This generates your website to the `public/` directory by default---although [this can be configured to your needs via `publishDir`][configdir]---ready to be deployed to your web server.
This generates your website to the `public/` directory by default, although you can customize the output directory in your [site configuration][config] by changing the `publishDir` field. The site Hugo renders into `public/` is ready to be deployed to your web server.
```bash
hugo
@ -103,7 +102,7 @@ hugo
0 paginator pages created
16 tags created
0 groups created
in 120 ms
in 90 ms
```
## Instant Feedback During Development
@ -123,7 +122,7 @@ Watching for changes in /Users/spf13/Code/hugo/docs/content
Press Ctrl+C to stop
```
Hugo can even run a server and create a site preview at the same time! Hugo implements [LiveReload](#LiveReload) technology to automatically reload any open pages in all JavaScript-enabled browsers, including mobile. This is the easiest and most common way to develop a Hugo web site:
Hugo can even run a server and create a site preview at the same time! Hugo implements LiveReload technology to automatically reload any open pages in all JavaScript-enabled browsers, including mobile. This is the easiest and most common way to develop a Hugo web site:
```bash
hugo server -ws ~/Code/hugo/docs
@ -153,7 +152,7 @@ Hugo comes with [LiveReload](https://github.com/livereload/livereload-js) built
hugo server
```
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]
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][dirs]
* `/static/*`
* `/content/*`
@ -254,8 +253,8 @@ Interested? Here are some great tutorials contributed by Hugo users:
[Amazon S3]: http://aws.amazon.com/s3/
[Apache]: http://httpd.apache.org/ "Apache HTTP Server"
[CloudFront]: http://aws.amazon.com/cloudfront/ "Amazon CloudFront"
[configdir]: /getting-started/configuration/
[directorystructure]: /getting-started/directory-structure/
[config]: /getting-started/configuration/
[dirs]: /getting-started/directory-structure/
[DreamHost]: http://www.dreamhost.com/
[Firebase Hosting]: https://firebase.google.com/docs/hosting/
[GitHub Pages]: https://pages.github.com/

View File

@ -15,7 +15,7 @@ aliases: [/site-showcase/]
toc: false
---
The following sites have been built with {{< emo ":heart:" >}} and Hugo. If you're interested in adding your site to the showcase, [see how to contribute][addshowcase].
The following sites have been built with Hugo. If you've recently built a site with Hugo that you'd like to share with the community, please [contribute][addshowcase].
[addshowcase]: /contribute/documentation/#adding-to-the-showcase

View File

@ -12,7 +12,6 @@ weight: 20
draft: false
aliases: [/templates/blocks/,/templates/base-templates-and-blocks/]
toc: true
wip: true
---
Go 1.6 includes a powerful new keyword, `block`. This construct allows you to define the outer shell of your pages' one or more master template(s) and then fill in or override portions as necessary.
@ -53,7 +52,7 @@ Here is the lookup order for the `post` base template:
## Defining the Base Template
The following defines a simple base template at `_default/baseof.html`. As a default template, it is the shell from which all your pages will start unless you specify another `*baseof.html` closer to the beginning of the lookup order..
The following defines a simple base template at `_default/baseof.html`. As a default template, it is the shell from which all your pages will be rendered unless you specify another `*baseof.html` closer to the beginning of the lookup order..
{{% code file="layouts/_default/baseof.html" download="baseof.html" %}}
```html
@ -68,7 +67,6 @@ The following defines a simple base template at `_default/baseof.html`. As a def
</head>
<body>
<!-- Code that all your templates share, like a header -->
{{ block "main" . }}
<!-- The part of the page that begins to differ between templates -->
{{ end }}
@ -98,8 +96,8 @@ From the above base template, you can define a [default list template][hugolists
```
{{% /code %}}
{{% note "No Go Context \"Dot\" in Block Definitions" %}}
When using the `define` keyword, you do *not* need to use Go templates context reference (i.e., 'The Dot"). (Read more on ["The Dot" in the Go Template Primer](/templates/go-templates/).)
{{% note "No Go Context \"the dot\" in Block Definitions" %}}
When using the `define` keyword, you do *not* need to use Go templates context reference (i.e., "the dot"). (Read more on ["the dot" in the Go Template Primer](/templates/go-templates/).)
{{% /note %}}
This replaces the contents of our (basically empty) "main" block with something useful for the list template. In this case, we didn't define a `"title"` block, so the contents from our base template remain unchanged in lists.
@ -108,7 +106,7 @@ This replaces the contents of our (basically empty) "main" block with something
Code that you put outside the block definitions *can* break your layout. This even includes HTML comments. For example:
```html
<!-- Harmless comment..that will break your layout at build -->
<!-- Seemingly harmless HTML comment..that will break your layout at build -->
{{ define "main" }}
...your code here
{{ end }}

View File

@ -1,7 +1,7 @@
---
title: Data Templates
linktitle:
description: In addition to the Hugo's many built-in variables, you can specify your own custom data in templates or shortcodes that pull from both local and dynamic sources.
description: In addition to Hugo's built-in variables, you can specify your own custom data in templates or shortcodes that pull from both local and dynamic sources.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01

View File

@ -1,6 +1,6 @@
---
title: Introduction to Lists in Hugo
linktitle: Hugo Lists
title: Introduction to Hugo Lists
linktitle: Hugo Lists Introduction
description: Lists have a specific meaning and usage in Hugo when it comes to rendering your site homepage, section page, taxonomy list, or taxonomy terms list.
date: 2017-02-01
publishdate: 2017-02-01
@ -45,16 +45,13 @@ Since section lists and taxonomy lists (N.B., *not* [taxonomy terms lists][taxte
### Taxonomy RSS
A Taxonomys RSS will be rendered at /`PLURAL`/`TERM`/index.xml (e.g.&nbsp;http://spf13.com/topics/golang/index.xml)
A Taxonomys RSS will be rendered at `/<PLURAL>/<TERM>/index.xml` (e.g.&nbsp;http://spf13.com/topics/golang/index.xml).
{{% note %}}
Hugo ships with its own [RSS 2.0][] template. In most cases this will
be sufficient, and an RSS template will not need to be provided by the
user.
Most use cases will find that the [RSS 2.0][] template that ships with Hugo is sufficient for their needs.
{{% /note %}}
Hugo provides the ability for you to define any RSS type you wish, and
can have different RSS files for each section and taxonomy.
Hugo provides the ability for you to define any RSS type you wish. You can can have different RSS files for each section and taxonomy:
1. `/layouts/taxonomy/<SINGULAR>.rss.xml`
1. `/layouts/_default/rss.xml`

View File

@ -1,7 +1,7 @@
---
title: Ordering and Grouping Lists
linktitle: Rendering Hugo Lists
description: Hugo assumes that the same structure that works to organize your source content is used to organize the rendered site, but
title: Ordering and Grouping Hugo Lists
linktitle: List Ordering and Grouping
description: You can group or order your content in both your templating and content front matter.
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
@ -14,7 +14,6 @@ toc: true
wip: true
---
## Understanding `.Data.Pages`
From this image, we can assume that the "homepage" for Section A---presumably, `/section-a/index.html`---is going to list the content pages 1,2,3. In this way, pages 1,2,3 are *data* made available to the template that renders to the .
@ -46,7 +45,7 @@ This content template is used for [spf13.com](http://spf13.com/). It makes use o
### Example Taxonomy Template
This content template is used for [spf13.com](http://spf13.com/). It makes use of [partial templates](/templates/partials/). All examples use a [view](/templates/views/) called either "li" or "summary" which this example site defined.
The following taxonomy template uses a [content view template][views] called either "li" or "summary" which this example site defined.
{{% code file="layouts/_default/taxonomies.html" download="taxonomies.html" %}}
```html
@ -379,3 +378,6 @@ Using `first` and `where` together can be very powerful:
{{ end }}
```
{{% /code %}}
[views]: /templates/views/

View File

@ -16,7 +16,7 @@ wip: true
Hugo can generate a customized [robots.txt][robots] in the same way as any other template.
To enable creating your robots.txt as a template, set the `enableRobotsTXT` value to `true` in your [project's configuration file][config]. By default, this option generates a robots.txt with the following content, which tells search engines that they are allowed to crawl everything:
To create your robots.txt as a template, first set the `enableRobotsTXT` value to `true` in your [configuration file][config]. By default, this option generates a robots.txt with the following content, which tells search engines that they are allowed to crawl everything:
```http
User-agent: *
@ -29,9 +29,13 @@ The [lookup order][lookup] for the `robots.txt` template is as follows:
* `/layouts/robots.txt`
* `/themes/<THEME>/layout/robots.txt`
## Robots. txt Template Example
{{% note %}}
If you do not want Hugo to create a default `robots.txt` or leverage the `robots.txt` template, you can hand code your own and place the file in `static`. Remember that everything in the [static directory](/getting-started/directory-structure/) is copied over as-is when Hugo builds your site.
{{% /note %}}
The following is an example`robots.txt` layout:
## Robots.txt Template Example
The following is an example `robots.txt` layout:
{{% code file="layouts/robots.txt" download="robots.txt" %}}
```http

View File

@ -1,6 +1,6 @@
---
title: Section Page Templates
linktitle: Section Page Templates
linktitle: Section Templates
description: Templates used for section pages are lists and therefore have all the variables and methods available to list pages.
date: 2017-02-01
publishdate: 2017-02-01

View File

@ -10,7 +10,7 @@ categories: [templates]
tags: [debugging,troubleshooting]
weight: 180
draft: false
aliases: [/templates/debugging/]
aliases: []
toc: false
---
@ -22,32 +22,30 @@ These snippets use the `printf` function available in all Go templates. This fu
You can use the template syntax, `$.`, to get the top-level template context from anywhere in your template. This will print out all the values under, `.Site`.
{{% code file="get-top-level-syntax.sh" %}}
```golang
```html
{{ printf "%#v" $.Site }}
```
{{% /code %}}
This will print out the value of `.Permalink`:
{{% code file="get-permalink.sh" %}}
```golang
```html
{{ printf "%#v" .Permalink }}
```
{{% /code %}}
This will print out a list of all the variables scoped to the current context
(aka [The dot, "`.`"][primer]).
(`.`, aka ["the dot"][primer]).
{{% code file="get-all-vars-current-context.sh" %}}
```golang
```html
{{ printf "%#v" . }}
```
{{% /code %}}
When writing a [Homepage][hometemplate], what does one of the pages you're looping through look like?
```golang
When developing a [homepage][], what does one of the pages you're looping through look like?
```html
{{ range .Data.Pages }}
{{/* The context, ".", is now each one of the pages as it goes through the loop */}}
{{ printf "%#v" . }}
@ -55,24 +53,24 @@ When writing a [Homepage][hometemplate], what does one of the pages you're loopi
```
{{% note "`.Date.Pages` on the Homepage" %}}
Using `.Data.Pages` on the homepage is the equivalent of writing `.Site.Pages`.
`.Data.Pages` on the homepage is equivalent to `.Site.Pages`.
{{% /note %}}
## Why Am I Showing No Defined Variables?
Check that you are passing variables in the `partial` function:
```
```html
{{ partial "header" }}
```
This example will render the header partial, but the header partial will not have access to any contextual variables. You need to pass variables explicitly. For example note the addition of [the dot][primer].
This example will render the header partial, but the header partial will not have access to any contextual variables. You need to pass variables explicitly. For example, note the addition of ["the dot"][primer].
```
```html
{{ partial "header" . }}
```
The dot (`.`) is considered fundamental to understand Hugo templating. For more information, see the [Go Template Primer][primer].
The dot (`.`) is considered fundamental to understanding Hugo templating. For more information, see the [Go Template Primer][primer].
[hometemplate]: /templates/homepage/
[homepage]: /templates/homepage/
[primer]: /templates/go-templates/

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

View File

@ -1,19 +1,19 @@
<!DOCTYPE html>
<html lang="en">
{{- partial "site-head.html" . -}}
<body>
{{ block "header" . }}
{{- partial "site-header.html" . -}}
{{- partial "site-search.html" . -}}
{{ end }}
<div class="all-content-wrapper{{if .IsHome}} home{{end}}" id="all-content-wrapper">
{{ block "main" . }}
{{ end}}
</div>
{{- partial "site-footer.html" . -}}
{{- partial "site-navigation.html" . -}}
{{- partial "site-scripts.html" . -}}
{{ block "addscripts" . }}
{{ end }}
</body>
<body>
{{ block "header" . }}
{{- partial "site-header.html" . -}}
{{- partial "site-search.html" . -}}
{{ end }}
<div class="all-content-wrapper{{if .IsHome}} home{{end}}" id="all-content-wrapper">
{{ block "main" . }}
{{ end}}
</div>
{{- partial "site-footer.html" . -}}
{{- partial "site-navigation.html" . -}}
{{- partial "site-scripts.html" . -}}
{{ block "addscripts" . }}
{{ end }}
</body>
</html>

View File

@ -1,11 +1,7 @@
<link rel="dns-prefetch" href="{{ .Site.BaseURL }}">
<!-- Preconnect API. For browser compatibility, check http://caniuse.com/#feat=link-rel-preconnect -->
<link rel="preconnect" href="{{ .Site.BaseURL }}">
<link rel="canonical" href="{{ .Permalink }}">
{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
<link rel="preconnect" href="{{ .Site.Params.siteaddress }}">
<link rel="canonical" href="{{ .Site.Params.siteaddress }}{{.URL}}">
{{with .NextInSection }}
<link rel="prefetch" href="{{.Permalink}}">
<link rel="prerender" href="{{.Permalink}}">
@ -13,4 +9,4 @@
{{with .PrevInSection }}
<link rel="prefetch" href="{{.Permalink}}">
<link rel="prerender" href="{{.Permalink}}">
{{ end }}
{{ end }}

View File

@ -0,0 +1,4 @@
{{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
<link href="{{ .RSSLink }}" rel="feed" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}

View File

@ -7,5 +7,6 @@
{{- partial "head/metadata-opengraph.html" . -}}
{{- partial "head/metadata-favicons.html" . -}}
{{- partial "head/metadata-prefetch.html" . -}}
{{- partial "head/metadata-rss.html" . -}}
{{- partial "head/site-style.html" . -}}
</head>

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
{{ .Get 0 | emojify }}

View File

@ -26,19 +26,23 @@ $hugo-gray-light:lighten($hugo-gray, 30%);
$hugo-gray-ultra-light:lighten($hugo-gray-light, 22%);
$hugo-green:#00A88A;
$hugo-green-light:#33BA91;
//Examples
$examplesite-example-color:$hugo-pink;
$examplesite-codeblock-shortcode-header-bg-color: $hugo-pink;
$input-example-color:$hugo-gray-dark;
$output-example-color:$hugo-blue;
//Document Body
$body-bg-color:$hugo-white;
//Typography
$base-font-size: 18px;
$base-font-color: #222222;
$base-line-height-content: 1.6;
$base-font-bold-color: $base-font-color;
$systemfonts: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbols";
// Font Families
// $base-font-family: 'museo-sans','muli',$helvetica;
$base-font-family: 'lato','muli',$helvetica;
@ -47,8 +51,8 @@ $code-font-family:'robotomono',courier,monospace;
// Font Weights
$base-font-weight: 400;
$base-font-bold-weight: 500;
$heading-font-weight: 500;
$base-font-bold-weight: 700;
$heading-font-weight: 600;
$code-font-base-weight: 400;
$code-font-bold-weight: 500;

View File

@ -19,12 +19,19 @@ body {
color: $base-font-color;
line-height: $base-line-height-content;
font-weight: $base-font-weight;
overflow-x:hidden;
overflow-x: hidden;
}
//fixes scroll when fixed items (e.g. search input) are given focus on iOS safari
html,
body {
overflow-y: auto !important;
-webkit-overflow-scrolling: touch!important;
}
body {
font-size: 93%;
overflow-x:hidden;
overflow-x: hidden;
@include MQ(M) {
font-size: 97%;
}
@ -36,8 +43,8 @@ body {
}
strong {
font-weight:$base-font-bold-weight;
color:$base-font-bold-color;
font-weight: $base-font-bold-weight;
color: $base-font-bold-color;
}
p {
@ -47,6 +54,5 @@ p {
}
::-webkit-scrollbar {
display:none;
display: none;
}

View File

@ -1,11 +1,11 @@
@font-face {
font-family: 'fontello';
src: url('/fonts/fontello/fontello.eot?69840057');
src: url('/fonts/fontello/fontello.eot?69840057#iefix') format('embedded-opentype'),
url('/fonts/fontello/fontello.woff2?69840057') format('woff2'),
url('/fonts/fontello/fontello.woff?69840057') format('woff'),
url('/fonts/fontello/fontello.ttf?69840057') format('truetype'),
url('/fonts/fontello/fontello.svg?69840057#fontello') format('svg');
src: url('/fonts/fontello/fontello.eot?12848190');
src: url('/fonts/fontello/fontello.eot?12848190#iefix') format('embedded-opentype'),
url('/fonts/fontello/fontello.woff2?12848190') format('woff2'),
url('/fonts/fontello/fontello.woff?12848190') format('woff'),
url('/fonts/fontello/fontello.ttf?12848190') format('truetype'),
url('/fonts/fontello/fontello.svg?12848190#fontello') format('svg');
font-weight: normal;
font-style: normal;
}
@ -15,7 +15,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'fontello';
src: url('../font/fontello.svg?69840057#fontello') format('svg');
src: url('../font/fontello.svg?12848190#fontello') format('svg');
}
}
*/
@ -72,8 +72,10 @@
.icon-firefox:before { content: '\e840'; } /* '' */
.icon-forums:before { content: '\f03d'; } /* '' */
.icon-freebsd:before { content: '\e800'; } /* '' */
.icon-git:before { content: '\f1d3'; } /* '' */
.icon-github-alt:before { content: '\f056'; } /* '' */
.icon-github:before { content: '\f09b'; } /* '' */
.icon-gitlab:before { content: '\f296'; } /* '' */
.icon-gitter:before { content: '\e805'; } /* '' */
.icon-golang:before { content: '\e801'; } /* '' */
.icon-heart:before { content: '\e804'; } /* '' */
@ -86,7 +88,6 @@
.icon-linux:before { content: '\f17c'; } /* '' */
.icon-mail-alt:before { content: '\f0e0'; } /* '' */
.icon-md:before { content: '\e818'; } /* '' */
.icon-markdown:before { content: '\e818'; } /* '' */
.icon-netlify:before { content: '\e80b'; } /* '' */
.icon-opera:before { content: '\e842'; } /* '' */
.icon-pencil:before { content: '\e807'; } /* '' */

View File

@ -47,7 +47,6 @@ h1.page-title {
h2,
h3 {
padding-bottom: 24px;
// padding-right: 1.5em;
}
h2 {

View File

@ -86,6 +86,13 @@ code.language-js:after {
top: 2px;
}
code.language-git:after {
font-family: 'fontello';
content: '\f1d3';
font-size: 16px;
top: 2px;
}
code.language-hugo:after,
code.language-go:after,
code.language-golang:after {
@ -121,6 +128,13 @@ code.language-yml:after {
font-family: $code-font-family;
}
code.language-json:after {
content: 'JSON';
font-size: .8em;
padding-right: .3em;
font-family: $code-font-family;
}
code.language-md:after,
code.language-markdown:after {
font-family: 'fontello';

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Some files were not shown because too many files have changed in this diff Show More