How to build a static site with Lume
Lume, a Deno-based static site generator, can produce a blog either from the prebuilt "Simple blog" theme or from scratch using Markdown posts, Nunjucks layouts in _includes, directory-level _data.yml variables, and a TypeScript index page that lists posts via the search helper. The site is deployed to Deno Deploy through a GitHub Actions workflow that runs `deno task build` and serves the `_site` output with deno_std's file_server.ts, or a custom serve.ts when Lume middleware is needed.
Related posts
- How to Build a Blog with Fresh
Deno mediumAdeptA markdown blog can be built with Fresh, Deno's edge-first framework that ships zero client JavaScript by default, using file-based routes, custom GET handlers and server-side rendering. Posts are read from a posts directory with Deno.readDir, front matter is parsed with the std library's extract, and individual posts are served via a dynamic [slug].tsx route that renders markdown through the gfm module with its stylesheet. The finished site deploys to Deno Deploy by linking a GitHub repo with main.ts as the entry point.
- How to setup a blog with Hugo and Deno Deploy
Deno mediumAdeptA Hugo static site can be published on Deno Deploy by building it in GitHub Actions and serving the generated public directory with Deno's standard-library file server, imported directly by URL with no download or compile step. The walkthrough covers installing Hugo, adding the ananke theme as a git submodule, creating posts, linking a GitHub repo to a Deno Deploy project in GitHub Actions mode, and a complete workflow YAML using peaceiris/actions-hugo and denoland/deployctl. Any static site generator works the same way, since Deno Deploy only needs to serve the built HTML files.
- Static Files on Deno Deploy
Deno mediumAdeptDeno Deploy now stores static files alongside deployed code and distributes them to edge locations, where edge code reads them via Deno file system APIs (readFile, readDir, open, stat, etc.) or fetch. Because user code still controls responses, static assets can be auth-gated, given CORS headers, rewritten dynamically or streamed, and std's serveFile or oak handle Content-Type and Range requests. Files come from a linked GitHub repo automatically, or from build output uploaded with deployctl or a GitHub Action using OIDC without secrets. A Lume static site example deploys in about 25 seconds from push, 15 of which is runner startup; automatic mode deploys take 1-10s.
- Build an Astro site with Deno
Deno mediumAdeptDeno 2's Node and npm compatibility lets you scaffold and run an Astro project entirely with Deno tooling: `deno -A npm:create-astro@latest` to scaffold, `deno install --allow-scripts` for dependencies, and `deno task dev` to run package.json scripts. The walkthrough builds a small dinosaur site with an index page generated from a JSON file and a dynamic SSR route (`[dinosaur].astro`) that reads `Astro.params` and redirects to 404 for unknown entries. One caveat: the Deno language server doesn't yet support `.astro` files, so editors may show false errors.
- A Whole Website in a Single JavaScript File, cont'd
Deno mediumAdeptA complete bagel-search web app with server-side rendered JSX, dynamic routes and form handling fits in one Deno JavaScript file. The landing page looks up the visitor's IP through IP-API to render their city and local time. Per-bagel pages use router's URLPattern-based `/bagels/:id` matching. Search is a plain GET form whose querystring the server parses to filter results, so the site needs no client-side JavaScript or build step.