Comments (11)
Wouldn't adding watch support to themes not just only mean to load the theme name inside serve.js and watch the theme directories? Would I have to reparse the config file inside serve.js or would it be better to create a global config object that can be used inside the tasks?
from hugulp.
I haven't figured out yet how to properly support themes, but currently the build command will process the theme's assets (with some duplication, but the premise of optimization is still kept).
Your use case is a bit different, since you're actually developing a theme.
Your approach sounds ok, but you should do that in serve.js, which is where the watch(es) are created.
Maybe have a flag (--devTheme ??) defined to run that code only if needed ?
Does it make sense ?
from hugulp.
well, theoretically, not that i think about it, we dont need to compile the html templates in the active theme do we since hugo will automatically handle that? Or am I wrong. The local layouts/templates are inherited from the theme and replaceable when you make one with the same name out of the theme. So are the assets the only thing we need to process anyways?
from hugulp.
I suppose, if you're developing a theme you can do so in the root templates/static dirs and them move those to the theme when they're done. I'm still sorta new to hugo.
/shrugs
from hugulp.
we dont need to compile the html templates in the active theme do we since hugo will automatically handle that?
That's right :)
Actually, even the assets will be processed when you do a build, what's missing right now is watching for changes in the theme folder (while developing).
I'll play a bit with a theme and see what I find out.
In the worst case, I'll grab your code and do something along the lines of what I mentioned before (the --devTheme flag, etc.)
from hugulp.
I haven't figured out yet how to properly support themes
@jbrodriguez want me to spike a PR in that direction?
from hugulp.
@jbrodriguez want me to spike a PR in that direction?
Sure, I'd like to see what's your take on the matter.
from hugulp.
Any progress on this?
I'd like to have adequate setup for Hugo while developing/tweaking Hugo theme/site when using some CSS framework (e.g Bulma, Foundation...)
Any hint for that?
from hugulp.
No progress so far, to be honest, as I'm tied up with other projects.
I remember I was thinking about adding another task that would process the theme folder as needed, but didn't go much further than that.
from hugulp.
I remember I was thinking about adding another task that would process the theme folder as needed, but didn't go much further than that.
Does it mean that at the moment it's recommended to simply create a (Hugo) theme using theme's toolchain if one e.g. uses some CSS framework and then after finishing the theme use Hugolp for smaller tweakings or is it that Hugolp is simply better to be used for general assets, iow. not suitable for working with themes?
from hugulp.
If you're using a theme for your site (not creating one), the theme assets should get processed by the hugulp pipeline.
from hugulp.
Related Issues (20)
- Add docker support HOT 1
- having problem with reference task HOT 1
- Stuck in infinite loop on Ubuntu HOT 4
- UnCSS support HOT 3
- Source Map HOT 2
- Unable to minify Javascript error HOT 1
- HTML minifying HOT 1
- .hugulprc HOT 2
- Update code and variables
- Put all hard coded files/directories into an array
- Support .sass files in addition to .scss
- hugulp next HOT 1
- why doesn't 'watch' include autoprefixer? HOT 5
- CSS and JS not minified HOT 7
- JavaScript Concatenation? HOT 4
- Allow json extension for config file
- Update to Gulp 4 HOT 1
- Support for standardjs or custom eslint-config
- hugulp reprocesses images already compressed or optimized by hugulp HOT 1
- No stylesheets generated? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugulp.