funkydan2 / alpha-church

Hugo theme for churches based on a html5up theme
https://alpha-church.netlify.app
Other
68 stars 59 forks source link

Custom CSS not applied #5

Closed jjnilton closed 6 years ago

jjnilton commented 6 years ago

Hello, I'm trying to apply custom CSS the way you mention in the instructions but it's not working. I've tried both using the static/css/my.css and themes/alpha-church/static/css/my.css.

$ tree static
static
└── css
    └── my.css
$ tree themes/alpha-church/static/
themes/alpha-church/static/
├── css
│   └── my.css

config.toml:

baseURL = "https://example.com/"
languageCode = "pt-br"
title = "Example"
theme = ['alpha-church']
themesDir = "themes"

enableEmoji = true
customCSS = ["my.css"]
funkydan2 commented 6 years ago

Thanks @jjnilton - I have to admit that I hadn't tested whether custom CSS works. But I've now fixed some problems. Please update your copy of the theme (if you're using submodules run git submodule update --rebase --remote).

Have a look at the latest version of config.toml for the exampleSite. You'll see that customCSS is now a variable under [params]

https://github.com/funkydan2/alpha-church/blob/f4a0edd58b871352883b72a5223216324bc3004c/exampleSite/config.toml#L70

The right place to put your custom CSS is under /static. If you want to use a subdirectory, such as /static/css then you'll need to define that in config.toml e.g. customCSS=["css/my.css"] (at least I think that will work.)

Let me know how you go.

jjnilton commented 6 years ago

It works now, thank you @funkydan2!

fabianying commented 5 years ago

@funkydan2 May I suggest to change the line 27 in SETUP.md from

The easiest way to change the look of your site is by overriding the included style sheet. You can do this by putting your css file in static/css/my.css and entering customCSS = ["my.css"] in the config file.

to

The easiest way to change the look of your site is by overriding the included style sheet. You can do this by putting your css file in static/css/my.css and entering customCSS = ["css/my.css"] in the config file.

or to

The easiest way to change the look of your site is by overriding the included style sheet. You can do this by putting your css file in static/my.css and entering customCSS = ["my.css"] in the config file.