From 6fda9012d6e1e17366000d0218297099751e5f6a Mon Sep 17 00:00:00 2001 From: Dan Hersam Date: Sun, 11 Jan 2015 23:05:32 -0500 Subject: [PATCH] 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. --- docs/content/templates/variables.md | 14 +++++++++++++- docs/content/tutorials/github_pages_blog.md | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/content/templates/variables.md b/docs/content/templates/variables.md index e6b6b5a3f..5a30b311f 100644 --- a/docs/content/templates/variables.md +++ b/docs/content/templates/variables.md @@ -79,7 +79,7 @@ includes indexes, lists and the homepage. Also available is `.Site` which has the following: -**.Site.BaseUrl** The base URL for the site as defined in the config.json file.
+**.Site.BaseUrl** The base URL for the site as defined in the site configuration file.
**.Site.Taxonomies** The indexes for the entire site.
**.Site.LastChange** The date of the last change of the most recent content.
**.Site.Recent** Array of all content ordered by Date, newest first.
@@ -90,3 +90,15 @@ Also available is `.Site` which has the following: [params] description = "Tesla's Awesome Hugo Site" author = "Nikola Tesla" +**.Site.Sections** Top level directories of the site.
+**.Site.Pages** All of the content pages of the site.
+**.Site.Files** All of the source files of the site.
+**.Site.Menus** All of the menus in the site.
+**.Site.Title** A string representing the title of the site.
+**.Site.Author** A map of the authors as defined in the site configuration.
+**.Site.LanguageCode** A string representing the language as defined in the site configuration.
+**.Site.DisqusShortname** A string representing the shortname of the Disqus shortcode as defined in the site configuration.
+**.Site.Copyright** A string representing the copyright of your web site as defined in the site configuration.
+**.Site.LastChange** A string representing the last time content has been updated.
+**.Site.Permalinks** A string to override the default permalink format. Defined in the site configuration.
+**.Site.BuildDrafts** A boolean (Default: false) to indicate whether to build drafts. Defined in the site configuration.
diff --git a/docs/content/tutorials/github_pages_blog.md b/docs/content/tutorials/github_pages_blog.md index 0460df270..5337f457d 100644 --- a/docs/content/tutorials/github_pages_blog.md +++ b/docs/content/tutorials/github_pages_blog.md @@ -128,10 +128,10 @@ To get this properly set up, we will execute a series of commands at the termina rm -rf 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 - 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) hugo -t ThemeName