Official CodigoSH website — showcase and documentation of our self-hosted open-source projects. Built with Astro.
  • Astro 55.3%
  • TypeScript 22.3%
  • CSS 12.2%
  • Python 3.6%
  • JavaScript 2.8%
  • Other 3.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
k4wit0 653996ca35
All checks were successful
CI / build (push) Successful in 18s
fix(docs): an updated screenshot actually reaches people who have seen the page
Astro names a built asset after the URL it came from, not after what is inside
it, and the host serves those names with `cache-control: immutable, max-age=1
year`. Documentation images arrive from stable Forgejo raw URLs, so replacing
one in the repo left its published URL unchanged — and every reader whose
browser had already cached it went on being shown the old picture, for a year,
with no way to know. The animation on the bookmarks page was byte-identical on
the server and still wrong on screen.

The file's git hash now rides along on the URL as `?v=`, taken from the tree
listing that is already fetched, so the built name changes whenever the file
does. Forgejo ignores the extra parameter. Verified: grid.webp moved from
grid_1gXixU.webp to grid_CQYQF.webp on the next build.
2026-08-10 20:16:15 +02:00
.forgejo/workflows fix(ci): install git before checkout so the release job has a real repo 2026-07-27 21:46:30 +02:00
public perf(icons): size the brand mark for each place it is used 2026-07-30 22:54:31 +02:00
scripts fix(docs): an updated screenshot actually reaches people who have seen the page 2026-08-10 20:16:15 +02:00
src feat(docs): the documentation ends and looks like the rest of the site 2026-08-10 13:58:03 +02:00
.dockerignore Initial scaffold: Astro + Tailwind + Starlight site 2026-06-10 03:00:08 +02:00
.env.example Docs: clarify anonymous Forgejo reads (token optional) 2026-06-10 03:15:21 +02:00
.gitignore fix(release): don't abort the script on an empty cleanup commit 2026-07-31 00:04:58 +02:00
astro.config.mjs feat(docs): the documentation ends and looks like the rest of the site 2026-08-10 13:58:03 +02:00
bun.lock perf(fonts): self-host fonts with @fontsource, drop the Google Fonts CDN 2026-07-27 22:41:44 +02:00
Caddyfile perf(server): cache assets in tiers instead of five minutes for everything 2026-07-30 22:52:37 +02:00
CHANGELOG.md chore(release): bump to v1.2.3 2026-07-30 23:40:39 +02:00
Dockerfile chore: remove infra references and dead i18n code 2026-07-01 19:52:20 +02:00
LICENSE docs: add Apache-2.0 license to align with the other CodigoSH repos 2026-07-02 00:11:15 +02:00
NOTICE docs(licensing): align attribution with the CodigoSH convention 2026-07-27 23:16:17 +02:00
package.json feat: Earlier font loading and a smoother hero animation 2026-07-30 23:40:39 +02:00
README.md perf(server): cache assets in tiers instead of five minutes for everything 2026-07-30 22:52:37 +02:00
THIRD-PARTY-LICENSES.md chore(licensing): add OFL notices for bundled fonts and declare license 2026-07-27 23:05:32 +02:00
tsconfig.json tsconfig: exclude node_modules explicitly 2026-06-10 07:56:08 +02:00

codigosh-web

Official website for CodigoSH — a free-software collective building self-hosted, private tools. The site showcases the organization's projects hosted on Forgejo and their documentation, with a strong focus on SEO and performance.

Stack

  • Astro (static output) — content-first, zero JS by default.
  • Tailwind CSS v4 + the CodigoSH design system (src/styles/theme.css).
  • Starlight for the documentation served at /docs/.
  • English only — a single locale with no URL prefix. Shared chrome copy (nav, buttons, labels) is centralized in src/i18n/ui.ts.
  • Forgejo API integration at build time (src/lib/forgejo.ts).
  • Self-hosted as a static site served by Caddy.

Development

Requires Bun (≥ 1.3).

bun install
bun run dev        # local dev server
bun run sync-docs  # pull project docs from Forgejo into the docs collection
bun run build      # sync-docs + production build -> dist/
bun run preview    # preview the build
bun run check      # astro type/content check

The CodigoSH Forgejo instance allows anonymous API reads, so no token is required. If the API is unreachable the build falls back to bundled mock projects, so it always builds offline.

Configuration

Copy .env.example to .env and fill in as needed. See that file for the full list. The most relevant variables:

Variable Purpose
SITE_URL Canonical URL (canonical tags, sitemap, OG).
FORGEJO_URL Forgejo instance base URL.
FORGEJO_ORG Organization whose repos are listed.
FORGEJO_TOPIC Curated topic; only repos with it are shown.
FORGEJO_TOKEN Read-only API token (public repos).
FORGEJO_MOCK Force mock data (1/true).

Projects on the site

Projects are pulled at build time from Forgejo. Only repositories tagged with the showcase topic appear. Each one gets a landing page at /projects/<slug>/, built from the repo metadata plus an entry in the projects content collection (src/content/projects/) that holds the long-form copy and screenshots.

Documentation

Docs are not written in this repo. bun run sync-docs (which bun run build runs first) downloads the docs/ folder of every showcase project from the Forgejo API into src/content/docs/docs/<project>/, and generates src/generated/docs-sidebar.json for the Starlight sidebar. Both are generated and git-ignored — edit the docs in the project's own repository. The only hand-written page here is the docs landing, src/content/docs/docs/index.md.

The sync is non-fatal: if the API is unreachable it logs and continues, and FORGEJO_MOCK=1 skips it entirely (used by CI and offline builds).

Deployment

The included Dockerfile builds the static site with Bun and serves dist/ with Caddy on port 80. Set the build variables above and point the application's domain at the container.

The Caddyfile serves clean URLs and answers an unknown path with a real 404 (a static host that falls back to the 404 page with a 200 gets its dead URLs indexed). It also sets the security headers — HSTS, CSP, nosniff, referrer and framing policy — and caches in tiers: content-hashed assets under /_astro/ are immutable for a year, assets on stable paths last a day, and HTML stays at five minutes so a rebuild goes live quickly.

Because the docs are fetched at build time, republishing them is just a rebuild: a push to main here — or to a project repo whose docs/ changed — triggers the deploy webhook and the site comes back up with the new content.

.forgejo/workflows/ci.yml type-checks and builds every push to main with mock data; release.yml publishes a release when a v* tag is pushed.

License & credits

CodigoSH web is released under the Apache License 2.0 — see LICENSE.

It self-hosts the Inter, Space Grotesk and JetBrains Mono fonts, each under the SIL Open Font License 1.1. Full third-party notices live in NOTICE and THIRD-PARTY-LICENSES.md.