DocsLit 0.1.1 to 0.1.4: the first week of fixes
A roundup of DocsLit 0.1.1 to 0.1.4: reliable code blocks, new components, dark mode and mobile sidebar, security hardening, shareable anchors and a licence.
The first few DocsLit releases came quickly, mostly to make the basics solid. Here is what changed across 0.1.1 to 0.1.4.
0.1.1: code blocks and more components
The wc-code-block component now captures the raw source of its children before the browser renders them. Code examples show as literal source, so angle brackets no longer disappear. See code blocks.
This release also adds file trees (wc-files, wc-dir, wc-file), visual trees (wc-tree), download buttons, copy-to-clipboard, anchor links and version badges. Start with file trees. A preview script lets you browse every built-in component example locally.
0.1.2: themes, mobile and offline
wc-cardandwc-tileaccept aniconNameattribute (cards and tiles).- Every built-in component follows the dark and light theme toggle.
- The sidebar works on phones and tablets, with a hamburger button and an overlay.
- Page navigation updates the address bar, so the back button and bookmarks work.
- Lit is bundled locally instead of loaded from a CDN, so docs work offline with no external requests.
0.1.3: a licence
0.1.3 made DocsLit open source under the GNU Affero General Public License v3.0 (AGPL-3.0). It was free for personal and open source projects, and the docs you generate were always yours.
Update: since 0.1.11, DocsLit is licensed under Apache-2.0.
0.1.4: polish and security
- A changelog now ships with the tool.
- Fixes for
wc-view-panelpadding,wc-treeconnecting lines,wc-fileshighlight contrast in light mode andwc-anchorinline layout. See tabs and accordions for panels. - The local dev server blocks reads outside your docs folder, page metadata is sanitised, and the auth token is stored with restricted file permissions.
- Clicking a heading in the "On this page" sidebar updates the address bar with the anchor, so you can share a direct link.
Upgrade
Full details are in the changelog. Upgrade with npm install -g docslit@latest, or run npx docslit@latest.