Conversation
|
Sounds like something that would be appropriate to use devcontainers (see the specifications). It can use a docker image directly too, so you’re not that way off also, using node 23 is kinda weird, node 24 is going to be the LTS at any point now. Otherwise node 22 is used in cases like this |
|
@echoix Finally got a chance to look at this again. I added a devcontainer and updated dependency management to use npm. Hugo takes a different approach to loading node_modules than I’m used to, so this is an “it works” version and not yet optimized. Ideally, this will make it easier to migrate to the latest Hugo, use Dart Sass, in addition to just normalizing the development and prod environments. |
echoix
left a comment
There was a problem hiding this comment.
Are the scss and html changes related to this PR?
|
Not anymore, I want this version to represent the current dependencies. I'll then open anther PR to update our Hugo version to the latest version, v0.154.5, add scss compilation. That PR will have breaking changes to some of the current styling so it will need some solid review, but will be worth the update. Speaking about dependencies. A lot of the current issues are from PR #560 partially updating bootstrap to v5.3 from v4.1 (4.1.3 is still loading). Let me know if you have any suggestions of additional CI tooling we should add to continue to improve the overall code quality of the site (superlinter, eslint, pre-commit, husky). Also, what are your thoughts about leaving the docker-compose.yml setup with NGINX (still need to finish configuring) for prod testing? |
|
I don't know where the nginx is mentioned, but looks fine. The version inconsistencies I was mentioning were between the devcontainer file and the other files that you use, that would be the current versions as you said. Note that I think the website is still built on the Debian server if I'm up to date (are we pushing the artifacts there now?), so we cannot update all the versions we want without planning. At least for devcontainer, renovate will help keeping them updated. https://docs.renovatebot.com/modules/manager/devcontainer/ The Docker compose: https://docs.renovatebot.com/modules/manager/docker-compose/ |
Wasn't thinking. I changed them locally but they are not committed.
Cool, I'll add these.
Yes. I believe that is right. That is why I want to setup docker-compose replicate that environment the best we can for testing the built artifacts. |
Correct
You mean tarballs and such?
What do you need to be updated on the server - can I help? |
|
@neteler Is the site currently being built by Hugo on the server? |
|
Do you want to switch to GitHub actions handling the build so the sever doesn't need to manage Hugo and the other dependencies? |
|
@echoix is renovate activated on this repo? |
Only 3 repos have it activated in the OSGeo org. Someone with enough rights need to enable it. I can only see, but not change any settings. So either @wenzeslaus or @neteler can do it. Maybe enable renovate and place the config file (you took the addons one I see) in that on-boarding PR). |
echoix
left a comment
There was a problem hiding this comment.
Why is the devcontainer PR still containing so much website/css/javascript/content changes?
I'm removing the static dependencies from |
|
npm ci means clean install. It flushes existing node_modules and only uses the package-lock.json. If you didn’t have the package-lock up to date, that’s why it might not have worked. It would usually be the recommended way, npm install would change to install different dependencies over time. If the setup doesn’t work with npm ci, it will become a problem sooner or later |
I've add Docker support for running the Hugo server, integrating SCSS for theming, and updating dependencies. Below is a breakdown of the most important changes:### Development Environment Updates:* AddedHUGO_VERSIONto the.envfile to specify the Hugo version used in Docker (0.139.4).* Updated Node.js version in.nvmrcfrom22.14.0tov23.3.0.* Added instructions inREADME.mdfor running Hugo locally with Docker, including commands for installing Node dependencies and launching the Hugo server.### Docker Integration:* Introduced adocker-compose.ymlfile to define a service for running the Hugo server with thehugomods/hugo:dart-sasscontainer, including volume mappings and port configuration.### Styling and Theming Enhancements:* Added a new SCSS file (themes/grass/assets/sass/main.scss)* Updatedthemes/grass/layouts/partials/head.htmlto use the SCSS file (main.scss) with Dart Sass for CSS preprocessing, replacing the previous static CSS file.### Dependency Management:* Added Bootstrap (^5.3.7) as a dependency inpackage.jsonto support modern styling and layout capabilities.