'hugo mod npm pack' breaks my customized 'package.json', do we need it? #747
Replies: 2 comments
-
I found more details in "Hugo in Actions" book by Atishay Jain. Plus, some more guessing and experimentation. I think I got it. If you want to add new dependency to Hugo module, add it to Hugo is modular system, and this is their way to generate cumulative Better to provide example: I need to use Algolia, and I added dependencies to
My website project depends on HBS theme:
I run command Documenting it here since it was really hard for me to find easy explanations of why we need this... thank you! |
Beta Was this translation helpful? Give feedback.
-
Yes, we need to execute those commands on upgrading the theme as mentioned at https://hbs.razonyang.com/v1/en/docs/getting-started/upgradation/.
That part is missing from the documentation, I'll update the docs later. EDITED: https://hbs.razonyang.com/v1/en/docs/getting-started/upgradation/#additional-dependencies |
Beta Was this translation helpful? Give feedback.
-
Hello @razonyang & Community,
I am trying to add new NPM modules to the project, but running
hugo mod npm pack
overridespackage.json
file and removes custom scripts.These commands are mentioned in Theme installation guide:
I tried to fork HBS theme and created branch to have some additional features. Do I need to run `hugo mod npm pack' in a theme? In a hugo project? Unfortunately I cannot find much information, and it seems better to avoid this command...
Could you please provide more details? Thanks,
Beta Was this translation helpful? Give feedback.
All reactions