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

Adds configuration for additional site css #695

Merged
merged 2 commits into from Aug 8, 2020

Conversation

lexicalunit
Copy link
Contributor

Having page.css is nice, but there's no way to add css for the entire site. You could just modify main.css with the changes you want, but that makes upgrading to the latest from upstream somewhat difficult as you have to deal with potentially complicated merge conflicts. Or you could add the additional css to each and every page, which is annoyingly tedious and human-error prone.

This PR adds a site level configuration for site-css that allows you to list additional css files that should be included for every page on the site.

@daattali
Copy link
Owner

daattali commented Aug 8, 2020

Thanks for the suggestion! It's a good idea, but if it's a site-wide configuration option, then it should really be in the config.yml in my opinion. If it's in the YAML front mattter, then every page has to define it separately. Am I correct or am I misunderstanding your intention?

@lexicalunit
Copy link
Contributor Author

I think we agree! That's why I used site.site-css as opposed to page.site-css. So that the configuration takes place in _config.yml instead of needing to be in the page front mater.

@daattali
Copy link
Owner

daattali commented Aug 8, 2020

In that case, the setting should be removed from the README (the readme section only describes settings that are used in the YAML since there is nowhere else they are documented), and added to the config file

@lexicalunit
Copy link
Contributor Author

Ah, noted! PR updated.

@daattali
Copy link
Owner

daattali commented Aug 8, 2020

I still don't see it in the config.yml file?

@lexicalunit
Copy link
Contributor Author

Oh, like add a placeholder there with documentation? Of course. I'll make that change for this PR and the other ones.

@daattali
Copy link
Owner

daattali commented Aug 8, 2020

Yes, exactly. Look at the config file, you'll see lots of options that are disabled either by being commented out or by having a blank value. And the documentation for them is just comments beside each option.

@daattali
Copy link
Owner

daattali commented Aug 8, 2020

Great, thank you!

@daattali daattali merged commit 741f737 into daattali:master Aug 8, 2020
@lexicalunit lexicalunit deleted the site-css branch August 8, 2020 03:08
@daattali
Copy link
Owner

I made a small change, I moved the site wide css files to be included before any page-specific files, so that css rule cascading works more intuitively

krisfail pushed a commit to krisfail/old-blog-archived that referenced this pull request Jun 27, 2021
jeffreysimpson pushed a commit to the-galah-survey/the-galah-survey.github.io that referenced this pull request Sep 25, 2021
GuillermoFidalgo pushed a commit to GuillermoFidalgo/OldSite-guillermofidalgo that referenced this pull request Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants