Created
May 7, 2015 19:08
-
-
Save anthony-dandrea/a2f14947dc7a5f21921d to your computer and use it in GitHub Desktop.
Halp, pelican plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
For reference I'm trying to create a Pelican plugin | |
that will load templates from a python package before | |
loading the regular template path in the repo. | |
https://github.com/getpelican/pelican/blob/807b3bced38bff7b83a2efa2ce8cda9d644ebad3/pelican/generators.py#L61-L70 | |
http://docs.getpelican.com/en/3.5.0/plugins.html#list-of-signals | |
""" | |
class Generator(object): | |
"""Baseclass generator""" | |
def __init__(self, context, settings, path, theme, output_path, readers_cache_name='', **kwargs): | |
self.foo = 'bar' # I wanna change dis | |
class StaticGenerator(): | |
def __init__(self, *args, **kwargs): | |
super(StaticGenerator, self).__init__(*args, **kwargs) | |
# HERE I want to change foo to baz | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In
my_plugin.py
: