aboutsummaryrefslogtreecommitdiffstats
path: root/content/overview
diff options
context:
space:
mode:
authoretienne <admin@MacBook-Pro-de-Admin.local>2014-10-21 23:35:24 +0200
committeretienne <admin@MacBook-Pro-de-Admin.local>2014-10-21 23:35:24 +0200
commit667e11c4ec3835d959aab1797647bd0a49869674 (patch)
tree84c6c5f20686574009f1dccc0f27a7192ff165e7 /content/overview
Init commit
Diffstat (limited to 'content/overview')
-rw-r--r--content/overview/configuration.md70
-rw-r--r--content/overview/installing.md68
-rw-r--r--content/overview/introduction.md126
-rw-r--r--content/overview/quickstart.md159
-rw-r--r--content/overview/source-directory.md90
-rw-r--r--content/overview/usage.md89
6 files changed, 602 insertions, 0 deletions
diff --git a/content/overview/configuration.md b/content/overview/configuration.md
new file mode 100644
index 0000000..9b4b500
--- /dev/null
+++ b/content/overview/configuration.md
@@ -0,0 +1,70 @@
+---
+aliases:
+- /doc/configuration/
+date: 2013-07-01
+linktitle: Configuration
+menu:
+ main:
+ parent: getting started
+next: /overview/source-directory
+notoc: true
+prev: /overview/usage
+title: Configuring Hugo
+weight: 40
+---
+
+The directory structure and templates provide the majority of the
+configuration for a site. In fact, a config file isn't even needed for many
+websites since the defaults follow commonly used patterns.
+
+Hugo expects to find the config file in the root of the source directory and
+will look there first for a `config.toml` file. If none is present, it will
+then look for a `config.yaml` file, followed by a `config.json` file.
+
+The config file is a site-wide config. The config file provides directions to
+hugo on how to build the site as well as site-wide parameters and menus.
+
+## Examples
+
+The following is an example of a typical yaml config file:
+
+ ---
+ baseurl: "http://yoursite.example.com/"
+ ...
+
+The following is an example of a toml config file with some of the default values:
+
+ contentdir = "content"
+ layoutdir = "layouts"
+ publishdir = "public"
+ builddrafts = false
+ baseurl = "http://yoursite.example.com/"
+ canonifyurls = true
+
+ [indexes]
+ category = "categories"
+ tag = "tags"
+
+Here is a yaml configuration file which sets a few more options
+
+ ---
+ baseurl: "http://yoursite.example.com/"
+ title: "Yoyodyne Widget Blogging"
+ footnotereturnlinkcontents: "↩"
+ permalinks:
+ post: /:year/:month/:title/
+ params:
+ Subtitle: "Spinning the cogs in the widgets"
+ AuthorName: "John Doe"
+ GitHubUser: "spf13"
+ ListOfFoo:
+ - "foo1"
+ - "foo2"
+ SidebarRecentLimit: 5
+ ...
+
+## Notes
+
+Config changes do not reflect with [Live Reload](/extras/livereload).
+
+Please restart `hugo server --watch` whenever you make a config change.
diff --git a/content/overview/installing.md b/content/overview/installing.md
new file mode 100644
index 0000000..1ae8068
--- /dev/null
+++ b/content/overview/installing.md
@@ -0,0 +1,68 @@
+---
+aliases:
+- /doc/installing/
+date: 2013-07-01
+menu:
+ main:
+ parent: getting started
+next: /overview/usage
+prev: /overview/quickstart
+title: Installing Hugo
+weight: 20
+---
+
+Hugo is written in Go with support for Windows, Linux, FreeBSD and OS&nbsp;X.
+
+The latest release can be found at [Hugo Releases](https://github.com/spf13/hugo/releases).
+We currently build for Windows, Linux, FreeBSD and OS&nbsp;X for x64
+and i386 architectures.
+
+## Installing Hugo (binary)
+
+Installation is very easy. Simply download the appropriate version for your
+platform from [Hugo Releases](https://github.com/spf13/hugo/releases).
+Once downloaded it can be run from anywhere. You don't need to install
+it into a global location. This works well for shared hosts and other systems
+where you don't have a privileged account.
+
+Ideally you should install it somewhere in your path for easy use. `/usr/local/bin`
+is the most probable location.
+
+If you have [Homebrew](http://brew.sh), installation is even easier. Just run
+`brew install hugo`.
+
+### Installing Pygments (optional)
+
+The Hugo executable has one *optional* external dependency for source code highlighting (Pygments).
+
+If you want to have source code highlighting using the [highlight shortcode](/extras/highlighting),
+you need to install the Python-based Pygments program. The procedure is outlined on the [Pygments home page](http://pygments.org).
+
+## Upgrading Hugo
+
+Upgrading Hugo is as easy as downloading and replacing the executable you’ve
+placed in your path.
+
+
+## Installing from source
+
+### Dependencies
+
+* Git
+* Go 1.1+
+* Mercurial
+* Bazaar
+
+### Get directly from GitHub:
+
+ go get -v github.com/spf13/hugo
+
+### Building Hugo
+
+ cd /path/to/hugo
+ go build -o hugo main.go
+ mv hugo /usr/local/bin/
+
+## Contributing
+
+Please see the [contributing guide](/doc/contributing).
diff --git a/content/overview/introduction.md b/content/overview/introduction.md
new file mode 100644
index 0000000..8f76e4a
--- /dev/null
+++ b/content/overview/introduction.md
@@ -0,0 +1,126 @@
+---
+date: 2013-07-01
+linktitle: Introduction
+menu:
+ main:
+ parent: getting started
+next: /overview/quickstart
+title: Introduction to Hugo
+weight: 5
+---
+
+## What is Hugo?
+
+Hugo is a general-purpose website framework. Technically speaking, Hugo is
+a static site generator. This means that, unlike systems like WordPress,
+Ghost and Drupal, which run on your web server expensively building a page
+every time a visitor requests one, Hugo does the building when you create
+your content. Since websites are viewed far more often then they are
+edited, Hugo is optimized for website viewing while providing a great
+writing experience.
+
+Sites built with Hugo are extremely fast and very secure. Hugo sites can
+be hosted anywhere, including Heroku, GoDaddy, GitHub Pages, Amazon S3
+and CloudFront, and work well with CDNs. Hugo sites run without dependencies
+on expensive runtimes like Ruby, Python or PHP and without dependencies
+on any databases.
+
+We think of Hugo as the ideal website creation tool. With nearly instant
+build times and the ability to rebuild whenever a change is made, Hugo
+provides a very fast feedback loop. This is essential when you are
+designing websites, but also very useful when creating content.
+
+## What does Hugo do?
+
+In technical terms, Hugo takes a source directory of Markdown files and
+templates and uses these as input to create a complete website.
+
+Hugo boasts the following features:
+
+### General
+
+ * Extremely fast build times (~1&nbsp;ms per page)
+ * Completely cross platform: Runs on Mac OS&nbsp;X, Linux and Windows
+ * Easy [installation](/overview/installing)
+ * Render changes [on the fly](/overview/usage) with [live reload](/extras/livereload) as you develop
+ * Complete theme support
+ * Host your site anywhere
+
+### Organization
+
+ * Straightforward [organization](/content/organization)
+ * Support for [website sections](/content/sections)
+ * Completely customizable [URLs](/extras/urls)
+ * Support for configurable [taxonomies](/indexes/overview) which includes categories and tags. Create your own custom organization of content
+ * Ability to [sort content](/content/ordering) as you desire
+ * Automatic [table of contents](/extras/toc) generation
+ * Dynamic menu creation
+ * [Pretty URLs](/extras/urls) support
+ * [Permalink](/extras/permalinks) pattern support
+ * [Aliases](/extras/aliases) (redirects)
+
+### Content
+
+ * Content written in [Markdown](/content/example)
+ * Support for TOML, YAML and JSON metadata in [frontmatter](/content/front-matter)
+ * Completely [customizable homepage](/layout/homepage)
+ * Support for multiple [content types](/content/types)
+ * Automatic and user defined [summaries](/content/summaries)
+ * [Shortcodes](/extras/shortcodes) to enable rich content inside of Markdown
+ * ["Minutes to Read"](/layout/variables) functionality
+ * ["Wordcount"](/layout/variables) functionality
+
+### Additional Features
+
+ * Integrated Disqus comment support
+ * Automatic [RSS](/layout/rss) creation
+ * Support for Go and [Amber](https://github.com/eknkc/amber) templates
+ * Syntax [highlighting](/extras/highlighting) powered by pygments
+
+See what's coming next in the [roadmap](/meta/roadmap).
+
+## Who should use Hugo?
+
+Hugo is for people that prefer writing in a text editor over
+a browser.
+
+Hugo is for people who want to hand code their own website without
+worrying about setting up complicated runtimes, dependencies and
+databases.
+
+Hugo is for people building a blog, company site, portfolio, tumblog,
+documentation, single page site or a site with thousands of
+pages.
+
+## Why did you write Hugo?
+
+I wrote Hugo ultimately for a few reasons. First, I was disappointed with
+WordPress, my then website solution. It rendered slowly. I couldn't create
+content as efficiently as I wanted to and needed to be online to write
+posts. The constant security updates and the horror stories of people's
+hacked blogs. I hated how content was written in HTML instead of the much
+simpler Markdown. Overall, I felt like it got in my way more than it helped
+me from writing great content.
+
+I looked at existing static site generators like Jekyll, Middleman and nanoc.
+All had complicated dependencies to install and took far longer to render
+my blog with hundreds of posts than I felt was acceptable. I wanted
+a framework to be able to get rapid feedback while making changes to the
+templates, and the 5+-minute render times was just too slow. In general,
+they were also very blog minded and didn't have the ability to have
+different content types and flexible URLs.
+
+I wanted to develop a fast and full-featured website framework without
+dependencies. The Go language seemed to have all of the features I needed
+in a language. I began developing Hugo in Go and fell in love with the
+language. I hope you will enjoy using (and contributing to) Hugo as much
+as I have writing it.
+
+## Next Steps
+
+ * [Install Hugo](/overview/installing)
+ * [Quick start](/overview/quickstart)
+ * [Join the Mailing List](/community/mailing-list)
+ * [Star us on GitHub](http://github.com/spf13/hugo)
+ * [Discussion Forum](http://discuss.gohugo.io)
+
diff --git a/content/overview/quickstart.md b/content/overview/quickstart.md
new file mode 100644
index 0000000..4f1ff24
--- /dev/null
+++ b/content/overview/quickstart.md
@@ -0,0 +1,159 @@
+---
+date: 2013-07-01
+linktitle: Quickstart
+menu:
+ main:
+ parent: getting started
+next: /overview/installing
+prev: /overview/introduction
+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
+proceeding._
+
+## Step 1. Install Hugo
+
+Go to [Hugo Releases](https://github.com/spf13/hugo/releases) and download the
+appropriate version for your os and architecture.
+
+Save it somewhere specific as we will be using it in the next step.
+
+More complete instructions are available at [Installing Hugo](/overview/installing/)
+
+## Step 2. Have Hugo Create a site for you
+
+Hugo has the ability to create a skeleton site.
+
+ hugo new site /path/to/site
+
+For the rest of the operations we will be executing all commands from within the site directory
+
+ cd /path/to/site
+
+The new site will have the following structure
+
+ ▸ archetypes/
+ ▸ content/
+ ▸ layouts/
+ ▸ static/
+ config.toml
+
+Currently the site doesn’t have any content, nor is it configured.
+
+## Step 3. Create Some Content
+
+Hugo also has the ability to create content for you.
+
+ hugo new about.md
+
+A new file is now created in `content/` with the following contents
+
+ +++
+ draft = true
+ title = "about"
+ date = 2014-05-20T10:04:31Z
+ +++
+
+Notice the date is automatically set to the moment you created the content.
+
+Place some content in this file below the `+++` in the Markdown format.
+
+For example you could put this
+
+ ## A headline
+
+ Some Content
+
+For fun, let’s create another piece of content and place some Markdown in it as well.
+
+ hugo new post/first.md
+
+The new file is located at `content/post/first.md`
+
+We still lack any templates to tell us how to display the content.
+
+## Step 4. Install some themes
+
+Hugo has rich theme support and a growing set of themes to choose from:
+
+ git clone --recursive https://github.com/spf13/hugoThemes themes
+
+## Step 5. Run Hugo
+
+Hugo contains its own high performance web server. Simply run `hugo
+server` and Hugo will find an available port and run a server with
+your content:
+
+ hugo server --theme=hyde --buildDrafts
+ 2 pages created
+ 0 tags created
+ 0 categories created
+ in 5 ms
+ Serving pages from exampleHugoSite/public
+ Web Server is available at http://localhost:1313
+ Press ctrl+c to stop
+
+We specified two options here:
+
+ * `--theme` to pick which theme;
+ * `--buildDrafts` because we want to display our content, both set to draft status.
+
+To learn about what other options hugo has, run:
+
+ hugo help
+
+To learn about the server options:
+
+ hugo help server
+
+## Step 6. Edit Content
+
+Not only can Hugo run a server, but it can also watch your files for
+changes and automatically rebuild your site. Hugo will then
+communicate with your browser and automatically reload any open page.
+This even works in mobile browsers.
+
+Stop the Hugo process by hitting ctrl+c. Then run the following:
+
+ hugo server --theme=hyde --buildDrafts --watch
+ 2 pages created
+ 0 tags created
+ 0 categories created
+ in 5 ms
+ Watching for changes in exampleHugoSite/content
+ Serving pages from exampleHugoSite/public
+ Web Server is available at http://localhost:1313
+ Press ctrl+c to stop
+
+Open your [favorite editor](http://vim.spf13.com), edit and save your content and watch as Hugo rebuilds and reloads automatically.
+
+It’s especially productive to leave a browser open on a second monitor
+and just glance at it whenever you save. You don’t even need to tab to
+your browser. Hugo is so fast that the new site will be there before
+you can look at the browser in most cases.
+
+Change and save this file. Notice what happened in your terminal.
+
+ Change detected, rebuilding site
+
+ 2 pages created
+ 0 tags created
+ 0 categories created
+ in 5 ms
+
+## Step 7. Have fun
+
+The best way to learn something is to play with it.
+
+Things to try:
+
+ * Add a [new content file](/content/organization/)
+ * Create a [new section](/content/sections/)
+ * Modify [a template](/layout/templates/)
+ * Create content with [TOML front matter](/content/front-matter/)
+ * Define your own field in [front matter](/content/front-matter/)
+ * Display that [field in the template](/layout/variables/)
+ * Create a [new content type](/content/types/)
diff --git a/content/overview/source-directory.md b/content/overview/source-directory.md
new file mode 100644
index 0000000..0c3db7f
--- /dev/null
+++ b/content/overview/source-directory.md
@@ -0,0 +1,90 @@
+---
+aliases:
+- /doc/source-directory/
+date: 2013-07-01
+menu:
+ main:
+ parent: getting started
+next: /content/organization
+notoc: true
+prev: /overview/configuration
+title: Source Organization
+weight: 50
+---
+
+Hugo takes a single directory and uses it as the input for creating a complete
+website.
+
+
+The top level of a source directory will typically have the following elements:
+
+ ▸ archetypes/
+ ▸ content/
+ ▸ layouts/
+ ▸ static/
+ ▸ themes/
+ config.toml
+
+Learn more about the different directories and what their purpose is:
+
+* [config](/overview/configuration)
+* [archetypes](/content/archetypes)
+* [content](/content/organization)
+* [layouts](/layout/overview)
+* [static](/themes/creation#toc_4)
+* [themes](/themes/overview)
+
+
+## Example
+
+An example directory may look like:
+
+ .
+ ├── config.toml
+ ├── archetypes
+ | └── default.md
+ ├── content
+ | ├── post
+ | | ├── firstpost.md
+ | | └── secondpost.md
+ | └── quote
+ | | ├── first.md
+ | | └── second.md
+ ├── layouts
+ | ├── _default
+ | | ├── single.html
+ | | └── list.html
+ | ├── partials
+ | | ├── header.html
+ | | └── footer.html
+ | ├── taxonomies
+ | | ├── category.html
+ | | ├── post.html
+ | | ├── quote.html
+ | | └── tag.html
+ | ├── post
+ | | ├── li.html
+ | | ├── single.html
+ | | └── summary.html
+ | ├── quote
+ | | ├── li.html
+ | | ├── single.html
+ | | └── summary.html
+ | ├── shortcodes
+ | | ├── img.html
+ | | ├── vimeo.html
+ | | └── youtube.html
+ | ├── index.html
+ | └── sitemap.xml
+ ├── themes
+ | ├── hyde
+ | └── doc
+ └── static
+ ├── css
+ └── js
+
+This directory structure tells us a lot about this site:
+
+1. The website intends to have two different types of content: posts and quotes.
+2. It will also apply two different indexes to that content: categories and tags.
+3. It will be displaying content in 3 different views: a list, a summary and a full page view.
diff --git a/content/overview/usage.md b/content/overview/usage.md
new file mode 100644
index 0000000..664e23a
--- /dev/null
+++ b/content/overview/usage.md
@@ -0,0 +1,89 @@
+---
+aliases:
+- /doc/usage/
+date: 2013-07-01
+menu:
+ main:
+ parent: getting started
+next: /overview/configuration
+notoc: true
+prev: /overview/installing
+title: Using Hugo
+weight: 30
+---
+
+Make sure either hugo is in your path or provide a path to it.
+
+
+
+ $ hugo help
+ A Fast and Flexible Static Site Generator
+ built with love by spf13 and friends in Go.
+
+ Complete documentation is available at http://gohugo.io
+
+ Usage:
+ hugo [flags]
+ hugo [command]
+
+ Available Commands:
+ server Hugo runs its own webserver to render the files
+ version Print the version number of Hugo
+ check Check content in the source directory
+ benchmark Benchmark hugo by building a site a number of times
+ new [path] Create new content for your site
+ help [command] Help about any command
+
+ Available Flags:
+ -b, --baseUrl="": hostname (and path) to the root eg. http://spf13.com/
+ -D, --buildDrafts=false: build content marked as draft
+ -F, --buildFuture=false: build content with PublishDate in the future
+ --config="": config file (default is path/config.yaml|json|toml)
+ -d, --destination="": filesystem path to write files to
+ --disableRSS=false: Do not build RSS files
+ --disableSitemap=false: Do not build Sitemap file
+ --log=false: Enable Logging
+ --logFile="": Log File path (if set, logging enabled automatically)
+ -s, --source="": filesystem path to read files relative from
+ --stepAnalysis=false: display memory and timing of different steps of the program
+ -t, --theme="": theme to use (located in /themes/THEMENAME/)
+ --uglyUrls=false: if true, use /filename.html instead of /filename/
+ -v, --verbose=false: verbose output
+ --verboseLog=false: verbose logging
+ -w, --watch=false: watch filesystem for changes and recreate as needed
+
+ Use "hugo help [command]" for more information about that command.
+
+## Common Usage Example
+
+The most common use is probably to run hugo with your current
+directory being the input directory.
+
+ $ hugo
+ > X pages created
+ in 8 ms
+
+If you are working on things and want to see the changes
+immediately, tell Hugo to watch for changes.
+
+Hugo will watch the filesystem for changes, rebuild your site as soon as a file
+is saved.
+
+ $ hugo -s ~/mysite --watch
+ 28 pages created
+ in 18 ms
+ Watching for changes in /Users/spf13/Code/hugo/docs/content
+ Press ctrl+c to stop
+
+Hugo can even run a server and create your site at the same time! Hugo
+implements [live reload](/extras/livereload) technology to automatically reload any open pages in
+all browsers (including mobile).
+
+ $ hugo server -ws ~/mysite
+ Watching for changes in /Users/spf13/Code/hugo/docs/content
+ Web Server is available at http://localhost:1313
+ Press ctrl+c to stop
+ 28 pages created
+ 0 tags created
+ in 18 ms
+