<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Cloudflare on Gatto Land</title>
        <link>https://gatto.land/zh-cn/tags/cloudflare/</link>
        <description>Recent content in Cloudflare on Gatto Land</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>zh-cn</language>
        <lastBuildDate>Thu, 15 May 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://gatto.land/zh-cn/tags/cloudflare/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>Hello World! - 用 Hugo &#43; Cloudflare 重新开始</title>
            <link>https://gatto.land/zh-cn/p/hello-world/</link>
            <pubDate>Thu, 15 May 2025 00:00:00 +0000</pubDate>
            <guid>https://gatto.land/zh-cn/p/hello-world/</guid>
            <description>&lt;img src=&#34;https://gatto.land/p/hello-world/Logo_of_Hugo.png&#34; alt=&#34;Featured image of post Hello World! - 用 Hugo + Cloudflare 重新开始&#34; /&gt;&#xA;    &lt;blockquote&gt;&#xA;        &lt;p&gt;&lt;em&gt;“事不过三，这次终于成了。”&lt;/em&gt;&lt;br&gt;&#xA;经历过 GitHub Pages 和一段不太安稳的 WordPress 时期之后，这个博客终于搬到了 &lt;strong&gt;Hugo + Cloudflare Pages&lt;/strong&gt;：静态、安全，也轻快得多。&lt;/p&gt;&#xA;&#xA;    &lt;/blockquote&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;Cloudflare 标志&#34; class=&#34;gallery-image&#34; data-flex-basis=&#34;722px&#34; data-flex-grow=&#34;301&#34; height=&#34;170&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://gatto.land/p/hello-world/Logo_of_Cloudflare.jpg&#34; width=&#34;512&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;简短时间线&#34;&gt;简短时间线&#xA;&lt;/h2&gt;&lt;table&gt;&#xA;&#x9;&lt;thead&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;年份&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;平台&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;th&gt;主要收获&lt;/th&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/thead&gt;&#xA;&#x9;&lt;tbody&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;2017&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;strong&gt;GitHub Pages (Jekyll)&lt;/strong&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;很适合学习 Git 工作流，但后来开始想要更丰富的功能和更好看的主题。&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;2020&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;strong&gt;WordPress&lt;/strong&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;可视化编辑器很方便，直到安全问题开始变得没完没了。&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&#x9;&#x9;&lt;tr&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;2025&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;&lt;strong&gt;Hugo + Cloudflare&lt;/strong&gt;&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;td&gt;回到由边缘网络分发的静态 HTML，不用再半夜担心补丁和漏洞。&lt;/td&gt;&#xA;&#x9;&#x9;&#x9;&lt;/tr&gt;&#xA;&#x9;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h2 id=&#34;为什么离开-wordpress&#34;&gt;为什么离开 WordPress&#xA;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;仅在2024年，WordPress生态就公开了7,966个新漏洞&lt;/strong&gt;，比2023年 &lt;strong&gt;增加34%&lt;/strong&gt;，约等于每天22个 (Patchstack, 2025)。&lt;/li&gt;&#xA;&lt;li&gt;Sucuri 的事件数据表明，&lt;strong&gt;2022年被入侵的CMS网站中，96.2%运行的是 WordPress&lt;/strong&gt; (Sucuri, 2023)。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;我的网站也成了这个统计数字的一部分：一个过时插件被利用后，机器人网络篡改了首页，还把我锁在后台之外。由于没有近期备份，数据库基本报废。&lt;/p&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;黑客与二进制代码的示意照片&#34; class=&#34;gallery-image&#34; data-flex-basis=&#34;320px&#34; data-flex-grow=&#34;133&#34; height=&#34;720&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://gatto.land/p/hello-world/Cliche_Hacker_and_Binary_Code.jpg&#34; srcset=&#34;https://gatto.land/p/hello-world/Cliche_Hacker_and_Binary_Code_hu_11b3f53267b32499.jpg 800w, https://gatto.land/p/hello-world/Cliche_Hacker_and_Binary_Code.jpg 960w&#34; width=&#34;960&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;得到的教训&#34;&gt;得到的教训&#xA;&lt;/h2&gt;&lt;ol&gt;&#xA;&lt;li&gt;&lt;strong&gt;所有续费都要自动化&lt;/strong&gt; - 我甚至忘了续费日语罗马字域名 &lt;strong&gt;&lt;code&gt;jiyuuneko.com&lt;/code&gt;&lt;/strong&gt;，几个小时内就被别人抢走了。&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;版本控制就是一种备份&lt;/strong&gt; - 放在 Git 里的静态文件，比线上数据库更不容易彻底丢失。&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;组件越少，麻烦越少&lt;/strong&gt; - 没有 PHP，没有 MySQL，也就少了很多可被攻击的入口。&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;img alt=&#34;Hugo 标志&#34; class=&#34;gallery-image&#34; data-flex-basis=&#34;877px&#34; data-flex-grow=&#34;365&#34; height=&#34;140&#34; loading=&#34;lazy&#34; sizes=&#34;(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px&#34; src=&#34;https://gatto.land/p/hello-world/Logo_of_Hugo.png&#34; width=&#34;512&#34;&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;为什么我喜欢-hugo--cloudflare-pages&#34;&gt;为什么我喜欢 Hugo + Cloudflare Pages&#xA;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;构建速度很快&lt;/strong&gt; - Hugo 生成整个站点的速度，比我喝一口咖啡还快；页面再多也很利落。&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;从哪里访问都快&lt;/strong&gt; - Cloudflare 会把页面缓存到全球边缘节点。无论读者在惠灵顿、吉隆坡还是堪萨斯，加载体验都很接近。&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;没有太多活动部件，也就少了很多意外&lt;/strong&gt; - 静态 HTML 不需要数据库，也不需要 PHP，能被攻击的地方少得多。&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;基础能力很省心&lt;/strong&gt; - 免费 HTTPS 和可靠的防火墙，点几下就能启用。&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Markdown 写作很舒服&lt;/strong&gt; - 我用纯文本写作，提交到 Git，剩下交给 Hugo。差异清楚，文章也不会被锁在某个平台里。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;接下来会写什么&#34;&gt;接下来会写什么&#xA;&lt;/h2&gt;&lt;ul&gt;&#xA;&lt;li&gt;关于景观研究、城市韧性、可持续基础设施和数字发布流程的深度笔记。&lt;/li&gt;&#xA;&lt;li&gt;借助 Cloudflare，每个 pull request 都可以有预览链接。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;如果你以前收藏过旧的 WordPress 站点，谢谢你又找到这里。新地址是 &lt;strong&gt;&lt;a class=&#34;link&#34; href=&#34;https://gatto.land&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://gatto.land&lt;/a&gt;&lt;/strong&gt;。这一次，我已经打开自动续费。&lt;/p&gt;&#xA;&lt;p&gt;下一篇再见。&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h3 id=&#34;参考资料&#34;&gt;参考资料&#xA;&lt;/h3&gt;&lt;p&gt;Cloudflare. (2016, September 27). Cloudflare logo [SVG logo]. Wikimedia Commons. &lt;a class=&#34;link&#34; href=&#34;https://commons.wikimedia.org/wiki/File:Cloudflare_Logo.svg&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://commons.wikimedia.org/wiki/File:Cloudflare_Logo.svg&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Coelho, E., &amp;amp; YellowIcon. (2008, May 2). Stachledraht DDoS attack diagram [SVG image]. Wikimedia Commons. &lt;a class=&#34;link&#34; href=&#34;https://commons.wikimedia.org/wiki/File:Stachledraht_DDos_Attack.svg&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://commons.wikimedia.org/wiki/File:Stachledraht_DDos_Attack.svg&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Francia, S., &amp;amp; Parr, B. (2014, May 28). Logo of Hugo the static website generator [SVG logo]. Wikimedia Commons. &lt;a class=&#34;link&#34; href=&#34;https://commons.wikimedia.org/wiki/File:Logo_of_Hugo_the_static_website_generator.svg&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://commons.wikimedia.org/wiki/File:Logo_of_Hugo_the_static_website_generator.svg&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Patchstack. (2025). &lt;em&gt;State of WordPress Security in 2025&lt;/em&gt;. &lt;a class=&#34;link&#34; href=&#34;https://patchstack.com/whitepaper/state-of-wordpress-security-in-2025/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://patchstack.com/whitepaper/state-of-wordpress-security-in-2025/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Sucuri. (2023). &lt;em&gt;2022 Hacked Website Report&lt;/em&gt;. &lt;a class=&#34;link&#34; href=&#34;https://sucuri.net/reports/2022-hacked-website-report/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://sucuri.net/reports/2022-hacked-website-report/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Whelan, D. (2016, May 24). Cliche hacker and binary code [Photograph]. Flickr. &lt;a class=&#34;link&#34; href=&#34;https://www.flickr.com/photos/davidpwhelan/26946304530/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://www.flickr.com/photos/davidpwhelan/26946304530/&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
