Add your first article

Start from a website example, edit the English and Traditional Chinese content, and check the result before publishing.

Knowledge base example · Use this guide as a starting point for maintaining and extending this website.

1. Copy a content folder

For a blog article, copy src/blog/ai-action-launch/ for the default layout or src/blog/custom-article/ for a free layout. For a knowledge base article, copy src/kb/publishing-guide/. Set draft: true in every copied HTML file first, so unfinished content stays out of production output.

Update pageId, translationKey, title, description and permalink at the top of each file. Each page ID and URL must be unique. Language versions of the same article share one translation key.

2. Write each language independently

This example uses index.njk for Traditional Chinese and index.en.njk for English. Each file is written on its own; if an article has no translation, keep only the language you have written.

Knowledge base articles use a fixed template: the title, body, category sidebar, table of contents and previous and next links all come from the shared layout, with no custom CSS or JavaScript. When you need a free layout, write it as a blog article in the free layout.

Give each h2 and h3 an id so the table of contents on the right can link to it. Knowledge base articles use a numeric order. Category names can be translated; a shared categoryKey pairs the category across languages.

3. Check the result before publishing

When a version is ready, set draft: false in its file, then run:

npm run ci
npm run preview

Review the preview, then run this command. It repeats the complete checks and publishes to alpha-v5.eagle.cool only when they pass:

npm run deploy-cloudflare

Use npm run deploy-cloudflare -- --check-only to check without uploading. Publishing includes uncommitted changes and new files that Git does not ignore, so save the content you intend to publish first. The command does not commit, push or merge pull requests. Pushing main does not automatically publish the production website.

Commit, push and open a pull request separately when you need to save and review the code. Lists, categories, language switches, RSS, the sitemap and the search index update with the build.

See the free-layout article example

Search articles

Enter keywords to find an article.

↑ ↓ Select · Enter Open article · Esc Close