Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Create instructions for running hugo and npm watch at the same time for dev #215

Open
autumnfound opened this issue Apr 5, 2021 · 5 comments

Comments

@autumnfound
Copy link
Contributor

We should document dev process to have watch running with hugo in a way that doesn't crash Hugo. We've had this in the past but it was never documented.

@autumnfound
Copy link
Contributor Author

@linkfang you were showing me how you had both running at the same time. Did you have to restart hugo on CSS changes, or when renaming files?

@linkfang
Copy link
Contributor

@autumnfound , no need to restart hugo on CSS changes.
But do need to do so when there is a CSS error, like lacking a semi-colon in CSS, etc. Almost all kinds of CSS error will need to restart hugo.

@autumnfound
Copy link
Contributor Author

@linkfang would you like to take a stab at the documentation for this? It's an easy enough task, and I know you use this sometimes when developing!

@linkfang
Copy link
Contributor

linkfang commented Jun 9, 2021

@linkfang would you like to take a stab at the documentation for this? It's an easy enough task, and I know you use this sometimes when developing!

I tested with hugo-solstice-theme project. It seems that we don't need npm watch in this project, as it only uses CSS and can detect the CSS changes and then rebuilt the site.

I think npm watch is only needed for the projects that are using .less files. So, should I update the readme file for all those projects?

@autumnfound
Copy link
Contributor Author

Nope! That doesn't belong there really. We could put it there, but I'd recommend adding it here as a central place for recommendations when developing. This is more of a "how do we develop with this theme" then how do we use it on a particular site. Does that make sense?

Also, DRY. Dont Repeat Yourself ;) It makes updating docs much harder

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants