-
Notifications
You must be signed in to change notification settings - Fork 96
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
RFC: User-defined plugins #779
Comments
Can you develop what kind of plugins? On the language, I'd vote for Rhai, because Rust. And I have bad past experience with Lua (I don't know if it's still true, but the "if not marked as local, it's global) made me freak out a lot |
So far the only ones I've thought are are listed:
So say you want a custom shortcode plugin ( def plugins():
return {
"tag": {
"youtube": youtube_shortcode,
}
}
def youtube_shortcode(arguments):
args = {}
for name, value in arguments:
if name is None:
raise ValueError("Only named arguments are supported")
elif name in ["id"]:
args[name] = value
else:
raise ValueError("Unsupported argument: %s" % name)
... do formatting ...
return full_url |
I see :) (Even if for shortcodes, I have something in antimoine to load custom shortcode, so they're easier to write, but maybe plugins is a better way?) |
Shortcodes was a trivial example that can be solved in multiple ways. Other extensibilty ideas include filter-blocks and macros |
If plugins are supported, having the ability to write custom generators in Rust would be nice. I'd love to port https://github.com/avillafiorita/jekyll-datapage_gen/ and https://github.com/captn3m0/jekyll-sqlite/ for eg. |
We'd have a new folder
_plugins
full of FILLER that we load.Plugins include
Vec<(Option<KString>, Value)>
) until end of%}
. We then pass that to the plugin to deal withOpen questions
The text was updated successfully, but these errors were encountered: