I would like to override the behavior of the default (image: *) kirbytag. Since I have my site/plugins directory stored in .gitignore, is it possible to do this for a specific page without having to register a custom plugin like described in the docs (KirbyTags | Kirby CMS)?
(I could also just rewrite .gitignore to include site/plugins/my-plugin/index.html but figured another approach could be cleaner.)
I’m using an image lightbox plugin that requires some custom html tags that I would like to output in kirbytext. Tbh after searching the forum again I think I want to do exactly the same as this OP: Fancybox 3 in Kirby Text Field Hook?
So it looks like I have the choice between a hacky .gitignore file or using regex in a hook…
But with only these two “real” plugins, you might as well ignore them separately rather then the complete plugins folder? After all, it happens rather seldom that you don’t have any custom code in the plugins folder… (at least from my experience).
100% true. I initially thought of that but abandoned the thought because I might forget to add a future plugin to .gitignore after installing. But given the other options, this is definitely the easiest way :~)
edit: ok I see now that this has been talked about in the forum post I mentioned earlier. I’ll just read the docs again and will probably figure it out on my own
You can reuse parts as explained in the cookbook recipe, but in your case, it probably makes more sense to do a proper override… in any case, you can’t just call $file without defining that variable first!