<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Hugo on keee.blog</title><link>https://keee.blog/tags/hugo/</link><description>Recent content in Hugo on keee.blog</description><generator>Hugo -- gohugo.io</generator><language>ja</language><copyright>©2025, All Rights Reserved</copyright><lastBuildDate>Sun, 05 Feb 2023 00:11:59 +0900</lastBuildDate><atom:link href="https://keee.blog/tags/hugo/index.xml" rel="self" type="application/rss+xml"/><item><title>[Hugo]自動投稿したい4（自動コミット）</title><link>https://keee.blog/posts/3eb16e4f21bbb6bdd95bf3e677c6b97e/</link><pubDate>Sun, 05 Feb 2023 00:11:59 +0900</pubDate><atom:modified>Sun, 05 Feb 2023 00:11:59 +0900</atom:modified><guid>https://keee.blog/posts/3eb16e4f21bbb6bdd95bf3e677c6b97e/</guid><description>&lt;h2 id="今回やること">今回やること&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://keee.blog/posts/344ec63df460236c75c8a20be8736605/">日付更新処理&lt;/a>で行った変更をmainブランチに反映する&lt;/li>
&lt;li>ストック数をslackに通知する&lt;/li>
&lt;/ul>
&lt;h2 id="前提">前提&lt;/h2>
&lt;ul>
&lt;li>ワークフロー用のファイルが作成されている&lt;/li>
&lt;li>slackのIncoming Webhookが使用できる状態になっている&lt;/li>
&lt;li>変更内容が意図したものかはフロー中では確認しない&lt;/li>
&lt;/ul>
&lt;h2 id="差分があるか確認する">差分があるか確認する&lt;/h2>
&lt;p>&lt;code>git diff&lt;/code>で差分を確認する。&lt;br />
差分があるときだけコミットするステップに進む。&lt;/p></description><dc:creator>keee</dc:creator><category>Hugo</category><category>GithubActions</category><category>grep</category></item><item><title>[Hugo] 自動投稿したい3（Github Actionsで記事ファイルを更新する）</title><link>https://keee.blog/posts/344ec63df460236c75c8a20be8736605/</link><pubDate>Sun, 08 Jan 2023 13:50:47 +0900</pubDate><atom:modified>Sun, 08 Jan 2023 13:50:47 +0900</atom:modified><guid>https://keee.blog/posts/344ec63df460236c75c8a20be8736605/</guid><description>&lt;h2 id="今回やること">今回やること&lt;/h2>
&lt;p>以下を定期的に行う設定を作成する。&lt;/p>
&lt;ul>
&lt;li>公開可能な記事データを抽出&lt;/li>
&lt;li>更新日が最も古いものの&lt;code>date&lt;/code>を更新&lt;/li>
&lt;/ul>
&lt;p>コミット部分は別で対応。&lt;/p>
&lt;h2 id="前提">前提&lt;/h2>
&lt;ul>
&lt;li>hugo v0.96.0+extended&lt;/li>
&lt;li>記事抽出・更新のコマンドを作成 &lt;a href="https://keee.blog/posts/6cb4b610422bcc36b4def9a637ffd54e/">検討時の詳細はこちら&lt;/a>&lt;/li>
&lt;li>act version 0.2.34 &lt;a href="https://keee.blog/posts/768c00018878e246f3410a7dd991c1f4/">インストールのことはこちら&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="yamlファイルに設定を書く">yamlファイルに設定を書く&lt;/h2>
&lt;p>プロジェクトのルートディレクトリに&lt;code>.github/workflows/&lt;/code>ディレクトリを作成。&lt;br />
この中の&lt;code>.yaml&lt;/code>ファイルに記載した内容が実行される。&lt;/p></description><dc:creator>keee</dc:creator><category>Hugo</category><category>GithubActions</category><category>Git</category></item><item><title>[Hugo] 自動投稿したい2（ファイル抽出と更新）</title><link>https://keee.blog/posts/6cb4b610422bcc36b4def9a637ffd54e/</link><pubDate>Sun, 08 Jan 2023 05:54:47 +0900</pubDate><atom:modified>Sun, 08 Jan 2023 05:54:47 +0900</atom:modified><guid>https://keee.blog/posts/6cb4b610422bcc36b4def9a637ffd54e/</guid><description>&lt;h2 id="公開可能な記事を抽出して日付を更新する">公開可能な記事を抽出して日付を更新する&lt;/h2>
&lt;p>&lt;code>hugo list future&lt;/code>を使用することで、将来公開されるであろう記事一覧を抽出できた。 &lt;a href="https://keee.blog/posts/32d65a8219a777ac297a127caa96a48d/">詳細はこちら&lt;/a>&lt;br />
今回は一覧から更新日時が最も古いものを抽出して、日付を公開日（処理実行日）にする。&lt;/p></description><dc:creator>keee</dc:creator><category>Hugo</category><category>cut</category><category>ls</category><category>xargs</category><category>head</category><category>sed</category></item><item><title>[Hugo] 予約投稿したい（Hugoの機能について調べた）</title><link>https://keee.blog/posts/32d65a8219a777ac297a127caa96a48d/</link><pubDate>Sun, 01 Jan 2023 03:00:00 +0900</pubDate><atom:modified>Sun, 01 Jan 2023 03:00:00 +0900</atom:modified><guid>https://keee.blog/posts/32d65a8219a777ac297a127caa96a48d/</guid><description>&lt;h2 id="概要">概要&lt;/h2>
&lt;p>週1で定期的に記事を投稿するような感じにしたかった。&lt;/p>
&lt;h2 id="簡単なやり方">簡単なやり方&lt;/h2>
&lt;p>以下の流れだと&lt;code>date&lt;/code>で設定した日時以降のビルドでその時点で過去の日付の記事が表示されるようになる。&lt;/p></description><dc:creator>keee</dc:creator><category>Hugo</category></item><item><title>[Hugo] コンテンツのurlを指定する</title><link>https://keee.blog/posts/9d95546a611b0c0f58d235ebc7941143/</link><pubDate>Wed, 28 Dec 2022 09:31:40 +0900</pubDate><atom:modified>Wed, 28 Dec 2022 09:31:40 +0900</atom:modified><guid>https://keee.blog/posts/9d95546a611b0c0f58d235ebc7941143/</guid><description>&lt;h2 id="課題">課題&lt;/h2>
&lt;p>デフォルトではファイル名をもとにurlが決まるが、ID的な感じで適当な文字列にしたかった。&lt;/p>
&lt;h2 id="この記事の前提">この記事の前提&lt;/h2>
&lt;ul>
&lt;li>hugo v0.96.0+extended&lt;/li>
&lt;/ul>
&lt;h2 id="参考サイト">参考サイト&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://gohugo.io/content-management/organization/#slug-1">https://gohugo.io/content-management/organization/#slug-1&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="対応メモ">対応メモ&lt;/h2>
&lt;h3 id="ディレクトリ構成">ディレクトリ構成&lt;/h3>
&lt;pre tabindex="0">&lt;code>content/
└── ja
├── _index.md
├── about
│   └── index.ja.md
├── archive
│   └── _index.ja.md
└── posts
├── _index.ja.md
├── my-first-post.ja.md
└── set_slug.md
&lt;/code>&lt;/pre>&lt;p>多言語対応してるわけではないけど、ja以下にファイルがある。&lt;/p></description><dc:creator>keee</dc:creator><category>Hugo</category></item></channel></rss>