A content file consists of [front matter] and markup. The markup is typically markdown, but Hugo also supports other [content formats]. Front matter can be TOML, YAML, or JSON.
You can create an archetype for one or more [content types]. For example, use one archetype for posts, and use the default archetype for everything else:
```text
archetypes/
├── default.md
└── posts.md
```
## Lookup order
Hugo looks for archetypes in the `archetypes` directory in the root of your project, falling back to the `archetypes` directory in themes or installed modules. An archetype for a specific content type takes precedence over the default archetype.
For example, with this command:
```text
hugo new content posts/my-first-post.md
```
The archetype lookup order is:
1. archetypes/posts.md
1. archetypes/default.md
1. themes/my-theme/archetypes/posts.md
1. themes/my-theme/archetypes/default.md
If none of these exists, Hugo uses a built-in default archetype.
## Functions and context
You can use any [template function] within an archetype. As shown above, the default archetype uses the [`replace`](/functions/replace/) function to replace hyphens with spaces when populating the title in front matter.
Archetypes receive the following objects and values in [context]:
As shown above, the default archetype passes `.File.ContentBaseName` as the argument to the `replace` function when populating the title in front matter.
For example, in a documentation site you might have a section (content type) for functions. Every page within this section should follow the same format: a brief description, the function signature, examples, and notes. We can pre-populate the page to remind content authors of the standard format.
Although you can include [template actions] within the content body, remember that Hugo evaluates these once---at the time of content creation. In most cases, place template actions in a [template] where Hugo evaluates the actions every time you [build](/getting-started/glossary/#build) the site.
## Leaf bundles
You can also create archetypes for [leaf bundles](/getting-started/glossary/#leaf-bundle).
For example, in a photography site you might have a section (content type) for galleries. Each gallery is leaf bundle with content and images.
Subdirectories within an archetype must contain at least one file. Without a file, Hugo will not create the subdirectory when you create new content. The name and size of the file are irrelevant. The example above includes a `.gitkeep` file, an empty file commonly used to preserve otherwise empty directories in a Git repository.