How to add an archive page on hosted Ghost blog

I am using the out-of-box Digest theme for my hosted Ghost (PRO) blog. The only page I got after setup was the ‘About’ page. Now I want to add an archive page, just like the demo site.

If I go to add a new page by going to Pages > New Page, it takes me to this empty page.

I have no idea what to add here, other than Archive for the title. How can I show the archive of my posts?

Is there a pre-built Archive page that I can use? Or, do I need to use some code to get the list of posts to display? Where can I find this information?

Any help is really appreciated.

Update: I was able to add an Archive link using the Settings > Navigation UI, but this link points to /pages/2 URL, which I found by clicking the Browse All Issues at the end of the home page.

Is it possible to customize link to something like: /archive instead of /pages/2?

On the about page on the Digest theme demo, it mentions:

When your publication has more than one issue, Digest generates an archive page of all the issues automatically. The featured issues are also highlighted on top of the list.

Have you got more than one issue on your site yet?

1 Like

Hi @Kym,

I can get the Archive page to point to /pages/2, showing the list of published posts as expected. But I was wondering if there’s a way to use a different URL than /pages/2, such as /archive.

Thanks,
Akshay

Hey @software_writer,

Digest uses home.hbs as a custom homepage to display the latest issue and uses index.hbs as an archive page which is then accessed on /page/2 as you’ve already figured out. The reason why we went with this method was providing an out-of-box archive page without any additional setup like custom routing.

If you prefer /archive as your archive page, you can accomplish this with a bit of customization in the routing and the theme code.

  1. Add a channel route in routing.yaml. Channel suits best in this situation, because it doesn’t modify the post permalinks.
routes:
  /archive/:
    controller: channel
  1. Modify partials/content.hbs to change the archive link by replacing /page/2 with /archive.
1 Like

Hey @minimaluminium,

Thanks for getting back with a detailed answer.

I am on a Ghost (PRO) plan, which hosts the software for me. So I am not entirely sure if I have access to the actual code to edit and make changes.

Is it possible for me to edit the above files you mention?

Thanks!

Look in the Ghost(Pro) admin area under “Settings”. If you have access to “routes.yaml”, it’s under “Labs”, and if you have access to download and under themes, that’s under “Design”. Let us know what you find.

2 Likes