gohugoio / hugoDocs

The source for https://gohugo.io/
Apache License 2.0
1.06k stars 1.49k forks source link

Include documentation for hugo-extended intallation on MacOS #1468

Closed dburov190 closed 1 year ago

dburov190 commented 3 years ago

There is currently no information on how to install extended hugo on MacOS: https://gohugo.io/getting-started/installing/#macos

I'm proposing to add a section for MacPorts with the following line:

sudo port install hugo +extended

Not sure how this is done with brew though.

hieu6 commented 3 years ago

I don't yet know how to contribute to docs, will leave this as a note for future me (or anyone else).

found this README.md about how to install extended version. found only after I downloaded extended version directly from Releases page 😅

edited for clarity.


Install Hugo (easiest)

Use the installation instructions in the Hugo documentation.

Build and install Hugo using Go

0. Prerequisite Tools

1. use Go to install the latest Hugo release

note: The below assumes macOS. If Windows, substitute $HOME with %USERPROFILE%.

Hugo builds using Go Modules. git clone the latest release of Hugo into a new folder, and install using Go.

mkdir $HOME/src  # create new directory
cd $HOME/src  # change directories
git clone https://github.com/gohugoio/hugo.git
cd hugo
go install

2. (Optional) Install the Extended version in order to use advanced features, such as Hugo Modules or Sass/SCSS

CGO_ENABLED=1 temporarily enables CGO to compile the extended Hugo install fr you.

CGO_ENABLED=1 go install --tags extended
thewheat commented 2 years ago

I think the brew installation includes is hugo-extended

$  hugo version
hugo v0.88.1+extended darwin/amd64 BuildDate=unknown

From the homebrew formula https://github.com/Homebrew/homebrew-core/blob/7305b83030f82a86a7b5c454b3e016dc3576e025/Formula/hugo.rb#L22

    system "go", "build", *std_go_args(ldflags: "-s -w"), "-tags", "extended"

And commit message confirming it is extended https://github.com/Homebrew/homebrew-core/commit/c49f3560dd1f31bdb2cebbe5b584d4a87f54a3e0

thewheat commented 2 years ago

I've made a PR https://github.com/gohugoio/hugoDocs/pull/1555 to clarify the brew install is the extended version and added the MacPorts install as well

I think the install instructions from source https://gohugo.io/getting-started/installing/#source covers what is mentioned in https://github.com/gohugoio/hugoDocs/issues/1468#issuecomment-912583871 already

ColinLondon commented 8 months ago

I'm an author, not a dev! Can someone please help? I can install Hugo with:

brew install hugo

But how do I use brew to install the Extended edition (I have the Lotus Docs theme that apparently requires it).

Thanks guys.