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

Changed npm cmd for prereq #161

Merged
merged 4 commits into from Aug 7, 2019

Conversation

@VincentTam
Copy link
Contributor

commented Aug 3, 2019

Tested on my Xubuntu 18.04 laptop:

If the installation of these node packages are global (with the -g option), hugo server --themesDir=../.. will throw an error, saying that the autoprefixer can't be found. However, if this option is removed, the same hugo command will the site locally for preview.

@hanzei

This comment has been minimized.

Copy link
Collaborator

commented Aug 4, 2019

@VincentTam can you please elaborate a bit why this is needed? In general I prefer to install the dependencies globally, as they may be used in other (hugo) projcts.

@hanzei hanzei self-assigned this Aug 4, 2019

@hanzei hanzei added the in review label Aug 4, 2019

@hanzei hanzei removed their assignment Aug 4, 2019

@VincentTam

This comment has been minimized.

Copy link
Contributor Author

commented Aug 4, 2019

@VincentTam can you please elaborate a bit why this is needed? In general I prefer to install the dependencies globally, as they may be used in other (hugo) projcts.

@hanzei I've tested these procedures on both Xubuntu and Ubutnu 18.04 with NPM installed to reproduce the error.

  1. Clone to a new repo.
  2. Use npm list -g to verify if the packages are installed globally. (True in the screenshot below.)
  3. Change directory to exampleSite/.
  4. hugo serve -themesDir ../..
  5. See that the generated site has no CSS in local preview (default to port 1313).

test

@VincentTam

This comment has been minimized.

Copy link
Contributor Author

commented Aug 5, 2019

@hanzei I've overlooked the following paragraph in Hugo's docs for PostCSS

If you are using the Hugo Snap package, PostCSS and plugin(s) need to be installed locally within your Hugo site directory, e.g., npm install postcss-cli without the -g flag.

Since README recommends latest extended version of Hugo, one might want to the snap app version of Hugo to automatically get the lastest build without manual update. It is worth putting a notice for the convenience of snap users.

@hanzei
Copy link
Collaborator

left a comment

Thanks for digging into this! One last request

Show resolved Hide resolved README.md Outdated
@hanzei

hanzei approved these changes Aug 7, 2019

@hanzei hanzei self-assigned this Aug 7, 2019

@hanzei hanzei merged commit 73fb5b0 into victoriadrake:master Aug 7, 2019

3 of 6 checks passed

Header rules - hugo-introduction No header rules processed
Details
Pages changed - hugo-introduction All files already uploaded
Details
Redirect rules - hugo-introduction No redirect rules processed
Details
Mixed content - hugo-introduction No mixed content detected
Details
Travis CI - Pull Request Build Passed
Details
netlify/hugo-introduction/deploy-preview Deploy preview ready!
Details
@hanzei

This comment has been minimized.

Copy link
Collaborator

commented Aug 7, 2019

Thanks @VincentTam 👍

@VincentTam VincentTam deleted the VincentTam:patch-3 branch Aug 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.