| 
									
										
										
										
											2013-07-06 19:36:30 -04:00
										 |  |  | --- | 
					
						
							| 
									
										
										
										
											2014-05-29 18:42:05 -04:00
										 |  |  | aliases: | 
					
						
							|  |  |  | - /doc/source-directory/ | 
					
						
							|  |  |  | date: 2013-07-01 | 
					
						
							| 
									
										
										
										
											2014-04-23 03:00:11 -04:00
										 |  |  | menu: | 
					
						
							|  |  |  |   main: | 
					
						
							| 
									
										
										
										
											2014-05-29 18:42:05 -04:00
										 |  |  |     parent: getting started | 
					
						
							|  |  |  | next: /content/organization | 
					
						
							|  |  |  | notoc: true | 
					
						
							|  |  |  | prev: /overview/configuration | 
					
						
							|  |  |  | title: Source Organization | 
					
						
							|  |  |  | weight: 50 | 
					
						
							| 
									
										
										
										
											2013-07-08 17:57:01 -04:00
										 |  |  | --- | 
					
						
							| 
									
										
										
										
											2013-07-04 11:32:55 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-27 18:32:57 -04:00
										 |  |  | Hugo takes a single directory and uses it as the input for creating a complete | 
					
						
							|  |  |  | website. | 
					
						
							| 
									
										
										
										
											2013-07-04 11:32:55 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-27 18:32:57 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | The top level of a source directory will typically have the following elements: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     ▸ archetypes/ | 
					
						
							|  |  |  |     ▸ content/ | 
					
						
							| 
									
										
										
										
											2015-02-09 16:52:52 +01:00
										 |  |  |     ▸ data/ | 
					
						
							| 
									
										
										
										
											2014-05-27 18:32:57 -04:00
										 |  |  |     ▸ layouts/ | 
					
						
							|  |  |  |     ▸ static/ | 
					
						
							|  |  |  |     ▸ themes/ | 
					
						
							|  |  |  |       config.toml | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-09-02 22:12:26 -06:00
										 |  |  | Learn more about the different directories and what their purpose is: | 
					
						
							| 
									
										
										
										
											2014-05-27 18:32:57 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-27 19:17:09 -07:00
										 |  |  | * [config](/overview/configuration/) | 
					
						
							| 
									
										
										
										
											2015-02-09 16:52:52 +01:00
										 |  |  | * [data](/extras/datafiles/) | 
					
						
							| 
									
										
										
										
											2015-01-27 19:17:09 -07:00
										 |  |  | * [archetypes](/content/archetypes/) | 
					
						
							|  |  |  | * [content](/content/organization/) | 
					
						
							|  |  |  | * [layouts](/layout/overview/) | 
					
						
							| 
									
										
										
										
											2014-08-20 05:51:45 -07:00
										 |  |  | * [static](/themes/creation#toc_4) | 
					
						
							| 
									
										
										
										
											2015-01-27 19:17:09 -07:00
										 |  |  | * [themes](/themes/overview/) | 
					
						
							| 
									
										
										
										
											2014-05-27 18:32:57 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ## Example
 | 
					
						
							| 
									
										
										
										
											2013-07-04 11:32:55 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | An example directory may look like: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     . | 
					
						
							| 
									
										
										
										
											2014-05-27 18:32:57 -04:00
										 |  |  |     ├── config.toml | 
					
						
							|  |  |  |     ├── archetypes | 
					
						
							|  |  |  |     |   └── default.md | 
					
						
							| 
									
										
										
										
											2013-07-04 11:32:55 -04:00
										 |  |  |     ├── content | 
					
						
							|  |  |  |     |   ├── post | 
					
						
							|  |  |  |     |   |   ├── firstpost.md | 
					
						
							|  |  |  |     |   |   └── secondpost.md | 
					
						
							|  |  |  |     |   └── quote | 
					
						
							|  |  |  |     |   |   ├── first.md | 
					
						
							|  |  |  |     |   |   └── second.md | 
					
						
							| 
									
										
										
										
											2015-02-09 16:52:52 +01:00
										 |  |  |     ├── data | 
					
						
							| 
									
										
										
										
											2013-07-04 11:32:55 -04:00
										 |  |  |     ├── layouts | 
					
						
							| 
									
										
										
										
											2014-05-27 18:32:57 -04:00
										 |  |  |     |   ├── _default | 
					
						
							|  |  |  |     |   |   ├── single.html | 
					
						
							|  |  |  |     |   |   └── list.html | 
					
						
							|  |  |  |     |   ├── partials | 
					
						
							| 
									
										
										
										
											2013-07-04 11:32:55 -04:00
										 |  |  |     |   |   ├── header.html | 
					
						
							|  |  |  |     |   |   └── footer.html | 
					
						
							| 
									
										
										
										
											2014-05-27 18:32:57 -04:00
										 |  |  |     |   ├── taxonomies | 
					
						
							| 
									
										
										
										
											2013-07-04 11:32:55 -04:00
										 |  |  |     |   |   ├── 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 | 
					
						
							| 
									
										
										
										
											2014-05-07 08:58:25 +02:00
										 |  |  |     |   └── sitemap.xml | 
					
						
							| 
									
										
										
										
											2014-05-27 18:32:57 -04:00
										 |  |  |     ├── themes | 
					
						
							|  |  |  |     |   ├── hyde | 
					
						
							|  |  |  |     |   └── doc | 
					
						
							| 
									
										
										
										
											2013-08-03 03:30:34 -04:00
										 |  |  |     └── static | 
					
						
							| 
									
										
										
										
											2014-05-27 18:32:57 -04:00
										 |  |  |         ├── css | 
					
						
							|  |  |  |         └── js | 
					
						
							| 
									
										
										
										
											2013-07-04 11:32:55 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | This directory structure tells us a lot about this site: | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-01-29 12:34:56 -07:00
										 |  |  | 1. The website intends to have two different types of content: *posts* and *quotes*. | 
					
						
							|  |  |  | 2. It will also apply two different taxonomies to that content: *categories* and *tags*. | 
					
						
							| 
									
										
										
										
											2014-09-02 22:12:26 -06:00
										 |  |  | 3. It will be displaying content in 3 different views: a list, a summary and a full page view. |