16 Commits
Author SHA1 Message Date
DolanandClaude Opus 5.5 c169dd1a83 feat: live examples in the docs, which run, draw the document next to the code, and can be edited and downloaded (#3556)
* feat: live examples in the docs, which run, draw the document next to the code, and can be edited and downloaded

The docs' code examples were plain snippets, often fragments that couldn't run. A code block marked ```ts live is now
an example readers can see and change: the page runs it with docx, draws the document it makes next to the code with
docx-preview, and offers the .docx to download. Clicking the code opens an editor (Monaco) that knows docx's types,
the pages are drawn again as the code changes, and View closes the editor. Split, Code and Preview show the code and
the pages side by side, or one of them. The demos a page includes are live too.

Every example in the docs that builds or patches a document is now live: 443 of them, each a whole file with its
imports, so it runs as written. Code about other things, such as installing, bundlers or servers, stays plain.

Running them showed docs that were wrong, fixed here:
- Landscape: docx swaps a landscape page's width and height itself, so the docs' swapped sizes made a tall page
  marked as landscape
- Comments: `comments.children` takes plain objects, not `new Comment(...)`
- Custom properties are text only
- APIs that no longer exist: MathText, Row, `.then` on Packer.toStream, patchDocument(buffer, ...),
  createParagraph().heading1(), a border's `value`, TextRun's `.break()`
- The templates and patcher examples read files that aren't in the repository. They now patch the templates in
  demo/assets, or make their own

`npm run build.docs` copies docx's browser builds into docs/live-examples/lib, so the docs use the docx they
describe, and the Pages workflow runs it. The folder is gitignored, and cspell and ESLint skip it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ

* docs: the bullet examples draw a bullet, and the patcher's usage writes the patched document

"ὠ" is U+1F60, a Greek omega, since \u takes four hex digits, so the two live bullet examples on
the numbering page drew it as each item's bullet. They use "•" now. The patcher's usage example
now awaits patchDocument and writes the document it makes, as the example after it does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 13:00:29 +01:00
DolanandClaude Opus 5.5 aae3a32160 docs: the sidebar lists a page's child pages only once that page or one of its children is open (#3557)
Charts has nineteen child pages, and the sidebar listed them all on every page. A page's
child pages now stay hidden until the reader opens that page or one of its children.
Section titles without a page of their own, like Styling, stay open.


Claude-Session: https://claude.ai/code/session_01TmyffPd5QMJYjXiMBQ3EnZ

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 12:50:52 +01:00
DolanandClaude Fable 5.1 0e09be861d docs: fix "Get Started" cover link and GitHub corner overlap (#3518)
The cover page linked to "#Welcome", but the README heading was renamed to
"Welcome to docx", so docsify resolved it to "#/?id=welcome" which matches
nothing. Point it at the current heading id instead.

Also lift the GitHub corner above the cover page. The theme gives both
".cover-main" and ".github-corner" z-index 1 and the cover is rendered later
in the DOM, so once scrolled the cover overlapped the corner and made the
link unclickable.

Fixes #3477

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-23 17:55:04 +01:00
Dolan 3539c06e92 docs: Improve inline docs and docs website (#3353)
* docs: Improve inline docs and docs website

* Fix lint

* Fix spelling
2026-02-14 03:54:25 +00:00
Dolan Miu a368ed7fd3 Add docsify-terminal-block to documentation 2023-06-15 21:29:10 +01:00
Dolan Miu 6288bb0701 Bump sign off sheet 2023-06-14 02:48:56 +01:00
Dolan Miu 6362b498a6 Add docsify sign off sheet 2023-03-30 20:14:08 +01:00
Dolan 48724e5b08 Fix spelling 2022-07-31 15:23:06 +01:00
Dolan Miu 40c778d244 Add Carbon adverts 2022-07-29 00:29:54 +01:00
Dolan Miu 41acb475a9 Update documentation 2020-07-30 11:42:55 +01:00
boopathikumar 632f3cd19b Enabled dark and light mode with switch for docs using docsify-darklight-theme 2020-04-18 01:48:00 +05:30
Dolan 5efc9e383b Update index.html 2018-12-06 14:30:24 +00:00
Dolan 7d05d69707 Update documentation and README 2018-08-04 04:03:08 +01:00
Dolan 73267ac4e5 Add docsify documentation 2018-08-03 23:26:14 +01:00
Dolan 45a18742d7 moved documentation to gh-pages branch 2017-04-16 00:22:29 +01:00
Dolan 6c2abb4abc added typedoc generated docs 2017-04-16 00:07:16 +01:00