Skip to content

Hugoを最新化する&Hugo modulesを使う#19

Open
mom0tomo wants to merge 9 commits intomainfrom
update-hugo-and-modules
Open

Hugoを最新化する&Hugo modulesを使う#19
mom0tomo wants to merge 9 commits intomainfrom
update-hugo-and-modules

Conversation

@mom0tomo
Copy link
Contributor

@mom0tomo mom0tomo commented Dec 14, 2025

概要

Hugoを最新化して、git submoduleではなく公式に推奨されているHugo modulesを使う方式に変更します。
https://gohugo.io/hugo-modules/

レビューの観点

プレビュー環境で見て崩れがないこと

@mom0tomo mom0tomo self-assigned this Dec 14, 2025
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 14, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
web-womenwhogo-tokyo 830b694 Commit Preview URL

Branch Preview URL
Dec 31 2025, 02:18 AM

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the Hugo setup by migrating from git submodules to Hugo modules for theme management, as recommended by Hugo's official documentation. The changes update the site to use Hugo's native module system, which provides better dependency management and version control.

Key changes:

  • Migration from git submodule to Hugo modules for the elate theme
  • Update of Hugo template syntax from .Site.Params to site.Params (partially completed)
  • Addition of go.mod/go.sum for Hugo module management
  • Configuration updates including new markup settings and module version requirements

Reviewed changes

Copilot reviewed 7 out of 13 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
themes/elate Removed git submodule reference to elate theme
.gitmodules Removed git submodule configuration
go.mod Added Hugo modules configuration with theme dependency
go.sum Added checksums for Hugo module dependencies
config.toml Updated theme reference, added module configuration, and reformatted settings
layouts/partials/work.html Updated template syntax and removed extra indentation
layouts/partials/intro.html Updated template syntax and removed extra indentation
layouts/partials/about.html Removed extra indentation (template syntax partially updated)
layouts/partials/services.html Removed extra indentation (template syntax partially updated)
layouts/partials/testimonials.html Removed extra indentation (template syntax partially updated)
README.md Added documentation for local development and deployment
.gitignore Minor formatting fix
.hugo_build.lock Added Hugo build lock file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 5 to 14
<h2 class="to-animate">{{ with .Site.Params.about.title }}{{ . | markdownify }}{{ end }}</h2>
<div class="row">
<div class="col-md-8 col-md-offset-2 subtext to-animate">
<h3>{{ with .Site.Params.about.description }}{{ . | markdownify }}{{ end }}</h3>
</div>
</div>
</div>
<div class="row">
</div>
<div class="row">
{{ range .Site.Params.about.item }}
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent use of .Site.Params instead of site.Params. While the file was updated to remove indentation, lines 5, 8, and 14 still use the old .Site.Params syntax. For consistency with other template files like work.html and intro.html which were updated to use site.Params, these should also be changed to site.Params.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確かに。直します

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed: 3dd891b

config.toml Outdated
Comment on lines 15 to 18
enableRobotsTXT = true
canonifyURLs = true
defaultContentLanguage = "ja"
paginate = 10
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incorrect placement of top-level configuration options. Lines 15-18 (enableRobotsTXT, canonifyURLs, defaultContentLanguage, paginate) are placed after the [markup] section, making them appear as if they're part of the markup configuration. These should be moved to appear before the [module] section (lines 6-9) to be at the top level of the configuration where they belong.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed: 6c714e1

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 13 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

config.toml Outdated
@@ -1,283 +1,344 @@
baseURL = "localhost:1313"
baseURL = "http://localhost:1313/"
Copy link

Copilot AI Dec 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The baseURL should not include the protocol and domain for localhost development. According to Hugo best practices, baseURL should be set to the production URL (not localhost). For local development, Hugo server automatically handles localhost URLs. Consider setting this to the actual production URL like "https://web.womenwhogo.tokyo" or similar, as localhost:1313 should only be used during local testing and Hugo's server will override it automatically.

Suggested change
baseURL = "http://localhost:1313/"
baseURL = "https://web.womenwhogo.tokyo/"

Copilot uses AI. Check for mistakes.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mom0tomo

ご対応ありがとうございます!

こちらのCoplilotのコメント気になりますね🤔
Cloudflare あまりわかってないのですが、 Cloudflare Pages側で環境変数などで本番URLに上書きされる設定になっているんでしょうか?

@mikkegt
Copy link

mikkegt commented Dec 14, 2025

@mom0tomo

プレ表示確認しました。問題ないです!

私が変なことを聞いていたら指摘してほしいですが、themes/elate ディレクトリが物理的に残っているっぽい?ですが、これは、段階的に Hugo modulesに移行するために残しているという感じでしょうか。

上記でコメントしたbaseURLの件と、こちらの件、合わせて2点が気になりましたが、他は大丈夫そうでした!

@mom0tomo
Copy link
Contributor Author

mom0tomo commented Dec 21, 2025

確かにbaseURLの件は直したほうがいいですね!そしてテーマの空ディレクトリは残っていなさそうでした! @mikkegt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants