Open studioraygun opened 3 years ago
those are all added by plugins. Most of those plugins have options to disable built-in CSS.
Hey @studioraygun --
Following up on @rhukster's response, here's one way you might achieve this from the command line.
From the root of your Grav installation:
First, find the files you mentioned, do some crude awk
ing to find the corresponding yaml
configuration files for each of those plugins, and copy them to the ./user/config
folder so your overrides persist across plugin updates.
find ./user/plugins/ -type f | \
grep -P '(login|form-styles|notices)\.css$' | \
awk -F/ '{print $1"/"$2"/"$3"/"$4"/"$4".yaml"}' | \
xargs cp -t ./user/config/
Then flick the default true
values over to false for the built_in_css
key in each of those newly copied files.
find ./user/config/ -type f | \
grep -P '(login|form|markdown-notices)\.yaml$' | \
xargs sed -E -i 's/(built_in_css: )true/\1false/g'
Alternatively, if you have yq installed, you could replace the last line with xargs -L1 yq e -i '.built_in_css = false'
Hope this helps. Cheers, .ig
I have a bare bones theme setup and am pulling in some CSS using:
On inspecting the page I can see that my CSS is pulled in but so is notices.css, login.css and form-styles.css
I'm not sure at this stage if I need this, so want to remove them. I found out how to do this here: https://discourse.getgrav.org/t/admin-plugin-assets-being-used-on-the-site/10043 but that is via the admin panel. Seems a bit odd that I can't do this in code, perhaps in the YAML file? Is that possible?
Thanks