mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-09-10 10:09:46 +10:00
Port Docs-Viewer to slatehtml as the docs-viewer package.
Replace the classic DOM shell with slate widgets, markdown→slate rendering, and a CI index build that uses build-docs.cjs.
This commit is contained in:
24
demo/main.js
Normal file
24
demo/main.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import "slatehtml";
|
||||
|
||||
import "slatehtml-ui/icon";
|
||||
import "slatehtml-ui/side-bar";
|
||||
import "slatehtml-ui/progress";
|
||||
import "slatehtml-ui/alert";
|
||||
import "slatehtml-ui/divider";
|
||||
import "slatehtml-ui/bottom-nav";
|
||||
import "slatehtml-ui/bottom-nav-item";
|
||||
import "slatehtml-ui/collapse";
|
||||
|
||||
import { configure } from "slatehtml-ui/configure";
|
||||
import { fontAwesomeSvg } from "slatehtml-ui/icons/fontawesome";
|
||||
import { mountDocs } from "../src/index.js";
|
||||
import "../src/prose.css";
|
||||
import "./site.css";
|
||||
|
||||
configure({
|
||||
icons: fontAwesomeSvg,
|
||||
iconSize: "15",
|
||||
});
|
||||
|
||||
await mountDocs("slate-docs-viewer", { indexUrl: "./index.json" });
|
||||
document.documentElement.setAttribute("data-ready", "");
|
||||
Reference in New Issue
Block a user