fluffos/docs/efun/contrib
Yucong Sun 89060c5a6b
docs: fully-expandable generated sidebar + Chinese docs via Docusaurus i18n (#1246)
* docs: fully-expandable generated sidebar, replacing index.md link pages

Rework docs navigation so the sidebar expands to every page of every
reference tree, instead of terminating at generated index.md link lists:

- New docs/gen_sidebar.py (replaces gen_index.py + update_index.sh):
  walks efun/, apply/, stdlib/, concepts/, driver/, cli/ and zh-CN/ and
  emits sidebars.generated.json — a full Docusaurus category tree per
  directory. Category landing pages are now `generated-index` card pages
  (title/description/slug), so all generated index.md files are deleted.
  --check mode verifies freshness; new .github/workflows/docs-sidebar.yml
  runs it in CI.
- New docs/sidebar_meta.json holds curated presentation: category labels,
  one-line descriptions (shown on the landing cards), explicit ordering
  (driver/cli/concepts read top-down from user-facing to internals) and
  per-page label overrides.
- sidebars.ts becomes a hand-authored skeleton (Getting Started, lpc/,
  Historical) that splices in the generated trees.

Content reorganization (from a docs-wide review):
- Move misplaced efun pages out of efun/general: terminal/protocol efuns
  (act_mxp, send_zmp, request_term_*) to interactive/, debugging efuns
  (check_memory, dump_*, clear_debug_level, destructed_objects) to
  internals/, shallow_inherit_list to system/.
- Delete stub duplicates superseded by complete pages elsewhere:
  general/parse_{add_synonym,dump,my_rules,remove}, contrib/{shuffle,
  element_of}.

Modernize key pages with MDX:
- index.mdx: landing page with a card grid linking each doc section.
- build.mdx: per-platform <Tabs> (Ubuntu/macOS/Windows/Alpine+Docker),
  admonitions, VitePress [[toc]] leftover removed, stale per-platform CI
  workflow links updated to the unified ci.yml.
- ffi-plan.md: GitHub-style [!CAUTION] alert converted to an admonition.

`npm run build` passes clean (onBrokenLinks: throw, no warnings).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0174GM2azvAHBmvyESwxm5om

* docs: serve the Chinese corpus through Docusaurus i18n

Move the zh-CN/ directory out of the default docs tree and into a proper
Docusaurus locale (i18n/zh-CN/docusaurus-plugin-content-docs/current/):

- The flat zh-CN/efun/ directory (333 pages) is re-homed to mirror the
  categorized English layout (name-matched 1:1; `hash` maps to strings/
  per its own frontmatter). apply/ pages map 1:1; the stray English-text
  zh-CN/apply/master/view_errors.md documents a MudOS-era apply that no
  longer exists in the driver and is dropped; stdlib/db/database_zh.md
  becomes the i18n translation of stdlib/db/database.md; the Chinese
  build guide becomes the translation of build.mdx.
- Untranslated pages automatically fall back to English content under
  /zh-CN/, so the whole site is navigable in either locale from the new
  navbar locale dropdown.
- Both locales share one sidebar. Generated sidebar items now carry
  stable `key` fields (the directory/doc path) so translation keys are
  unique (both efun/ and stdlib/ have an "Arrays" category, crypto and
  strings both document `hash`). Category labels, generated-index
  titles/descriptions, navbar and footer are translated in
  i18n/zh-CN/...; theme UI strings come from Docusaurus' bundled
  zh-Hans translations. Translated landing page at /zh-CN/.
- The "中文文档" sidebar section, the zh-CN tree in gen_sidebar.py /
  sidebar_meta.json, and its slice of sidebars.generated.json are gone.
- Relative .md-file links on pages that render in both locales break
  the localized build (the file->permalink map points at the localized
  copy), so concepts/, the two socket_*_option pages and the config.md
  generator now emit extension-less route links instead.
- zh interactive.md/objects.md get explicit slugs like their English
  counterparts (a doc named after its parent directory is otherwise a
  Docusaurus category-index doc, colliding with the generated-index
  route).

`npm run build` builds both locales clean (onBrokenLinks: throw).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0174GM2azvAHBmvyESwxm5om

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-07-11 17:20:25 -04:00
..
abs.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
add_a.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
assemble_class.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
base_name.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
classes.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
compressedp.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
copy.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
debug_message.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
disassemble_class.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
event.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
fetch_class_member.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
fetch_variable.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
file_length.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
function_owner.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
functions.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
get_garbage.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
get_os_env.md contrib: get_os_env()/set_os_env() with config allow-lists 2026-07-11 00:58:09 -04:00
heart_beats.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
is_daylight_savings_time.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
max.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
memory_summary.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
min.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
named_livings.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
network_stats.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
num_classes.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
pluralize.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
program_info.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
query_charmode.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
query_ip_port.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
query_multiple_short.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
query_notify_fail.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
query_num.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
query_replaced_program.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
real_time.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
reference_allowed.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
remove_charmode.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
remove_get_char.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
remove_interactive.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
remove_shadow.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
repeat_string.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
replace.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
replace_dollars.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
replace_html.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
replace_mxp.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
replace_objects.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
replaceable.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
restore_from_string.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
roll_MdN.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
roulette_wheel.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
send_nullbyte.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
set_os_env.md contrib: get_os_env()/set_os_env() with config allow-lists 2026-07-11 00:58:09 -04:00
set_prompt.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
store_class_member.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
store_variable.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
string_difference.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
terminal_colour.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
test_load.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
upper_case.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
variables.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
vowel.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00
zonetime.md Add local search and documentation guide for docs site (#1221) 2026-07-09 22:09:55 -04:00