How to add or revise entries
How to add or revise entries
Section titled “How to add or revise entries”All content on this site is plain text in the repository. Edit, push, and the site updates.
1. Where entry files live
Section titled “1. Where entry files live”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.
2. Anatomy of an entry
Section titled “2. Anatomy of an entry”Each entry is a .md file beginning with frontmatter:
---title: Medical Humanitiesdescription: 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 |
3. Recommended structure
Section titled “3. Recommended structure”- In one sentence — an aside block giving the core definition
- Background — where the concept came from and who introduced it
- Main content — three to five second-level headings
- Controversies — where the scholarship disagrees
- In the Chinese context — if applicable
- Further reading — verifiable sources
4. Publishing workflow
Section titled “4. Publishing workflow”edit files → preview locally → commit → push → deployLocal preview (from the project directory):
npm installnpm run devThen open http://localhost:4321/ — Chinese at the root path, English under /en/.
Once satisfied:
git add .git commit -m "New entry: X"git pushThe hosting platform rebuilds and publishes automatically, usually within a minute or two.
5. Human review is not optional
Section titled “5. Human review is not optional”6. Common questions
Section titled “6. Common questions”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.