Bye Bye Moore

PoCソルジャーな零細事業主が作業メモを残すブログ

WindowsにHugoの環境を作る

NetlifyとGitlabを連携して静的サイトをアップロードする - Bye Bye Moore
でやったHugoの環境をWindows11にも作ってみました

実際のところ

以下、gitはある状態とします

Chocolately

choco install hugo-extended
cd quickstart
git init
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke themes/ananke
echo "theme = 'ananke'" >> config.toml
> hugo new site quickstart
Congratulations! Your new Hugo site is created in C:\Users\user\Documents\web\quickstart.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/ or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>\<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
hugo server
Start building sites …
hugo v0.110.0-e32a493b7826d02763c3b79623952e625402b168+extended windows/amd64 BuildDate=2023-01-17T12:16:09Z VendorInfo=gohugoio

                   | EN
-------------------+-----
  Pages            |  7
  Paginator pages  |  0
  Non-page files   |  0
  Static files     |  1
  Processed images |  0
  Aliases          |  0
  Sitemaps         |  1
  Cleaned          |  0

Built in 97 ms
Watching for changes in C:\Users\user\Documents\web\quickstart\{archetypes,assets,content,data,layouts,static,themes}
Watching for config changes in C:\Users\user\Documents\web\quickstart\config.toml, C:\Users\user\Documents\web\quickstart\themes\ananke\config.yaml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

http://localhost:1313/にアクセスすると