Giter Site home page Giter Site logo

Comments (3)

luizdepra avatar luizdepra commented on June 10, 2024 1

Hmm.
Well, maybe we don't even need to commit the files that generate conflicts. So, we should test this hypothesis first.

from hugo-coder.

simonhollingshead avatar simonhollingshead commented on June 10, 2024

maybe we don't even need to commit the files that generate conflicts

If you're talking about the files in /resources, then if you don't commit them, everyone has to compile the SCSS to use the theme and therefore everyone needs hugo-extended, whereas providing /resources means that people can use either hugo or hugo-extended. The BSD variants and Solaris don't support hugo-extended, but linux, windows and mac do.

If you didn't mind the fact that you'd end up having two successive commits every time you merge an SCSS change, it would be absolutely trivial to have a GitHub Action commit the replacement resources folder on any new commit on main (and also possibly on a daily/weekly schedule to (a) validate that there has been no concurrency issue previously and (b) to automatically rebuild with the latest version of hugo in case it generates a slightly different result).

from hugo-coder.

simonhollingshead avatar simonhollingshead commented on June 10, 2024

Primarily as a proof of concept, I've written a github action for my fork for use on my 'patched' branch which, on a new commit or once per day 'corrects' the resources directory if any delta exists (or silently does nothing otherwise). I'm glad I've done so as it saves me merge conflicts for my own patches, I now no longer need to regenerate the resources as the action will do it for me.

https://github.com/simonhollingshead/hugo-coder/blob/patched/.github/workflows/regen-resources.yml

https://github.com/simonhollingshead/hugo-coder/actions/runs/7635526340/job/20801101769

simonhollingshead@9034a3e

The runner completes in around 20 seconds, where 10 of them are spent waiting for the runner to be started in the first place.

If you want a similar thing contributed back, let me know.

from hugo-coder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.