gohugo windows

  1. Download GoHugo:
  2. Visit the official GoHugo website: https://gohugo.io/
  3. Navigate to the "Getting Started" section.
  4. Click on the "Latest Releases" link.
  5. Download the Windows version of the extended version of Hugo.

  6. Extract Hugo:

  7. Locate the downloaded ZIP file.
  8. Right-click on the file and select "Extract All..."
  9. Choose a destination folder and click "Extract."

  10. Set Environment Variables:

  11. Open the Start menu and search for "Environment Variables."
  12. Select "Edit the system environment variables."
  13. Click the "Environment Variables..." button.
  14. Under "System variables," find the "Path" variable and click "Edit..."
  15. Click "New" and add the path to the "bin" folder inside the extracted Hugo directory.

  16. Verify Installation:

  17. Open a new command prompt or PowerShell window.
  18. Type hugo version and press Enter.
  19. Verify that the installed Hugo version is displayed without errors.

  20. Create a New Hugo Site:

  21. Choose or create a directory for your new Hugo site.
  22. Open a command prompt or PowerShell window.
  23. Navigate to the chosen directory using the cd command.
  24. Run the command hugo new site <sitename> to create a new Hugo site.

  25. Choose a Theme:

  26. Navigate to the themes directory inside your Hugo site folder.
  27. Run the command git clone <theme-repository-url> to clone a Hugo theme from a Git repository.

  28. Configure the Site:

  29. Open the config.toml file in the root of your Hugo site folder using a text editor.
  30. Configure basic settings such as the site title, baseURL, and theme.

  31. Create Content:

  32. Use the hugo new <section-name>/<content-title>.md command to create new content.
  33. Open the created Markdown file in a text editor and add your content.

  34. Start the Hugo Server:

  35. Run the command hugo server -D to start the Hugo development server.
  36. Open a web browser and navigate to the provided local server address (usually http://localhost:1313) to preview your site.

  37. Build the Site:

  38. When satisfied with your changes, stop the Hugo server.
  39. Run the command hugo to build the final static site.
  40. The generated site files will be available in the "public" folder within your Hugo site directory.

  41. Deploy the Site:

  42. Copy the contents of the "public" folder to your web server or hosting provider to deploy your Hugo site.