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

Custom Shortcodes removed with update #36

Closed
metadiv opened this issue Apr 25, 2017 · 3 comments
Closed

Custom Shortcodes removed with update #36

metadiv opened this issue Apr 25, 2017 · 3 comments

Comments

@metadiv
Copy link

metadiv commented Apr 25, 2017

I am running a site that uses the shortcodes plugin and I have created a few custom shortcodes in the /user/plugins/shortcode-core/shortcodes/ folder.

But every time I update the plugin they are removed. I have backups which I can replace the missing files with but is there a way to create a folder outside of the plugin directory (either in a user/theme/myCustomTheme/ or directly in the user/ folder) that can be read by the plugin but not updated (thus removing any custom contents)?

@rhukster
Copy link
Member

rhukster commented Apr 25, 2017

You cannot put custom code in an existing plugin. Any update will simply overwrite your edits/additions.

You could simply duplicate an existing simple shortcode plugin like Owl Carousel (https://github.com/getgrav/grav-plugin-shortcode-owl-carousel) and use that to house your custom plugins.

I'm going to look at adding this functionality to the core plugin.

@metadiv
Copy link
Author

metadiv commented Apr 25, 2017

Thanks for the reply. For the moment I can continue to manually re insert my shortcodes. But this is a company site that I might not always be in charge of and it would be nice to future proof it. if the shortcode-core could just look for a folder called /user/shotcodes/ that would be amazingly simple and robust in the spirit of Grav's file inheritance?

@rhukster
Copy link
Member

Ok, added for next release.

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

No branches or pull requests

2 participants