add custom.css template to make it easier for users to add their own CSS

This commit is contained in:
Dean Attali 2020-09-12 03:59:24 +00:00
parent 0222ebfad5
commit 03105db2f0
4 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,7 @@ One of the major changes in this version is that a lot of time was spent on reth
- Added `full-width` YAML option to allow having full-width pages - Added `full-width` YAML option to allow having full-width pages
- Added `feed_show_excerpt` config option to show/hide the post excerpts on the feed page - Added `feed_show_excerpt` config option to show/hide the post excerpts on the feed page
- Added `feed_show_tags` config option to show/hide the list of tags on post previews on the feed page - Added `feed_show_tags` config option to show/hide the list of tags on post previews on the feed page
- Added a blank template CSS file `assets/css/custom.css` that's automatically included in all pages that can be used to overwrite any default Beautiful Jekyll ruless
- When `nav-short` is turned on, the avatar will also be shorter - When `nav-short` is turned on, the avatar will also be shorter
- Fixed rendering issues with `nav-short` option that caused the body of the page to start too low - Fixed rendering issues with `nav-short` option that caused the body of the page to start too low
- Improved the `footer-extra` YAML option to support multiple files instead of only a single file - Improved the `footer-extra` YAML option to support multiple files instead of only a single file

View File

@ -253,6 +253,10 @@ Beautiful Jekyll is used by 50,000+ people with wildly varying degrees of web sk
You can set default values for YAML parameters in the config file. Open the `_config.yml` file, scroll down to the line `defaults:` and that's the section you can use. For more information, see the [official jekyll documentation about default values](https://jekyllrb.com/docs/configuration/front-matter-defaults/). You can set default values for YAML parameters in the config file. Open the `_config.yml` file, scroll down to the line `defaults:` and that's the section you can use. For more information, see the [official jekyll documentation about default values](https://jekyllrb.com/docs/configuration/front-matter-defaults/).
- ### How do I make small modifications to how my website looks?
If you want to make any visual changes that are not in `_config.yml`, you'll need to add your own CSS rules to the file `assets/css/custom.css` in order to overwrite the default Beautiful Jekyll style. If you don't know how to use CSS, I highly recommend spending 30 minutes to [learn the basics](https://www.w3schools.com/css/).
- ### How do I use a custom domain for my site? - ### How do I use a custom domain for my site?
GitHub lets you have your website for free using their `github.io` domain. If you want your own domain (such as `https://myname.com`), it's easy and will cost about $10-$15 per year. First you need to buy a domain name (I recommend [Namecheap](https://namecheap.pxf.io/daattali)) and then follow the [instructions GitHub provides](https://docs.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site). GitHub lets you have your website for free using their `github.io` domain. If you want your own domain (such as `https://myname.com`), it's easy and will cost about $10-$15 per year. First you need to buy a domain name (I recommend [Namecheap](https://namecheap.pxf.io/daattali)) and then follow the [instructions GitHub provides](https://docs.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site).

View File

@ -2,6 +2,7 @@
common-css: common-css:
- "/assets/css/bootstrap-social.css" - "/assets/css/bootstrap-social.css"
- "/assets/css/beautifuljekyll.css" - "/assets/css/beautifuljekyll.css"
- "/assets/css/custom.css"
common-ext-css: common-ext-css:
- href: "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" - href: "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
sri: "sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" sri: "sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"

1
assets/css/custom.css Normal file
View File

@ -0,0 +1 @@
/* Add your own CSS rules here to overwrite any Beautiful Jekyll defaults */