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

How can I customize css ? #5

Closed
MarieMarieL opened this issue Feb 6, 2020 · 5 comments
Closed

How can I customize css ? #5

MarieMarieL opened this issue Feb 6, 2020 · 5 comments

Comments

@MarieMarieL
Copy link

I have tried to edit the SCSS file in the asset folder of my project, but when I rerun hugo server my changes are set back to the original. I thought we were just supposed to edit the file on the asset folder (and not directly from the theme).

Can anybody tell me where I'm going wrong?
Are we at least able to edit the CSS of this theme?

Thank you very much

@rootsongjc
Copy link

rootsongjc commented Feb 7, 2020

@MarieMarieL You can edit the configs in assets/scss folder. Especially the files with underline prefix.

@MarieMarieL
Copy link
Author

Thank you for your answer.
The problem is that when I edit this file (the one with the blue icon before), the changes I made are deleted when I launch Hugo server.
Code_Q4FLKbq3D8

In my head.html partial folder, the stylesheet is referred with {{ $styles.Permalink }}, does this mean that the theme will find by itself the SCSS file (in the assets folder)?

{{ "<!-- Main Stylesheet -->" | safeHTML }}
    {{ $styles := resources.Get "scss/style.scss" | toCSS }}
    <link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">

@rootsongjc
Copy link

rootsongjc commented Feb 7, 2020

@MarieMarieL You should edit these files in assets/scss folder.

_buttons.scss
_common.scss
_mixins.scss
_typography.scss
_variables.scss
style.scss
templates/_homepage.scss
templates/_navigation.scss
templates/_otherspage.scss
templates/_slider.scss

resources folder is temprory and built with hugo.

My own website is using this theme https://jimmysong.io , so I am very familiar with this theme.

@MarieMarieL
Copy link
Author

MarieMarieL commented Feb 7, 2020

Ok I see, thank you very much !
I don't have such files for the moment in my project, that's why I didn't understand.

And do you refer these files in the head.html partial folder? Simply like this?
<link rel="stylesheet" href="_test.scss" media="screen">

@rootsongjc
Copy link

No. No need to refer to these files. Just keep the file as its original state.

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

No branches or pull requests

2 participants