Skip to main content

Archive

Published:

Series: Documentation

  1. 1. Introduction
  2. 2. Getting Started
  3. 3. Color Schemes
  4. 4. Directory Structure and Assets
  5. 5. Feature Images
  6. 6. Favicon
  7. 7. Series
  8. 8. Archive
  9. 9. Search
  10. 10. Backlinks
  11. 11. Related Article
  12. 12. Rich Content
  13. 13. Markdown and Hugo
  14. 14. Customization
  15. 15. Reference - Configuration
  16. 16. Reference - Front matter
  17. 17. Reference - Icons

Yore provides a dedicated archive feature to aggregate all posts into a single chronological list.

Basic Setup

To enable the archive page, create an _index.md file in content/archive/. Note the file must be named _index.md, using index.md will prevent Hugo from treating it as a list page.

To exclude a page from the archive, add pageNoList to its front matter.

Note

pageNoList also excludes the article from search results but not from the sitemap.

Yore uses Hugo's built-in sitemap, you would need to customize it to exclude the page. See official documentation.

Options

  • Customizing the URL

    To modify the archive's access path, define the url parameter in the front matter of content/archive/_index.md:

    ---
    title: "Post Archive"
    url: "/all-posts"
    ---
  • Global List Scope

    You can transform any list page into an archive by utilizing the listScope parameter. Setting listScope to site instructs the template to fetch all regular pages from the entire site.

    ---
    title: "Full Site Archive"
    params:
      listScope: "site"
    ---
    Info

    Keys inside the params field are not Hugo config but theme config.

Series: Documentation

  1. 1. Introduction
  2. 2. Getting Started
  3. 3. Color Schemes
  4. 4. Directory Structure and Assets
  5. 5. Feature Images
  6. 6. Favicon
  7. 7. Series
  8. 8. Archive
  9. 9. Search
  10. 10. Backlinks
  11. 11. Related Article
  12. 12. Rich Content
  13. 13. Markdown and Hugo
  14. 14. Customization
  15. 15. Reference - Configuration
  16. 16. Reference - Front matter
  17. 17. Reference - Icons