2013-07-06 19:36:30 -04:00
|
|
|
---
|
|
|
|
title: "Source Directory Organization"
|
2013-08-17 08:34:25 -04:00
|
|
|
date: "2013-07-01"
|
|
|
|
aliases: ["/doc/source-directory/"]
|
2013-10-25 18:42:46 -04:00
|
|
|
groups: ['gettingStarted']
|
2013-10-26 02:18:14 -04:00
|
|
|
groups_weight: 50
|
2014-01-28 23:29:05 -05:00
|
|
|
notoc: true
|
2013-07-08 17:57:01 -04:00
|
|
|
---
|
2013-07-04 11:32:55 -04:00
|
|
|
|
|
|
|
Hugo takes a single directory and uses it as the input for creating a complete website.
|
|
|
|
|
|
|
|
Hugo has a very small amount of configuration, while remaining highly customizable.
|
|
|
|
It accomplishes by assuming that you will only provide templates with the intent of
|
|
|
|
using them.
|
|
|
|
|
|
|
|
An example directory may look like:
|
|
|
|
|
|
|
|
.
|
2013-08-03 03:30:34 -04:00
|
|
|
├── config.yaml
|
2013-07-04 11:32:55 -04:00
|
|
|
├── content
|
|
|
|
| ├── post
|
|
|
|
| | ├── firstpost.md
|
|
|
|
| | └── secondpost.md
|
|
|
|
| └── quote
|
|
|
|
| | ├── first.md
|
|
|
|
| | └── second.md
|
|
|
|
├── layouts
|
|
|
|
| ├── chrome
|
|
|
|
| | ├── header.html
|
|
|
|
| | └── footer.html
|
|
|
|
| ├── indexes
|
|
|
|
| | ├── 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
|
|
|
|
| └── rss.xml
|
2013-08-03 03:30:34 -04:00
|
|
|
└── static
|
2013-07-04 11:32:55 -04:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2013-07-04 13:03:16 -04:00
|
|
|
Included with the repository is this example site ready to be rendered.
|