Skip to content
The Grav Archive Plus plugin is an enhanced version of the Grav Archives plugin wih more configuration options and the ability to show a blogger like hierarchical archive menu for links grouped by month and/or year.
Branch: develop
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
blueprints
classes
docs
templates
.gitignore
CHANGELOG.md
LICENSE
README.md
archive_plus.php
archive_plus.yaml
blueprints.yaml
hebe.json
languages.yaml

README.md

Grav Archive Plus Plugin

Release Issues Dual license Flattr PayPal

Archive Plus is an enhanced version of the Grav Archives plugin with more configuration options and the ability to show a blogger like hierarchical archive menu for links grouped by month and/or year.

Table of Contents:

About

Archive Plus shares many features with the Grav Archives plugin, e.g. it automatically appends a "year/month" taxonomy to all pages and provides a plugins/archiv_plus/archive_plus.html.twig template, which you can include in a blog sidebar to render links into a year/month/post format useful for blogs, but enhances them in an intuitive way.

Currently it

  • adds a blogger like hierarchical (year/month/post) archive menu
  • has (full) multi-language support (requires Grav 0.9.33+)
  • integrates in Admin panel
  • provides a custom archive page (under development)
  • and a per site configuration

See how the Archive Plus will look like on your site:

Screenshot Archive Plus

Installation and Updates

Installing or updating the Archive Plus plugin can be done in one of two ways. Using the GPM (Grav Package Manager) installation update method (i.e. bin/gpm install archive_plus) or manual install by downloading this plugin and extracting all plugin files to

user/plugins/archive_plus

For more informations, please check the Installation and update guide.

Usage

The Archive Plus plugin comes with some sensible default configuration, that are pretty self explanatory:

Config Defaults

# Global plugin configurations

enabled: true                 # Set to false to disable this plugin completely
built_in_css: true            # Use built-in CSS of the plugin

# Global and page specific configurations

show:
  counter: true               # Toggle to show number of items before the link
  year: true                  # Toggle to show year
  month: true                 # Toggle to show month
  items: true                 # Toggle to show items

limit:
  year: 2                     # Limit to show only the last n years
  month: 12                   # Limit to show only the last n months
  items: 40                   # Limit to show only the last n items

order:
  by: date                    # Ordering of items
  dir: desc                   # Ordering of items (asc or desc)

filter_combinator: and        # The filter combinator to use to combine several filters
filters:                      # Filter to select which items should be shown
  category: blog

If you need to change any value, then the best process is to copy the archive_plus.yaml file into your users/config/plugins/ folder (create it if it doesn't exist), and then modify there. This will override the default settings.

Template Override

Something you might want to do is to override the look and feel of the archives, and with Grav it is super easy.

Copy the template file templates/plugins/archiv_plus/archive_plus.html.twig into the templates/partials folder of your custom theme, and that is it.

user/themes/custom-theme/templates/plugins/archiv_plus/archive_plus.html.twig

You can now edit the override and tweak it however you prefer.

Note: Don't touch or edit the template file templates/plugins/archiv_plus/archives.html.twig in the templates/partials folder! This file serves as a compatibility fallback for those themes which expect the Archives plugin to be installed.

Contributing

You can contribute at any time! Before opening any issue, please search for existing issues and review the guidelines for contributing.

After that please note:

  • If you find a bug or would like to make a feature request or suggest an improvement, please open a new issue. If you have any interesting ideas for additions to the syntax please do suggest them as well!
  • Feature requests are more likely to get attention if you include a clearly described use case.
  • If you wish to submit a pull request, please make again sure that your request match the guidelines for contributing and that you keep track of adding unit tests for any new or changed functionality.

Support and donations

If you like my project, feel free to support me via Flattr or by sending me some bitcoins to 1HQdy5aBzNKNvqspiLvcmzigCq7doGfLM4.

Thanks!

License

Copyright (c) 2015-2017 Benjamin Regler. See also the list of contributors who participated in this project. A lot of credits also goes to Andy Miller who wrote the Archives plugin this project is based on.

Dual-licensed for use under the terms of the MIT or GPLv3 licenses.

GNU license - Some rights reserved

You can’t perform that action at this time.