Skip to content

How to add or revise entries

All content on this site is plain text in the repository. Edit, push, and the site updates.

src/content/docs/
├── index.mdx Chinese home page
├── start/ Guides
├── encyclopedia/ Chinese entries
│ ├── index.mdx Index of entries
│ ├── medical-humanities.md
│ ├── narrative-medicine.md
│ ├── rita-charon.md
│ └── social-prescribing.md
├── about/ About and disclaimer
└── en/ English — identical structure
├── index.mdx
├── start/
├── encyclopedia/
└── about/

Rule: the Chinese and English trees must mirror each other exactly — same directories, same filenames. In a bilingual site, the most common failure is changing one language and forgetting the other.

Each entry is a .md file beginning with frontmatter:

---
title: Medical Humanities
description: The interdisciplinary field that uses the humanities to understand and improve medical practice.
sidebar:
label: Medical Humanities
badge: Draft — unreviewed
variant: caution
---
## In one sentence
Body text starts here.

Common fields:

Field Purpose Required
title Entry title, also used in search Yes
description Search-result summary, ideally under 60 characters Yes
sidebar.label Label shown in the sidebar No
sidebar.badge Sidebar badge, e.g. “Draft — unreviewed” No
sidebar.variant Badge colour: caution / tip / danger / success No
  1. In one sentence — an aside block giving the core definition
  2. Background — where the concept came from and who introduced it
  3. Main content — three to five second-level headings
  4. Controversies — where the scholarship disagrees
  5. In the Chinese context — if applicable
  6. Further reading — verifiable sources
edit files → preview locally → commit → push → deploy

Local preview (from the project directory):

终端窗口
npm install
npm run dev

Then open http://localhost:4321/ — Chinese at the root path, English under /en/.

Once satisfied:

终端窗口
git add .
git commit -m "New entry: X"
git push

The hosting platform rebuilds and publishes automatically, usually within a minute or two.

My change did not appear. Wait a minute or two for the build after pushing. If nothing changes after a while, confirm the push actually completed.

I forgot the English version. When you edit a Chinese file, update the matching file under src/content/docs/en/.

I want to reorder the sidebar. Edit the sidebar array in astro.config.mjs. Write both languages, using translations for the English side.