stip-hugo icon indicating copy to clipboard operation
stip-hugo copied to clipboard

Customizing themes css

Open kofemann opened this issue 4 years ago • 1 comments

Nice theme!

I have a questions: how to change portrait-container border and margin (I prefer 50vw). In more general, how to customize css without touching original files from the theme.

kofemann avatar Aug 21 '20 18:08 kofemann

Hi @kofemann

Thank you for your kind comment! At the moment, it's not possible to add your own stylesheet. I know several themes that offer configuration options to add additional stylesheets; I will look into this.

In the meantime, Hugo allows for overriding files from the theme. For example, to override <yoursite>/themes/tale/assets/scss/stip/_base.scss, create a file /assets/scss/stip/_base.scss and Hugo will use that file instead of the one provided by the theme. Make sure to copy the original styles over to your customized file and then alter them, as overriding is based on entire files only.

You can also override layout/partials/head.html and add your own CSS file there.

In both cases you do need to copy the original files from the theme to your site which is not ideal. I will leave this issue open to remind me to add support for custom stylesheets to the theme.

EmielH avatar Aug 25 '20 19:08 EmielH