<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
  
  <title>kk blog</title>
  <subtitle>技術メモと、配布ファイルの置き場所。</subtitle>
  <link href="https://blog.maguro-alternative.com/feed.xml" rel="self" />
  <link href="https://blog.maguro-alternative.com/" />
  <updated>2026-08-01T00:00:00Z</updated>
  <id>https://blog.maguro-alternative.com/</id>
  <author>
    <name>kk</name>
  </author>
  <entry>
    <title>Eleventy + Cloudflare Workers でブログを立てた</title>
    <link href="https://blog.maguro-alternative.com/blog/hello-eleventy/" />
    <updated>2026-08-01T00:00:00Z</updated>
    <id>https://blog.maguro-alternative.com/blog/hello-eleventy/</id>
    <content type="html">&lt;p&gt;このサイトは &lt;a href=&quot;https://www.11ty.dev/&quot;&gt;Eleventy&lt;/a&gt; で生成し、Cloudflare Workers（Static Assets）で配信している。&lt;/p&gt;
&lt;h2 id=&quot;%E6%A7%8B%E6%88%90&quot; tabindex=&quot;-1&quot;&gt;&lt;a class=&quot;header-anchor&quot; href=&quot;https://blog.maguro-alternative.com/blog/hello-eleventy/#%E6%A7%8B%E6%88%90&quot;&gt;構成&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;記事&lt;/strong&gt; — &lt;code&gt;src/posts/*.md&lt;/code&gt; に Markdown で書く。ファイル名の日付がそのまま公開日になる&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;配信&lt;/strong&gt; — &lt;code&gt;dist/&lt;/code&gt; を Workers Static Assets として配信&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ファイル配布&lt;/strong&gt; — 実体は R2 に置き、Worker の &lt;code&gt;/dl/&amp;lt;key&amp;gt;&lt;/code&gt; 経由で配る&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;R2 を公開バケットにせず Worker を通しているのは、独自ドメインのまま配れるのと、
あとからアクセス制限やダウンロード数の集計を足せるようにしておくため。&lt;/p&gt;
&lt;h2 id=&quot;%E8%A8%98%E4%BA%8B%E3%82%92%E6%9B%B8%E3%81%8F&quot; tabindex=&quot;-1&quot;&gt;&lt;a class=&quot;header-anchor&quot; href=&quot;https://blog.maguro-alternative.com/blog/hello-eleventy/#%E8%A8%98%E4%BA%8B%E3%82%92%E6%9B%B8%E3%81%8F&quot;&gt;記事を書く&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token comment&quot;&gt;# src/posts/YYYY-MM-DD-slug.md を作って&lt;/span&gt;
&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; run dev&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;フロントマターは &lt;code&gt;title&lt;/code&gt; / &lt;code&gt;description&lt;/code&gt; / &lt;code&gt;date&lt;/code&gt; / &lt;code&gt;tags&lt;/code&gt; の 4 つだけ。
&lt;code&gt;draft: true&lt;/code&gt; を付けると本番ビルドから除外される。&lt;/p&gt;
&lt;h2 id=&quot;%E3%83%87%E3%83%97%E3%83%AD%E3%82%A4&quot; tabindex=&quot;-1&quot;&gt;&lt;a class=&quot;header-anchor&quot; href=&quot;https://blog.maguro-alternative.com/blog/hello-eleventy/#%E3%83%87%E3%83%97%E3%83%AD%E3%82%A4&quot;&gt;デプロイ&lt;/a&gt;&lt;/h2&gt;
&lt;pre class=&quot;language-bash&quot;&gt;&lt;code class=&quot;language-bash&quot;&gt;&lt;span class=&quot;token function&quot;&gt;npm&lt;/span&gt; run deploy&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;wrangler deploy&lt;/code&gt; の前に Eleventy のビルドが走るので、これ一発でよい。&lt;/p&gt;
</content>
  </entry>
</feed>