Archives

Aoife can optionally automatically add archives for your content. To enable this functionality you must set the archives variable in the site config.json to true.

When archives are enabled, Aoife will create a top-level section in the built site at public/archive. A page will be created at the root of this section (archive/index.html) for you to style how you wish with the layouts/archive.html template file.

Additionally, sub-folders will be created beneath public/archive for each year and month that posts occur. For example, the following content:

content
- Post 1.md     // publish date: Oct 1st 2016
- Post 2.md     // publish date: Sep 10th 2016
- Post 3.md     // publish date: Jan 22nd 2016
- Post 4.md     // publish date: Mar 4th 2015
- Post 5.md     // publish date: Feb 8th 2015

Would result in an archive as follows:

http://example.com/archive/2016/index.html      // lists all 2016 posts
http://example.com/archive/2016/10/index.html   // lists October 2016 posts
http://example.com/archive/2016/9/index.html    // lists September 2016 posts
http://example.com/archive/2016/1/index.html    // lists January 2016 posts
http://example.com/archive/2015/index.html      // lists all 2015 posts
http://example.com/archive/2015/3/index.html    // lists March 2015 posts
http://example.com/archive/2015/2/index.html    // lists February 2015 posts

These listing pages are styled with the layouts/archives.html template file (note archives not archive).

See the Variables section for more information on archive-specific template tags.

It’s worth noting that generating archives is computationally expensive. If you don’t need them then set the archives variable in the site config.json file to false.

Modified: Dec 8, 2016 at 22:10:34

Aoife v0.9.0 documentation