[{"content":"","date":"June 15, 2026","externalUrl":null,"permalink":"/en/tags/blowfish/","section":"Tags","summary":"","title":"Blowfish","type":"tags"},{"content":"","date":"June 15, 2026","externalUrl":null,"permalink":"/en/categories/","section":"Categories","summary":"","title":"Categories","type":"categories"},{"content":"","date":"June 15, 2026","externalUrl":null,"permalink":"/en/tags/cloudflare-pages/","section":"Tags","summary":"","title":"Cloudflare Pages","type":"tags"},{"content":"The first version of MoleLab is a deliberately simple static blog. Hugo generates the site, Blowfish provides the theme, GitHub stores the source, and Cloudflare Pages builds and serves the final HTML.\nThis post records how the site was put together and what to keep in mind when maintaining it later.\nWhy this stack # Hugo is fast, simple, and produces a fully static site. A personal blog does not need a database, login system, or server-side runtime, so static output is a good fit.\nBlowfish is a polished Hugo theme with dark mode, search, multilingual support, article lists, and comfortable typography. MoleLab currently uses its background homepage layout.\nGitHub keeps the source code and history. Cloudflare Pages connects to GitHub, builds the site on every push to main, and handles hosting and HTTPS.\nLocal setup # Install the extended edition of Hugo first. My local build uses:\nhugo version Then initialize the site:\nhugo new site . --force git init -b main The theme is managed as a Git submodule:\ngit submodule add https://github.com/nunocoracao/blowfish.git themes/blowfish At the moment, the submodule tracks Blowfish\u0026rsquo;s upstream hugo-new-version branch so Hugo 0.163.1 builds without compatibility warnings. Once Blowfish publishes a release containing that compatibility metadata, the submodule can move back to a release tag.\nMultilingual configuration # MoleLab is bilingual. Chinese is the default language and is served at the root:\nhttps://molelab.dev/ English is served at:\nhttps://molelab.dev/en/ The core configuration is:\nbaseURL = \u0026#34;https://molelab.dev/\u0026#34; defaultContentLanguage = \u0026#34;zh-cn\u0026#34; defaultContentLanguageInSubdir = false disableDefaultLanguageRedirect = true Chinese content lives in content/zh-cn, and English content lives in content/en. When the translated versions share the same path, Hugo and Blowfish can link them through the language switcher.\nPushing to GitHub # After the initial setup, commit and push the source:\ngit add . git commit -m \u0026#34;Initialize bilingual Hugo Blowfish blog\u0026#34; git remote add origin https://github.com/molefool/hugo.git git push -u origin main Daily updates use the normal Git flow: edit locally, build locally, commit, and push.\nCloudflare Pages settings # After connecting Cloudflare Pages to the GitHub repository, use main as the production branch.\nBuild command:\ngit submodule update --init --recursive \u0026amp;\u0026amp; hugo --minify -b https://molelab.dev/ Build output directory:\npublic Environment variables:\nHUGO_VERSION = 0.163.1 HUGO_ENV = production The -b https://molelab.dev/ flag matters. It makes canonical URLs, RSS feeds, sitemaps, and multilingual links point to the real domain instead of the temporary pages.dev domain.\nCustom domain # Once the first deployment succeeds, open the Cloudflare Pages project and add molelab.dev under Custom domains.\nIf the domain\u0026rsquo;s DNS is also managed by Cloudflare, Cloudflare can create the required records and certificate automatically. When the domain becomes active, https://molelab.dev/ will serve the Pages deployment.\nCommon pitfalls # The first pitfall is the theme submodule. Cloudflare must fetch the theme during the build, so the build command needs:\ngit submodule update --init --recursive The second pitfall is the Hugo version. Hugo moves quickly, and themes can lag slightly behind. Before pushing, run:\nhugo --gc --minify The third pitfall is baseURL. Once the final domain is known, both the local config and the Cloudflare build command should use that same domain.\nImproving access speed from mainland China # MoleLab currently uses the free Cloudflare Pages plan. That gives us a simple workflow, free hosting, HTTPS, global edge locations, and automatic deployments. It does not guarantee stable access from mainland China, and it is not the same as using a domestic CDN.\nThe lightweight free optimizations come first:\nKeep the site static and avoid heavy client-side frameworks. Compress images before publishing them. Use long cache lifetimes for CSS, JavaScript, and images, while keeping HTML fresher. Enable Cloudflare\u0026rsquo;s free performance features such as Brotli, HTTP/3, and Early Hints. Use the final baseURL so resources and canonical links do not point to temporary domains. These steps reduce bytes and requests, but they do not solve every network path issue. If MoleLab later needs consistently fast access from mainland China, the more reliable path usually involves ICP filing and a domestic cloud/CDN provider. A middle path would be keeping Cloudflare Pages as the main deployment while adding a mainland-friendly static mirror, such as object storage plus CDN, or another static hosting platform with better mainland connectivity.\nFor now, I will keep the free Cloudflare Pages setup, improve the content and structure first, and only add a mainland mirror when traffic data shows that it is worth the extra work.\n","date":"June 15, 2026","externalUrl":null,"permalink":"/en/posts/deploy-hugo-blowfish-cloudflare/","section":"Posts","summary":"A practical record of initializing MoleLab with Hugo, configuring Blowfish, pushing to GitHub, and deploying through Cloudflare Pages with a custom domain.","title":"Deploying MoleLab with Hugo, Blowfish, GitHub, and Cloudflare Pages","type":"posts"},{"content":"","date":"June 15, 2026","externalUrl":null,"permalink":"/en/tags/deployment/","section":"Tags","summary":"","title":"Deployment","type":"tags"},{"content":"","date":"June 15, 2026","externalUrl":null,"permalink":"/en/tags/github/","section":"Tags","summary":"","title":"GitHub","type":"tags"},{"content":"","date":"June 15, 2026","externalUrl":null,"permalink":"/en/tags/hugo/","section":"Tags","summary":"","title":"Hugo","type":"tags"},{"content":" A regular programmer\u0026rsquo;s long-running notes lab for code, systems, deployment, and reusable tooling. Read Posts About MoleLab Static blog Deployment notes Tooling Minecraft-minded building Notes for next time Each post keeps the context, commands, sharp edges, and reusable conclusions. Browse by topic Tags connect Hugo, deployment, tooling, and practical troubleshooting notes. Built over time A small base for services, scripts, configuration, and ideas that keep growing. MoleLab does not try to sound grand. It aims to make real work reliable, restrained, and easy to find again.\n","date":"June 15, 2026","externalUrl":null,"permalink":"/en/","section":"MoleLab","summary":" A regular programmer’s long-running notes lab for code, systems, deployment, and reusable tooling. Read Posts About MoleLab Static blog Deployment notes Tooling Minecraft-minded building Notes for next time Each post keeps the context, commands, sharp edges, and reusable conclusions. Browse by topic Tags connect Hugo, deployment, tooling, and practical troubleshooting notes. Built over time A small base for services, scripts, configuration, and ideas that keep growing. MoleLab does not try to sound grand. It aims to make real work reliable, restrained, and easy to find again.\n","title":"MoleLab","type":"page"},{"content":"","date":"June 15, 2026","externalUrl":null,"permalink":"/en/posts/","section":"Posts","summary":"","title":"Posts","type":"posts"},{"content":"","date":"June 15, 2026","externalUrl":null,"permalink":"/en/categories/site-building/","section":"Categories","summary":"","title":"Site Building","type":"categories"},{"content":"","date":"June 15, 2026","externalUrl":null,"permalink":"/en/tags/","section":"Tags","summary":"","title":"Tags","type":"tags"},{"content":"","date":"2026年6月15日","externalUrl":null,"permalink":"/categories/%E5%BB%BA%E7%AB%99/","section":"Categories","summary":"","title":"建站","type":"categories"},{"content":"","date":"2026年6月15日","externalUrl":null,"permalink":"/tags/%E9%83%A8%E7%BD%B2/","section":"标签","summary":"","title":"部署","type":"tags"},{"content":"I am molefool, a regular programmer.\nMoleLab is my technical lab: a place for notes about code, services, local environments, deployment, tooling, and the problems that are worth writing down before they happen again.\nWhat I Write About # Static sites and deployment workflows with Hugo, Cloudflare Pages, and GitHub. Programming, automation, scripts, small tools, and engineering notes. Self-hosting, service configuration, system setup, and troubleshooting. Occasionally, Minecraft. Not as a guide site, but as notes on building, redstone, servers, and the pleasure of making things stable. Writing Style # I prefer small, clear posts: enough context, reproducible commands, the sharp edges, and a conclusion that can be reused next time.\nIf a post saves future me ten minutes of searching, it is worth writing.\n","externalUrl":null,"permalink":"/en/about/","section":"MoleLab","summary":"I am molefool, a regular programmer.\nMoleLab is my technical lab: a place for notes about code, services, local environments, deployment, tooling, and the problems that are worth writing down before they happen again.\n","title":"About","type":"page"},{"content":"","externalUrl":null,"permalink":"/en/authors/","section":"Authors","summary":"","title":"Authors","type":"authors"},{"content":"Updated on 2026-06-15.\nThe current focus is getting MoleLab\u0026rsquo;s foundation right:\nKeep the site light with Hugo and Blowfish. Automate publishing with GitHub and Cloudflare Pages. Turn deployment steps, configuration notes, pitfalls, and fixed commands into reusable documentation. Gradually collect notes about programming, tooling, systems, and Minecraft-related experiments. The short-term goal is simple: write the site into shape while keeping the content real, the structure clear, and the maintenance cost low.\n","externalUrl":null,"permalink":"/en/now/","section":"MoleLab","summary":"Updated on 2026-06-15.\nThe current focus is getting MoleLab’s foundation right:\nKeep the site light with Hugo and Blowfish. Automate publishing with GitHub and Cloudflare Pages. Turn deployment steps, configuration notes, pitfalls, and fixed commands into reusable documentation. Gradually collect notes about programming, tooling, systems, and Minecraft-related experiments. The short-term goal is simple: write the site into shape while keeping the content real, the structure clear, and the maintenance cost low.\n","title":"Now","type":"page"},{"content":"","externalUrl":null,"permalink":"/en/series/","section":"Series","summary":"","title":"Series","type":"series"}]