Digital
DemoSupport
  • 👋Introduction
  • 🆕Changelog
  • 🏁GETTING STARTED
    • 🔽Uploading a Theme
  • 📜MAIN TEMPLATES
    • 📰Post Template
    • 📄Page Template
    • 📄Categories (Tags) Template
    • 🧑‍🎨Authors Template
    • ♾️Archive (All posts) Template
    • 🌟Project Template
    • 🌠Projects (All projects) Template
    • 📬Contact Page
  • ⚙️CUSTOM SETTINGS
    • ™️Logos
    • 🧭Header Type
    • 🎨Colors
    • 🧮Border Radius
    • 📢Subscribe CTA Text and Subtext
    • 🏠Homepage Layout
  • 🤝Membership
    • 🎬Setting Up
    • ⬇️Sign In Page
    • 🆙Sign Up Page
    • 🔀Subscribe Page
    • 👤Account Page
    • 💸Membership Page
  • 🛠️OTHER SETTINGS
    • ⏬Submenus
    • 📸Add Your Social Link (Icon)
    • 💬Comments
    • ⛔Disable animations
  • ☑️TERMS & CONDITIONS
    • 🔁Refund Policy
Powered by GitBook
On this page
  • To add Archive Page:
  • If you've previously modified your routes.yaml
  • If you have not previously modified your routes.yaml
  • Adding an Archive Page:
  1. MAIN TEMPLATES

Archive (All posts) Template

PreviousAuthors TemplateNextProject Template

Last updated 9 months ago

Digital has a template for the Archive (All posts) Page, which shows all of the posts of your publication. An archive page is not required, but you can add it if you want.

To add Archive Page:

To add an Archive Page to your publication, you'll need to modify your routes.yaml file due to the nature of Ghost's routing system.

If you've previously modified your routes.yaml

If you've previously modified your routes.yaml file for any reason, you only need to incorporate the following lines to add an Archive Page to your publication. This ensures you keep your custom configurations while enabling the archive functionality.

Here's a quick guide:

  1. Access your Ghost admin area, then navigate to Settings > Labs.

  2. Under the Labs section, find and click on the Download current routes button to upload your current routes.yaml file.

  3. Open your routes.yaml file in a text editor.

  4. Add the following lines to your routes.yaml file:

    routes: 
      /archive/:
        controller: channel
        template: archive
        data: page.archive
        filter: tag:-hash-project
    
    collections:
      /:
        permalink: /{slug}/
        template: index
        filter: tag:-hash-project
    
      /projects/:
        permalink: /projects/{slug}/
        template: projects
        filter: tag:hash-project
        data: page.projects
    
    taxonomies:
      tag: /tag/{slug}/
      author: /author/{slug}/
  5. Save your changes and re-upload the routes.yaml file through the same Labs section by clicking Upload routes file button.

If you have not previously modified your routes.yaml

Here's a quick guide:

  • Access your Ghost admin area, then navigate to Settings > Labs.

  • Under the Labs section, find and click on the Download current routes button for the routes.yaml file to make a backup.

  • Download this routes.yaml :

In case if you can't download our file, here is how your routes.yaml should look like:

routes: 
  /archive/:
    controller: channel
    template: archive
    data: page.archive
    filter: tag:-hash-project

collections:
  /:
    permalink: /{slug}/
    template: index
    filter: tag:-hash-project

  /projects/:
    permalink: /projects/{slug}/
    template: projects
    filter: tag:hash-project
    data: page.projects

taxonomies:
  tag: /tag/{slug}/
  author: /author/{slug}/
  • Upload new routes.yaml file through the same Labs section by clicking Upload routes file button.

Adding an Archive Page:

  1. In your Ghost admin area, go to Pages and click on the New Page button in the top right corner.

  2. Title your page. You can choose any title you like for the Archive Page.

  3. In the Page URL section, ensure the slug is set to archive. This links the page to the route you've set up in your routes.yaml file.

  4. Optionally, you can add an excerpt and feature an image to make the page more engaging.

  5. Once you're done, click on Publish to make your Archive Page live.

This page will now follow the Archive template and functionality as defined in your routes.yaml file.

After completing these steps, you need to .

This guide is intended for users who have not previously modified their routes.yaml file. If you have already made changes to your routes.yaml file, please check .

After completing these steps, you need to .

Click icon in the top right corner to open the Page settings

📜
♾️
add an Archive Page
this guide
add an Archive Page
396B
routes.yaml