Skip to content

Dealing with resources/_gen/assets #35

@mathieucaroff

Description

@mathieucaroff

Is this a BUG REPORT or FEATURE REQUEST?:
bug

Issue description

The syna-start repository contains generated files, in ressources/_gen/assets/. These files appear to be needed for the build to work. However, Hugo sometimes write to these files. This has at least one of the following consequences:

  • (C1) (If the Syna users decides not to add the resources/_gen/assets/* files to their commits) Merging changes made in simultaneously on the repository always require manual arbitration to pick one of the two versions of the file, hoping that Hugo and Syna will run fine with it.
  • (C2) (If the Syna users leaves the resources/_gen/assets/* files out of their commits) The user has to deal with this files reported as modified by git, even though they should not be committed. They may sometimes need to reset the files using a command like git checkout HEAD -- resources/_gen/assets, to be able to run the git commands which require a clean repository.

Solution proposal

I see two options to deal with the files at resources/_gen/assets/*:

  • (A) Syna's documentation warns about these files, and provide the git command to use to have git ignore changes these files, even if they are still part of git source control.
  • (B) These files are made part of syna, instead of syna-starter, and /ressources/_gen is added to syna-starter's .gitignore. There are various ways the files may be brought back into the build lifecycle, one of them being to be copied to resources/_gen/assets at the beginning of the hugo build.

Note: I'm new to Hugo, and Syna is the first and only theme I've looked at so far. I'm reporting this bug in Syna's bug tracker, but it may belong to the Hugo bug tracker, in case this issue is not specific to Syna.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions