Fixed error in tutorial, added site variable docs

While following the github pages tutorial I found some issues. These are
the commands I ran that worked.

Added site variables to the docs from the code.
This commit is contained in:
Dan Hersam 2015-01-11 23:05:32 -05:00 committed by Anthony Fok
parent 6c5a7b7b64
commit 6fda9012d6
2 changed files with 15 additions and 3 deletions

View file

@ -79,7 +79,7 @@ includes indexes, lists and the homepage.
Also available is `.Site` which has the following: Also available is `.Site` which has the following:
**.Site.BaseUrl** The base URL for the site as defined in the config.json file.<br> **.Site.BaseUrl** The base URL for the site as defined in the site configuration file.<br>
**.Site.Taxonomies** The indexes for the entire site.<br> **.Site.Taxonomies** The indexes for the entire site.<br>
**.Site.LastChange** The date of the last change of the most recent content.<br> **.Site.LastChange** The date of the last change of the most recent content.<br>
**.Site.Recent** Array of all content ordered by Date, newest first.<br> **.Site.Recent** Array of all content ordered by Date, newest first.<br>
@ -90,3 +90,15 @@ Also available is `.Site` which has the following:
[params] [params]
description = "Tesla's Awesome Hugo Site" description = "Tesla's Awesome Hugo Site"
author = "Nikola Tesla" author = "Nikola Tesla"
**.Site.Sections** Top level directories of the site.<br>
**.Site.Pages** All of the content pages of the site.<br>
**.Site.Files** All of the source files of the site.<br>
**.Site.Menus** All of the menus in the site.<br>
**.Site.Title** A string representing the title of the site.<br>
**.Site.Author** A map of the authors as defined in the site configuration.<br>
**.Site.LanguageCode** A string representing the language as defined in the site configuration.<br>
**.Site.DisqusShortname** A string representing the shortname of the Disqus shortcode as defined in the site configuration.<br>
**.Site.Copyright** A string representing the copyright of your web site as defined in the site configuration.<br>
**.Site.LastChange** A string representing the last time content has been updated.<br>
**.Site.Permalinks** A string to override the default permalink format. Defined in the site configuration.<br>
**.Site.BuildDrafts** A boolean (Default: false) to indicate whether to build drafts. Defined in the site configuration.<br>

View file

@ -128,10 +128,10 @@ To get this properly set up, we will execute a series of commands at the termina
rm -rf public rm -rf public
# Add the gh-pages branch of the repository. It will look like a folder named public # Add the gh-pages branch of the repository. It will look like a folder named public
git subtree add --prefix public git@github.com:spencerlyon2/hugo_gh_blog.git gh-pages --squash git subtree add --prefix=public git@github.com:spencerlyon2/hugo_gh_blog.git gh-pages --squash
# Pull down the file we just committed. This helps avoid merge conflicts # Pull down the file we just committed. This helps avoid merge conflicts
git subtree pull --prefix=public git subtree pull --prefix=public git@github.com:spencerlyon2/hugo_gh_blog.git gh-pages
# Run hugo. Generated site will be placed in public directory (or omit -t ThemeName if you're not using a theme) # Run hugo. Generated site will be placed in public directory (or omit -t ThemeName if you're not using a theme)
hugo -t ThemeName hugo -t ThemeName