Most personal sites reach for a CMS or a hosted backend the moment they need an archive. This one keeps the entire loop inside the repository: the pages are Astro components, the writing is Markdown and MDX, and a small Node service handles editing and publishing without a database. Each section below names the files involved, and the how this site is built article follows the same loop step by step.
Why publish a bilingual site without a CMS?
A CMS earns its keep when many editors and dynamic features are involved. For a single author who writes mostly prose, it adds a database, a plugin surface and a runtime to maintain. Pre-rendering the pages removes all of that: the browser receives finished HTML, the content stays in version control, and search engines and AI answer engines can parse every page without executing JavaScript. The trade-off is that publishing means a rebuild rather than a click in a browser editor.
How is the site generated, edited and released?
Astro compiles every route to HTML at build time. A separate zero-dependency Node service under admin/ manages content and produces new releases, and nginx serves whichever release the current symlink points at. That symlink is replaced only after a build succeeds, so a broken build never reaches visitors.
The project is organised in four layers:
- Presentation — Astro routes in
src/pages/render the home, about, projects, journal, tags and contact pages, plus404,sitemap.xml,robots.txt,llms.txt, per-language RSS and a web manifest. - Content — Markdown and MDX under
src/content/{projects,journal}/{en,fa}, validated by the schema insrc/content.config.ts. - SEO/AEO —
src/lib/seo.tsturns each entry into page metadata, an Open Graph/Twitter card and a JSON-LD@graph. - Admin and deploy — the Node service in
admin/edits content and builds releases, whichdeploy/serves through nginx.

The publishing path is:
Obsidian ─Vergo MDX Studio─► /api/studio ─► Inbox ─(approve)─► src/content ─► astro build ─► releases/<ts> ─► current (symlink)
Dashboard (/admin) ─► content-meta/overrides.json ─► same build
What can the site and its admin do?
| Capability | What it does | Where it lives |
|---|---|---|
| Bilingual pages | English and Persian, with RTL and hreflang when a pair shares a translationKey |
src/content/, src/lib/content.ts |
| SEO/AEO metadata | Title, description, keywords, canonical, Open Graph, Twitter cards and JSON-LD per page | src/lib/seo.ts |
| Machine-readable outputs | sitemap.xml (hreflang + lastmod), robots.txt, llms.txt, RSS, web manifest |
src/pages/ |
| Built-in MDX components | Callout, Card, Tabs/Tab, YouTube, AudioPlayer, VideoPlayer — no import needed |
src/lib/mdx-components.ts |
| Admin dashboard | Edit SEO, media, translations, draft/disabled status, analytics and rollback | admin/ |
| Obsidian publishing | Write MDX in Obsidian, compile and send it, then approve it in the dashboard inbox | admin /api/studio/ endpoints |
| Atomic releases | Each build lands in releases/<timestamp>; the current symlink flips only on success |
admin/lib/build.mjs |
Content authoring
Content is Markdown or MDX with frontmatter validated by src/content.config.ts. Files are written by the admin ingest endpoint or by the dashboard; SEO and status overrides live separately in content-meta/overrides.json so re-publishing never erases a dashboard edit.
Validation
Every Obsidian submission and dashboard edit is checked against admin/lib/policy.mjs: only the built-in components, no imports or export, and no server-side APIs (process, require, fetch, …). Fenced code is ignored by the rules.
Deploy
admin/lib/build.mjs runs the build into a fresh directory, checks for index.html, then moves it to releases/<timestamp> and atomically replaces the current symlink. A failed build never touches the live site.
How do I run it locally?
Requirements: Node.js 20 or newer (the CI pipeline builds on Node 22) and npm. No other runtime is required; the admin service uses only the Node standard library.
git clone https://github.com/vergoboy/arman-hosseini.git
cd arman-hosseini
npm ci
npm run dev # local dev server
npm run build # astro check && astro build → dist/
npm test # admin API tests (node --test admin/test/*.test.mjs)
The validated package.json scripts are:
| Script | Command | Purpose |
|---|---|---|
npm run dev |
astro dev |
Local development server |
npm run build |
astro check && astro build |
Type-check and build to dist/ |
npm run preview |
astro preview |
Preview the built output |
npm test |
node --test admin/test/*.test.mjs |
Admin API tests |
npm run admin |
node admin/server.mjs |
Start the admin service (defaults to 127.0.0.1:4322) |
npm run deploy |
bash scripts/deploy.sh |
Build and rsync dist/ to the server as a new release |
Which environment variables can I change?
The admin service and the build read a small set of environment variables. Names only — never store secrets in the repository.
| Variable | Purpose | Default |
|---|---|---|
SITE_DIR |
Root of the site source | the project root |
DATA_DIR |
Admin data directory (sessions, builds, inbox) | ./.admin-data |
RELEASES_DIR |
Where built releases are stored | ./releases |
CURRENT_LINK |
Symlink nginx serves | ./current |
ADMIN_HOST |
Admin bind address | 127.0.0.1 |
ADMIN_PORT |
Admin port | 4322 |
BUILD_CMD |
Command the admin runs to build | npm run build:site |
KEEP_RELEASES |
How many releases to keep | 5 |
SITE_URL |
Canonical site URL | https://arman-hosseini.ir |
Deployment settings that are not secrets live in deploy.config.json (host, port, user, remotePath, identityFile, localDir, buildCommand, exclude). Any credential belongs in the git-ignored .env; scripts/deploy.sh refuses to run if deploy.config.json contains a password, passphrase, private key, token or secret field.
A static site or WordPress: which fits?
Both can publish text across many categories. The trade-off is operational weight versus editing convenience.
| Aspect | arman-hosseini.ir | WordPress |
|---|---|---|
| Runtime | Static files served by nginx | PHP + a database |
| Dependencies | Node.js at build time; admin uses no npm packages | Plugins and a database to maintain |
| Editing | Markdown/MDX files, dashboard, or Obsidian | Browser admin UI |
| Performance | Pre-rendered HTML; no per-request rendering | Rendered per request (caching needed) |
| Interactivity | None in content (static site) | Plugins and themes |
| Best for | One author, text-heavy, fast, low-maintenance | Many editors, plugin ecosystem, dynamic features |
A static site is the wrong choice if you need user accounts, comments or content that must change per request without a rebuild. arman-hosseini.ir intentionally has none of those.
Who maintains it and how can I contribute?
The project is written and maintained by Arman Hosseini; you can read more on the about page. It is licensed under GPL-3.0-or-later (the repository ships the GNU General Public License version 3). Source and issue tracking are on GitHub:
Because the project is licensed under the GPL, contributions are accepted under the same terms. Security notes and the secrets policy are documented in the repository README. To go deeper, read how the site is built, or browse the projects and the homepage.