This repository contains the source code for the Opener Initiative's website.
The easiest way to get a working environment is the included dev container (VS Code -> "Reopen in Container"), which provides Bun and all dependencies.
Otherwise, with Bun installed:
bun install # install dependencies
bun run dev # start Astro dev server at http://localhost:8080Other useful commands include:
bun run build # production build -> dist/
bun run preview # serve the production build locally
bun run check # type-check
bun run lint # lintThis project is built with:
- Astro
- TypeScript
- React
- shadcn-ui
- Tailwind CSS
├── public/ static files (favicon, robots.txt)
└── src/
├── assets/ logos and images
├── components/ Astro and React components
├── content/ news posts
├── layouts/ page shell
├── lib/ shared helpers
├── pages/ routes
├── content.config.ts news collection schema
└── index.css global styles and light/dark themes
Every post is a folder under src/content/news/, sorted into year and month (zero-padded):
src/content/news/2049/11/dect-world/
├── index.md the post
├── hero.png the cover picture
└── booth.png any other images
The folder name becomes the address, here /news/2049/11/dect-world/.
index.md starts with a header block between --- lines, followed by the post text in Markdown:
---
title: "DECT World 2049: A resounding success"
description: "A one-sentence summary. Shown on post cards and in the RSS feed."
pubDate: 2049-11-05
image: "./hero.png"
imageAlt: "Opener team members demoing the stack at DECT World 2049"
---
Post text. Start headings at `##`, and reference images like this:
Good to know:
pubDateis a plain date (YYYY-MM-DD). Posts are ordered by it, newest first, and it must agree with the post's year and month folders.imageis the post's cover picture andimageAltits description for screen readers. Make it 1200 × 630 pixels, or post cards and link previews will crop it. Leave both out for a text-only post, but never one of them.- Add
draft: trueto the header block to hide a post from the published site. - A finished post appears on the home page, in the newsroom, and in the RSS feed automatically. Nothing else to edit.
If something is wrong or missing, the build stops and says what and where.