{
  "$type": "site.standard.document",
  "content": {
    "$type": "pub.leaflet.content",
    "pages": [
      {
        "$type": "pub.leaflet.pages.linearDocument",
        "blocks": [
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#underline"
                    },
                    {
                      "$type": "pub.leaflet.richtext.facet#link",
                      "uri": "https://workers.cloudflare.com/"
                    }
                  ],
                  "index": {
                    "byteEnd": 111,
                    "byteStart": 93
                  }
                }
              ],
              "plaintext": "Cloudflare offers generous limits with their free offering. One of the products included is Cloudflare workers. You can host serverless projects without having to worry about how and where to host them."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "facets": [
                {
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#underline"
                    },
                    {
                      "$type": "pub.leaflet.richtext.facet#link",
                      "uri": "https://pages.cloudflare.com/"
                    }
                  ],
                  "index": {
                    "byteEnd": 48,
                    "byteStart": 32
                  }
                },
                {
                  "features": [
                    {
                      "$type": "pub.leaflet.richtext.facet#underline"
                    },
                    {
                      "$type": "pub.leaflet.richtext.facet#link",
                      "uri": "https://developers.cloudflare.com/workers/static-assets/"
                    }
                  ],
                  "index": {
                    "byteEnd": 237,
                    "byteStart": 233
                  }
                }
              ],
              "plaintext": "Cloudflare has another product Cloudflare Pages which can be used for hosting static sites. It seems like active development on Pages has stopped, and Clouflare recommends using Workers instead. Docs for hosting static assets are here. But it's not immediately clear from the docs how you wouldd host a simple static website generated using 11ty.dev."
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "Turns out, it's quite simple:"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.orderedList",
              "children": [
                {
                  "$type": "pub.leaflet.blocks.orderedList#listItem",
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#underline"
                          },
                          {
                            "$type": "pub.leaflet.richtext.facet#link",
                            "uri": "https://developers.cloudflare.com/workers/wrangler/install-and-update/"
                          }
                        ],
                        "index": {
                          "byteEnd": 21,
                          "byteStart": 9
                        }
                      }
                    ],
                    "plaintext": "Install Wrangler CLI - This makes it easier to interact with Cloudflare APIs."
                  }
                },
                {
                  "$type": "pub.leaflet.blocks.orderedList#listItem",
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#code"
                          }
                        ],
                        "index": {
                          "byteEnd": 71,
                          "byteStart": 57
                        }
                      }
                    ],
                    "plaintext": "In your static web site project - add a wrangler config wrangler.jsonc. These are the minimal required attributes:"
                  },
                  "unorderedListChildren": {
                    "$type": "pub.leaflet.blocks.unorderedList",
                    "children": [
                      {
                        "$type": "pub.leaflet.blocks.unorderedList#listItem",
                        "content": {
                          "$type": "pub.leaflet.blocks.text",
                          "facets": [
                            {
                              "features": [
                                {
                                  "$type": "pub.leaflet.richtext.facet#code"
                                }
                              ],
                              "index": {
                                "byteEnd": 4,
                                "byteStart": 0
                              }
                            }
                          ],
                          "plaintext": "name - unique cloudflare worker project name."
                        }
                      },
                      {
                        "$type": "pub.leaflet.blocks.unorderedList#listItem",
                        "content": {
                          "$type": "pub.leaflet.blocks.text",
                          "facets": [
                            {
                              "features": [
                                {
                                  "$type": "pub.leaflet.richtext.facet#code"
                                }
                              ],
                              "index": {
                                "byteEnd": 6,
                                "byteStart": 0
                              }
                            }
                          ],
                          "plaintext": "assets - a directory which contains the html, css, js files, handwritten or generated by 11ty.dev."
                        }
                      },
                      {
                        "$type": "pub.leaflet.blocks.unorderedList#listItem",
                        "content": {
                          "$type": "pub.leaflet.blocks.text",
                          "facets": [
                            {
                              "features": [
                                {
                                  "$type": "pub.leaflet.richtext.facet#code"
                                }
                              ],
                              "index": {
                                "byteEnd": 18,
                                "byteStart": 0
                              }
                            },
                            {
                              "features": [
                                {
                                  "$type": "pub.leaflet.richtext.facet#underline"
                                },
                                {
                                  "$type": "pub.leaflet.richtext.facet#link",
                                  "uri": "https://developers.cloudflare.com/workers/configuration/compatibility-dates/"
                                }
                              ],
                              "index": {
                                "byteEnd": 58,
                                "byteStart": 54
                              }
                            }
                          ],
                          "plaintext": "compatibility_date - set this to current date. Docs here"
                        }
                      },
                      {
                        "$type": "pub.leaflet.blocks.unorderedList#listItem",
                        "children": [
                          {
                            "$type": "pub.leaflet.blocks.unorderedList#listItem",
                            "content": {
                              "$type": "pub.leaflet.blocks.text",
                              "facets": [
                                {
                                  "features": [
                                    {
                                      "$type": "pub.leaflet.richtext.facet#code"
                                    }
                                  ],
                                  "index": {
                                    "byteEnd": 7,
                                    "byteStart": 0
                                  }
                                }
                              ],
                              "plaintext": "pattern - the url at which the static site needs to be hosted."
                            }
                          },
                          {
                            "$type": "pub.leaflet.blocks.unorderedList#listItem",
                            "content": {
                              "$type": "pub.leaflet.blocks.text",
                              "facets": [
                                {
                                  "features": [
                                    {
                                      "$type": "pub.leaflet.richtext.facet#code"
                                    }
                                  ],
                                  "index": {
                                    "byteEnd": 13,
                                    "byteStart": 0
                                  }
                                },
                                {
                                  "features": [
                                    {
                                      "$type": "pub.leaflet.richtext.facet#underline"
                                    },
                                    {
                                      "$type": "pub.leaflet.richtext.facet#link",
                                      "uri": "https://developers.cloudflare.com/workers/configuration/routing/custom-domains/"
                                    }
                                  ],
                                  "index": {
                                    "byteEnd": 106,
                                    "byteStart": 102
                                  }
                                }
                              ],
                              "plaintext": "custom_domain - whether you want to let cloudflare set up DNS records and issue certs for you. Docs here"
                            }
                          }
                        ],
                        "content": {
                          "$type": "pub.leaflet.blocks.text",
                          "facets": [
                            {
                              "features": [
                                {
                                  "$type": "pub.leaflet.richtext.facet#code"
                                }
                              ],
                              "index": {
                                "byteEnd": 6,
                                "byteStart": 0
                              }
                            }
                          ],
                          "plaintext": "routes -"
                        }
                      }
                    ]
                  }
                }
              ],
              "startIndex": 1
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "This is how this website's wrangler config looks like:"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.code",
              "language": "json",
              "plaintext": "{\n  \"name\": \"til-kranti-me\",\n  \"assets\": { \"directory\": \"public\" },\n  \"compatibility_date\":\"2025-09-14\",\n  \"routes\": [\n    { \"pattern\": \"til.kranti.me\", \"custom_domain\": true }\n  ]\n}"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.orderedList",
              "children": [
                {
                  "$type": "pub.leaflet.blocks.orderedList#listItem",
                  "content": {
                    "$type": "pub.leaflet.blocks.text",
                    "facets": [
                      {
                        "features": [
                          {
                            "$type": "pub.leaflet.richtext.facet#code"
                          }
                        ],
                        "index": {
                          "byteEnd": 20,
                          "byteStart": 5
                        }
                      }
                    ],
                    "plaintext": "Run wrangler deploy and that's it! 🎉"
                  }
                }
              ],
              "startIndex": 3
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": "All for at-cost domain I bought (rent?) from Cloudflare. Thanks Cloudflare!"
            }
          },
          {
            "$type": "pub.leaflet.pages.linearDocument#block",
            "block": {
              "$type": "pub.leaflet.blocks.text",
              "plaintext": ""
            }
          }
        ],
        "id": "019e36a3-f903-788e-8180-4c90087bb3b6"
      }
    ]
  },
  "description": "",
  "path": "/3mm2qfcvzik2x",
  "publishedAt": "2025-09-14T16:02:00.000Z",
  "site": "at://did:plc:ae7cda4jeyeep6vrz3r2aptf/site.standard.publication/3mm2pnqkllc2j",
  "tags": [
    "til"
  ],
  "title": "Deploying Static Website using Cloudflare Workers"
}