Blog Templates

Each page within the blog app has its own template to display that page's content.

Where to save template files

Template files will go in a folder that has the same name as the app instance key. For example, if the blog app instance key is "blog" then you would put all of your template files within the blog folder inside the templates folder.

If your theme was called "Custom" then this would be an example folder structure:

  • themes
    • custom
      • theme.json
      • templates
        • home.twig
        • one-column.twig
        • two-column.twig
        • blog
          • archive.twig
          • author.twig
          • authors.twig
          • categories.twig
          • category.twig
          • home.twig
          • post.twig
          • posts.twig
          • search.twig
          • search-results.twig
          • tag.twig
          • tags.twig

Blog pages and their templates

Below is the list of blog app pages and the name of the template file that you should create.

App home

The app home page often shows the blog posts and/or categories.

Template name: home.twig

Archive

This page shows blog posts organized by year and/or month. It provides a chronological way to display posts. 

Template name: archive.twig

Author

This page shows an author from the Authors app along with any of their blog posts.

Template name: author.twig

Author list

This page shows the list of authors from the Authors app that are assigned to at least one blog post.

Template name: authors.twig

Categories list

This page shows the list of categories.

Template name: categories.twig

Category detail

This page shows the detail information for an individual category. The posts assigned to the category are often shown.

Template name: category.twig

Post detail

This page shows the full details for an individual blog post.

Template name: post.twig

Post list

This page shows a paginated list blog posts.

Template name: posts.twig

Search

The search page can be used to show the form to search for posts.

Template name: search.twig

Search results

The search results page can show the results of a blog app search. It can show a paginated list of matching posts.

Template name: search-results.twig

Tags list

This page shows the list of tags.

Template name: tags.twig

Tag detail

This page shows the detail information for an individual tag. The posts assigned to the tag are often shown.

Template name: tag.twig