github.com/shohhei1126/hugo@v0.42.2-0.20180623210752-3d5928889ad7/docs/content/en/getting-started/directory-structure.md (about)

     1  ---
     2  title: Directory Structure
     3  linktitle: Directory Structure
     4  description: Hugo's CLI scaffolds a project directory structure and then takes that single directory and uses it as the input to create a complete website.
     5  date: 2017-01-02
     6  publishdate: 2017-02-01
     7  lastmod: 2017-03-09
     8  categories: [getting started,fundamentals]
     9  keywords: [source, organization, directories]
    10  menu:
    11    docs:
    12      parent: "getting-started"
    13      weight: 50
    14  weight: 50
    15  sections_weight: 50
    16  draft: false
    17  aliases: [/overview/source-directory/]
    18  toc: true
    19  ---
    20  
    21  ## New Site Scaffolding
    22  
    23  {{< youtube sB0HLHjgQ7E >}}
    24  
    25  Running the `hugo new site` generator from the command line will create a directory structure with the following elements:
    26  
    27  ```
    28  .
    29  ├── archetypes
    30  ├── config.toml
    31  ├── content
    32  ├── data
    33  ├── layouts
    34  ├── static
    35  └── themes
    36  ```
    37  
    38  
    39  ## Directory Structure Explained
    40  
    41  The following is a high-level overview of each of the directories with links to each of their respective sections within the Hugo docs.
    42  
    43  [`archetypes`](/content-management/archetypes/)
    44  : You can create new content files in Hugo using the `hugo new` command.
    45  By default, Hugo will create new content files with at least `date`, `title` (inferred from the file name), and `draft = true`. This saves time and promotes consistency for sites using multiple content types. You can create your own [archetypes][] with custom preconfigured front matter fields as well.
    46  
    47  [`config.toml`](/getting-started/configuration/)
    48  : Every Hugo project should have a configuration file in TOML, YAML, or JSON format at the root. Many sites may need little to no configuration, but Hugo ships with a large number of [configuration directives][] for more granular directions on how you want Hugo to build your website.
    49  
    50  [`content`][]
    51  : All content for your website will live inside this directory. Each top-level folder in Hugo is considered a [content section][]. For example, if your site has three main sections---`blog`, `articles`, and `tutorials`---you will have three directories at `content/blog`, `content/articles`, and `content/tutorials`. Hugo uses sections to assign default [content types][].
    52  
    53  [`data`](/templates/data-templates/)
    54  : This directory is used to store configuration files that can be
    55  used by Hugo when generating your website. You can write these files in YAML, JSON, or TOML format. In addition to the files you add to this folder, you can also create [data templates][] that pull from dynamic content.
    56  
    57  [`layouts`][]
    58  : Stores templates in the form of `.html` files that specify how views of your content will be rendered into a static website. Templates include [list pages][lists], your [homepage][], [taxonomy templates][], [partials][], [single page templates][singles], and more.
    59  
    60  [`static`][]
    61  : Stores all the static content for your future website: images, CSS, JavaScript, etc. When Hugo builds your site, all assets inside your static directory are copied over as-is. A good example of using the `static` folder is for [verifying site ownership on Google Search Console][searchconsole], where you want Hugo to copy over a complete HTML file without modifying its content.
    62  
    63  {{% note %}}
    64  From **Hugo 0.31** you can have multiple static directories.
    65  {{% /note %}}
    66  
    67  {{% note %}}
    68  Hugo does not currently ship with an asset pipeline ([#3207](https://github.com/gohugoio/hugo/issues/3207)). You can solicit support from the community in the [Hugo forums](https://discourse.gohugo.io) or check out a few of the [Hugo starter kits](/tools/starter-kits/) for examples of how Hugo developers are managing static assets.
    69  {{% /note %}}
    70  
    71  
    72  [archetypes]: /content-management/archetypes/
    73  [configuration directives]: /getting-started/configuration/#all-variables-yaml
    74  [`content`]: /content-management/organization/
    75  [content section]: /content-management/sections/
    76  [content types]: /content-management/types/
    77  [data templates]: /templates/data-templates/
    78  [homepage]: /templates/homepage/
    79  [`layouts`]: /templates/
    80  [`static`]: /content-management/static-files/
    81  [lists]: /templates/list/
    82  [pagevars]: /variables/page/
    83  [partials]: /templates/partials/
    84  [searchconsole]: https://support.google.com/analytics/answer/1142414?hl=en
    85  [singles]: /templates/single-page-templates/
    86  [starters]: /tools/starter-kits/
    87  [taxonomies]: /content-management/taxonomies/
    88  [taxonomy templates]: /templates/taxonomy-templates/
    89  [types]: /content-management/types/