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

Something's not right #11

Closed
jaydreyer opened this issue Mar 2, 2017 · 5 comments
Closed

Something's not right #11

jaydreyer opened this issue Mar 2, 2017 · 5 comments

Comments

@jaydreyer
Copy link
Contributor

Hi! Thanks for buiding this.

I've got it installed, but I think I'm missing something, because running hugulp build doesn't seem to be minifying anything.

I'm using a theme. Is that an issue? is the assets folder supposed to be in the root of the website? So, /website/assets ? Am I supposed to move all of my images/js/css to these assets folders? If so, how does that work with the theme?

Anyway, it runs, but I'm doing something wrong. At least I think I am. The output I receive is:

[21:15:13] gulp-imagemin: Minified 0 images
[21:15:13] src: /Users/z035002/Documents/personal-git/myearworms dst: /Users/z035002/Documents/personal-git/myearworms/public
[21:15:13] hugo: 
Started building sites ...
Built site for language en:
0 draft content
0 future content
0 expired content
4 regular pages created
16 other pages created
0 non-page files copied
13 paginator pages created
9 tags created
3 categories created
total in 39 ms

[21:15:14] all files 555.46 kB

Thanks for your help. It's probably something dumb I've done.

@jaydreyer
Copy link
Contributor Author

Ahh. I think I got it. I copied everything that was generated into public to the corresponding subfolders of assets. When I ran the build command, it looks like it is minimizing, although I get a bunch of errors back during the process. Not sure if that's normal or not. It finishes and the local site seems to work fine.

@little-big-co
Copy link

You're right. Everything that hugulp should take care of needs to be placed in assets and the corresponding subfolders. It is always a good idea to put all theme relevant things into the theme subfolder and everything else in the assets folder. If it shows errors or warning, then something is wrong ;-) Ideally, it should work without any errors/warnings. I had a similar issue with lots of warnings, especially in the JS files. I hired a developer to fix these. Mostly, it just has been a warning due to missing semicolons due to the mix of JS and jQuery. I don't like errors and warnings, even if the result works. It makes it harder to see if a real problem hides between all whose warnings. So better get rid of them.

After all it should look like your first result posted above.

@jbrodriguez
Copy link
Owner

Hi @jaydreyer, I don't use themes so I've never really given too much thought to it.

In general, what you did should "work" as well as what @adcgn suggested.

I'll look into improving theme support.

@jaydreyer
Copy link
Contributor Author

Excellent. Thanks for your help.

@jbrodriguez
Copy link
Owner

I replicated what you did.

Installed a theme (Prologue), generated the site, copied public folders to assets, ran hugulp and saw the errors.

They're mostly due to the theme using an old version of jquery (1.11.3), when 3.x is already out.

The site generated by hugulp build does reference fingerprinted assets (except for the fonts), but in general you should receive the benefits.

This is still not optimal however, I'll give it some more thought.

jbrodriguez added a commit that referenced this issue Mar 18, 2017
Related to #11
jbrodriguez added a commit that referenced this issue Mar 18, 2017
jbrodriguez added a commit that referenced this issue Mar 18, 2017
Related to #11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants