Skip to content

This plugin enables you use different themes on one site individual set per page or collection.

License

Notifications You must be signed in to change notification settings

Sommerregen/grav-plugin-themer

Repository files navigation

Grav Themer Plugin

Release Issues Dual license Flattr PayPal

This plugin enables you use different themes on one site individual set per page or collection.

Table of Contents:

About

With Themer you will get the freedom to change the theme by setting the theme variable in the header of a page or collection:

theme: my-theme

Theme variables are being inherited from parent pages. Thus without any doing, pages from collections are automatically styled with the same theme. Further you have the possibility to reset the theme to the default value (defined in the system.yaml configuration) by finally using the command

theme: @default

Screenshot Themer Plugin

Installation and Updates

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

user/plugins/themer

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

Usage

The Themer 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

# Default options for Themer configuration

templates: ''               # Default theme templates to show in admin panel
                            # (leave empty to show all page templates)

If you need to change any value, then the best process is to copy the themer.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.

If you want to alter the settings for one or a few pages only, you can do so by adding page specific configurations into your page headers, e.g.

themer: false

to disable the Themer plugin just for this page,

theme: my-theme

to assign an individual theme to the page or collection or

theme: @default

to reset the theme variable and fall back to the default theme defined in the system.yaml configuration.

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, 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-2016 Benjamin Regler. See also the list of contributors who participated in this project.

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

GNU license - Some rights reserved

About

This plugin enables you use different themes on one site individual set per page or collection.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages