How to add a custom css and js file with the new theme (hugo modules) #832
-
Hi,
However, with the new version of toha theme (currently trying commit: 2c32a26d220702b31dd52631bbfa8e9ab961ac19), if I include those lines I get an error like the following
So, how can I include a custom css/js files with this new version, thanks P.S. On a related matter, I noticed that with the new version there is no |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I had the same issue with custom CSS since migrating to V4. Unfortunately this has not been documented yet, but you can take a look at the toha repo to see how it works. Essentially you need to create an
Hope this solves at least part of your problem. For me the old custom CSS did not produce any errors but had no effect either (because it was in the |
Beta Was this translation helpful? Give feedback.
-
Thank you @cosmin-aron. I will write a doc for it soon. I am tracking the progress in this issue: #846 |
Beta Was this translation helpful? Give feedback.
-
Hi! I wonder how can one customize/add more layouts with the new approach? This (I assume outdated) guide suggested modifying the files from the I wonder if the following approach would be reasonable. From the docs it is stated:
Shoud we fork the Congratulations on the project! |
Beta Was this translation helpful? Give feedback.
I had the same issue with custom CSS since migrating to V4. Unfortunately this has not been documented yet, but you can take a look at the toha repo to see how it works. Essentially you need to create an
override.scss
file in yourassets
folder like this:Hope this solves at least part of your problem. For me the old custom CSS did not produce any errors but had no effect either (because it was in the
static
folder). So I think in your case the custom js causes the errors.