Skip to content

Setup dev environment

Daniel Cañizares Corrales edited this page Oct 5, 2020 · 5 revisions

Install Hugo

Windows

  • Run the following commands on Powershell.

  • Install Chocolatey:

    Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
    
  • Download Hugo:

    choco install hugo-extended -confirm
    

Linux and mac

  • With brew, you can use this command.

    brew install hugo
    

For more info see these instructions to install Hugo.

Run the project

To work on Hugo (site contents)

hugo server

To modify the site structure/theme

  • Alternative 1: Run _run-dev.ps1 script using Powershell.

  • Alternative 2:

    • Open the folder themes/tranquilpeak.

    • Execute:

      # Just the first time
      npm install
      
      # Always
      npm run start
      
    • On a different command prompt, on the root folder execute:

      hugo server -w --noHTTPCache --disableFastRender -v
      

Clone this wiki locally