Skip to content

Remove /exampleSite/resources/_gen from the repository #867

Open
@fjtc

Description

Is this a BUG REPORT or FEATURE REQUEST?:

FEATURE REQUEST

What happened:

I think it would be a good idea to remove the directory /exampleSite/resources/_gen from the repository and add it to .gitignore as it is generated again whenever needed by Hugo. Furthermore, some posts, such as https://discourse.gohugo.io/t/the-best-gitignore-for-hugo/20283 suggest that this directory can be safely ignored for sites.

What you expected to happen:

The directory will no longer be in the repository, messing with its history. Since the files inside this directory are generated by Hugo from the source of the site, there is no point to keep them in the repository. Furthermore, since they are usually stored as binary files or single line text fields, any changes on those files means a complete replacement of their contents regardless of the size of the changes.

How to reproduce it (as minimally and precisely as possible):

Just change something in the theme's CSS and run the site. Some files inside /exampleSite/resources/_gen will eventually change. If you remove the directory before execute Hugo, it will be generated automatically by it based on the site's source thus there is no need to add it to the repository.

Anything else we need to know?:

It is a minor repository issue that can reduce the size of the repository in the long term. If you think it is a good idea, let me know and I'll send a pull request with this change.

Environment:

  • Syna Theme version: commit 36d3ec8
  • Hugo version: 0.80

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions