Skip to content

Instantly share code, notes, and snippets.

@fscm
Last active March 8, 2022 10:00
Show Gist options
  • Select an option

  • Save fscm/6875fe0e5dca25667e3ef3220c40e2a7 to your computer and use it in GitHub Desktop.

Select an option

Save fscm/6875fe0e5dca25667e3ef3220c40e2a7 to your computer and use it in GitHub Desktop.

Revisions

  1. fscm revised this gist Mar 8, 2022. 1 changed file with 23 additions and 7 deletions.
    30 changes: 23 additions & 7 deletions install_hugo.md
    Original file line number Diff line number Diff line change
    @@ -1,23 +1,39 @@
    # [macOS] Install hugo

    Instructions on how to install the `hugo` static site generator.
    Instructions on how to install the [`hugo`](https://gohugo.io/) static site generator.

    ## Install
    ## Install (normal version)

    `hugo` can be obtained [here](https://github.com/gohugoio/hugo/releases/).
    Copy the link for the version that you want to install from there.
    `hugo` can be obtained [here](https://github.com/gohugoio/hugo/releases/). Copy the link for the version that you want to install from there.

    Get the `hugo` archive and extract it with the following command:

    ```sh
    curl -sL --retry 3 "https://github.com/gohugoio/hugo/releases/download/v0.74.3/hugo_0.74.3_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
    curl --silent --location --retry 3 "https://github.com/gohugoio/hugo/releases/download/v0.93.2/hugo_0.93.2_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
    ```

    To install the latest version use the following commands instead:

    ```sh
    hugo_version="$(curl -sL 'https://api.github.com/repos/gohugoio/hugo/releases/latest' | sed -E -n '/tag_name/ s/.*v([0-9.]+).*",/\1/p')"
    curl -sL --retry 3 "https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_${hugo_version}_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
    hugo_version="$(curl --silent --location --retry 3 'https://api.github.com/repos/gohugoio/hugo/releases/latest' | sed -E -n '/tag_name/ s/.*v([0-9.]+).*",/\1/p')"
    curl --silent --location --retry 3 "https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_${hugo_version}_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
    ```

    ## Install (extended version)

    `hugo` can be obtained [here](https://github.com/gohugoio/hugo/releases/). Copy the link for the version that you want to install from there.

    Get the `hugo` archive and extract it with the following command:

    ```sh
    curl --silent --location --retry 3 'https://github.com/gohugoio/hugo/releases/download/v0.93.2/hugo_extended_0.93.2_macOS-64bit.tar.gz' | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
    ```

    To install the latest version use the following commands instead:

    ```sh
    hugo_version="$(curl --silent --location --retry 3 'https://api.github.com/repos/gohugoio/hugo/releases/latest' | sed -E -n '/tag_name/ s/.*v([0-9.]+).*",/\1/p')"
    curl --silent --location --retry 3 "https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_extended_${hugo_version}_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
    ```

    ## Verify
  2. fscm revised this gist Aug 5, 2020. 1 changed file with 9 additions and 3 deletions.
    12 changes: 9 additions & 3 deletions install_hugo.md
    Original file line number Diff line number Diff line change
    @@ -5,13 +5,19 @@ Instructions on how to install the `hugo` static site generator.
    ## Install

    `hugo` can be obtained [here](https://github.com/gohugoio/hugo/releases/).
    Copy the link for the version that you want to install from there (or just use
    lastest one).
    Copy the link for the version that you want to install from there.

    Get the `hugo` archive and extract it with the following command:

    ```sh
    curl -fsSL --retry 3 --insecure "https://github.com/gohugoio/hugo/releases/download/v0.72.0/hugo_0.72.0_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
    curl -sL --retry 3 "https://github.com/gohugoio/hugo/releases/download/v0.74.3/hugo_0.74.3_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
    ```

    To install the latest version use the following commands instead:

    ```sh
    hugo_version="$(curl -sL 'https://api.github.com/repos/gohugoio/hugo/releases/latest' | sed -E -n '/tag_name/ s/.*v([0-9.]+).*",/\1/p')"
    curl -sL --retry 3 "https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_${hugo_version}_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
    ```

    ## Verify
  3. fscm created this gist Jun 2, 2020.
    23 changes: 23 additions & 0 deletions install_hugo.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # [macOS] Install hugo

    Instructions on how to install the `hugo` static site generator.

    ## Install

    `hugo` can be obtained [here](https://github.com/gohugoio/hugo/releases/).
    Copy the link for the version that you want to install from there (or just use
    lastest one).

    Get the `hugo` archive and extract it with the following command:

    ```sh
    curl -fsSL --retry 3 --insecure "https://github.com/gohugoio/hugo/releases/download/v0.72.0/hugo_0.72.0_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
    ```

    ## Verify

    Run the following command on a terminal window:

    ```sh
    hugo version
    ```