Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config_role plugin #290

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

@stsewd
Copy link

@stsewd stsewd commented Nov 23, 2018

A lot of times I have to use the blog's email or other values that already are in the conf.py file. Those values can be used inside the templates but not in the rst files. This plugin allows to do that.

I'm not sure where to put the plugin (v7/v8?). I tested it with v7 only, but I guess it should just work with v8.

Originally I wrote this plugin in pythonecuador/pythonecuador.github.io#103

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Nov 23, 2018

This doesn’t seem to take care of dependencies. For config values outside of GLOBAL_CONTEXT, the post won’t auto-rebuild when that value changes.

@stsewd
Copy link
Author

@stsewd stsewd commented Nov 23, 2018

This doesn’t seem to take care of dependencies

Sorry, what dependencies do you mean?

For config values outside of GLOBAL_CONTEXT, the post won’t auto-rebuild when that value changes.

There is a way of doing that? Sorry, I'm not so familiar with the internals of nikola.

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Nov 23, 2018

This might work:

inliner.document.settings.record_dependencies.add('####MAGIC####CONFIG:' + text)

(Test it out.)

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Nov 28, 2018

Any progress on this?

@stsewd
Copy link
Author

@stsewd stsewd commented Nov 28, 2018

Sorry, I'll continue this weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants