Hello everyone, I’ve been working on my site and I’ve been having some issues with the local server. Most of the time, i can make changes and iterations and the site will auto-update just fine, in both Firefox (my primary dev browser) and Safari (my primary personal browser).
my Hugo Version
hugo v0.135.0+extended darwin/arm64 BuildDate=2024-09-27T13:17:08Z VendorInfo=brew
My main issue that I would love to address is related to my stylesheet. I have style.css in my theme folder, cbtheme2/static/styles/style.css
When I make a change to the style sheet, it will auto refresh, but if I change pages or make another update, it will revert the changes to when I first opened the stylesheet for editing. I then have to either:
kill the server, start the server and manually refresh the page for changes to populate
or
Make a small change to the css file such as changing a value (5px to 15px), save ,then change back (15px to 5px). Then manually refresh.
Its been very frustrating, its adding a lot of steps and time to the development process. I’ve done a few searches on this and haven’t found any solutions.
Another issue, which may be related; I was editing a shortcode that stored in /layouts/shortcodes/. When an update / edit is saved, i will have to kill and restart the server for the changes to populate. I have sinced moved the shortcode into my theme’s shortcode folder and it works as expected.
Any ideas? I appreciate the help! Let me know if there is anything I can provide that could help troubleshoot this, that is if I’m not missing something simple.
I cannot reproduce the problem as described with v0.135.0-f30603c47f5205e30ef83c70419f57d7eb7175ab+extended linux/amd64.
Here’s the test site:
git clone --single-branch -b hugo-forum-topic-51802 https://github.com/jmooring/hugo-testing hugo-forum-topic-51802
cd hugo-forum-topic-51802
hugo server
Hmm. That’s so weird. I had wondered if it had anything to do with the shortcode I was writing so I stripped it of all hugo code and put text in as placeholders and its still behaving the same way.
What could I do to help aid in troubleshooting this? It really does make development a pain.
Thanks - i’ve uploaded my code to github after some lenghty updates and changes. It still does not auto-refresh with any kind of certain frequency, but i fear that i’m so far away from that original problem that I’m not even sure what I’m troubleshooting anymore.
The structure of your Git repository is unexpected. It looks like you’re uploading files instead of creating a local repository then pushing to GitHub. It would be in your long term interest to learn how to use Git.
Regardless, I am unable to reproduce the problems you describe when I test with the files in your repository.