Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hugo Modules : Allow for replacements path within imports listing #11875

Open
HenrySkup opened this issue Jan 10, 2024 · 0 comments
Open

Hugo Modules : Allow for replacements path within imports listing #11875

HenrySkup opened this issue Jan 10, 2024 · 0 comments
Labels
Milestone

Comments

@HenrySkup
Copy link

Hi,

I think this might improve the maintenance of config files.

I have a hugo website pulling modules from several repos and which uses replacements to use local files which will be the most up-to-date and gets around issues when the internet is not accessible.

I think this would be similar to the intention of having the disable : true | false in the imports listings.

Currently

# config/*/module.yaml

replacements: 
  github.com/me/project-1 -> ../local/file/project-1, 
  github.com/me/project-2 -> ../local/file/project-2, 
  github.com/me/project-3 -> ../local/file/project-3, 
  github.com/me/project-4 -> ../local/file/project-4, 
imports :
  # other imports
  - # Project 1
    disable : false
    path : github.com/me/project-1
    # these imports can get quite complex with mounts 
  - # Project 2
    path : github.com/me/project-2
  - # Project 3
    path : github.com/me/project-3
  - # Project 4
    path : github.com/me/project-4

Suggestion

# config/*/module.yaml

imports :
  # other imports
  - # Project 1
    disable : false
    path : github.com/me/project-1
    replacement : ../local/file/project-1
    # these imports can get quite complex with mounts 
  - # Project 2
    path : github.com/me/project-2
    replacement : ../local/file/project-2
  - # Project 3
    path : github.com/me/project-3
    replacement : ../local/file/project-3
  - # Project 4
    path : github.com/me/project-4
    replacement : ../local/file/project-4
@bep bep added this to the v0.130.0 milestone Jul 22, 2024
@bep bep removed the NeedsTriage label Jul 22, 2024
@bep bep modified the milestones: v0.130.0, v0.131.0 Jul 30, 2024
@bep bep modified the milestones: v0.131.0, v0.133.0 Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants