How I Designed This Blog
- What changed: Static-site tools and hosting were compared in official documents, and the blog’s address, language switch, and draft protection were decided.
- Decision: The conditions were: cost of zero, publish only what has been checked, and switching between Korean and English.
- Still unknown: The sharing preview image starts without one, and whether to add it later still needs a decision.
I made this blog so I can look back later at how the FiCl renewal project went, and share it with anyone interested in the same kind of work. This first post is about how I designed the blog itself. The focus is what I weighed before writing any code.
Three conditions I set first
- The cost is zero. I do not rent servers or use paid features.
- Only posts I have checked get published. An accidental leak of a draft is hard to undo.
- Readers can switch between Korean and English.
I compared tools using the official docs
I did not rely on memory. I read the official documentation and compared. Anything I could not confirm is marked “not confirmed”.
| Candidate | Verdict |
|---|---|
| Astro (a tool that builds pages into HTML ahead of time) + Cloudflare Pages | Deployment, sitemap and RSS are all confirmed in the official docs. Posts are Markdown (a simple formatting syntax) files, so they carry over even if I change tools later |
| Hugo + Cloudflare Pages | Fast, but with only a handful of posts it offers little advantage here |
| Astro + Cloudflare Workers | Broader features, but not needed for a static blog. I can move later if I need to |
Cloudflare Pages serves static file requests for free, with no limit on the number of requests. The part that costs money is the feature that runs server code (Functions), so I decided to use static output only.
Where I got stuck choosing the address
At first I wanted to use dev.blog.ficl.kr. But the docs say Cloudflare’s default free HTTPS certificate applies only up to a one-level subdomain (blog.ficl.kr) and does not apply to a two-level one (dev.blog.ficl.kr). Fixing that needs a paid feature.
So I used a hyphen instead of a dot and chose dev-blog.ficl.kr. It is one level, so the free certificate is enough, and it keeps the “dev” I wanted. Because an address is hard to change once it is public, I settled it before writing any code.
Safeguards against publishing by accident
- If a post’s
draftfield in the header is missing, the post is private. The Astro docs’ example publishes any post whosedraftis nottrue, so a post where I forgotdraftwould go public. I turned it around: only posts that explicitly sayfalseare published. - If a post contains patterns such as an email address, a token, a private IP or my PC’s file path, the build (the process that generates the site) stops, even for a draft.
- But a company or customer name cannot be caught by a pattern. So the final check is done by a person.
- Preview addresses for pull requests are public by default. I turned previews off so a post cannot be seen before it is merged.
Korean–English toggle
Each language has its own address: Korean is /, and English is under /en/. This is the approach Google’s docs describe, so I followed it. Each post can have an English version, but it does not have to. The toggle appears only when a file with the same name exists on both sides and both are published. If one side is a draft, I create neither the toggle nor the search-engine link markers (hreflang).
What I have not confirmed yet
- The preview image shown when a link is shared (
og:image) is required by the Open Graph standard, but I am starting without an image. I have not confirmed how the preview looks in this state. - The docs do not say what visitors see if a Cloudflare build fails. If something goes wrong, I roll back to the previous deployment.
What I learned
- Decisions that are hard to undo once public, like names and addresses, should be settled before the code.
- Which way the default points decides safety. It is better when forgetting something leaves a post private.
- If you mark what you could not confirm as “not confirmed” instead of pretending to know, you can see later what needs another look.