Coming from Wordpress, I’d like to have all my images on all pages behaving the same way by default. That same way is: unless specified differently, a newly inserted image with the img tag should be centered and open in a lightbox.
For the centered part, I managed to define it in /themes/quark/css/custom.css
For automatically having featherlight, I am blocked. I find no option in the plugin to automatically apply to all images. Is there no smarter way than editing each page and add ?lightbox after each image file name?
Thanks @pamtbaau !
That’s actually very similar to editing the functions.php theme page in Wordpress. I’ll have to refresh my regex matching knowledge
I thought there would be some solution native of Grav, e.g. with Twig/templating/shortcoding that is of a higher level than php. But the one you offered will work!
That’s actually very similar to editing the functions.php theme page in Wordpress.
Barely a week member of the Grav community and already insulting…
I thought there would be some solution native of Grav
I’m not aware of another solution, but I like coding, so I create my own…
This is the only solution I’m aware of that doesn’t need adding extra codes to the image definition (like shortcodes do) and which results are being cached and therefor doesn’t need run on every page request.
Ha, sorry is there some rivalry between Wordpress and Grav communities?
I’m trying Grav now as I find storing content and configurations in a DB overkill and impractical for some situations. I also think that sharing and adapting knowledge and components are foundational to science and progress and, when possible, very useful to keep moving technology fast. So, if it didn’t come across this way, I meant it in a positive way!