@axerity/cli 0.1.4 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/axerity.js +70 -218
- package/dist/client/_app/immutable/assets/0.jCJXzoiy.css +1 -0
- package/dist/client/_app/immutable/assets/2.DZRzHaE1.css +1 -0
- package/dist/client/_app/immutable/assets/geist-cyrillic-ext-wght-normal.DjL33-gN.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-cyrillic-wght-normal.BEAKL7Jp.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-latin-ext-wght-normal.DC-KSUi6.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-latin-wght-normal.BgDaEnEv.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-cyrillic-ext-wght-normal.I4S5GZfc.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-cyrillic-wght-normal.BmXc_FBt.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-latin-ext-wght-normal.DrnZ1wKl.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-latin-wght-normal.B_7UjwxQ.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-symbols2-wght-normal.GZpp1pK2.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-mono-vietnamese-wght-normal.D8KDMBhC.woff2 +0 -0
- package/dist/client/_app/immutable/assets/geist-vietnamese-wght-normal.6IgcOCM7.woff2 +0 -0
- package/dist/client/_app/immutable/chunks/0CIKaoUA.js +139 -0
- package/dist/client/_app/immutable/chunks/0tC8Ubqr.js +2 -0
- package/dist/client/_app/immutable/chunks/29nvmPLe2.js +1 -0
- package/dist/client/_app/immutable/chunks/9IV9o0dV2.js +4 -0
- package/dist/client/_app/immutable/chunks/B-elEOLV.js +24 -0
- package/dist/client/_app/immutable/chunks/B1R9-4vu.js +89 -0
- package/dist/client/_app/immutable/chunks/B1eXHGII2.js +10 -0
- package/dist/client/_app/immutable/chunks/B2NKIbe62.js +206 -0
- package/dist/client/_app/immutable/chunks/B5Brrqz92.js +1 -0
- package/dist/client/_app/immutable/chunks/B6nymVS3.js +1 -0
- package/dist/client/_app/immutable/chunks/B8E5l9fg2.js +1 -0
- package/dist/client/_app/immutable/chunks/B8gBHxth2.js +1 -0
- package/dist/client/_app/immutable/chunks/BC8A8xkk.js +2 -0
- package/dist/client/_app/immutable/chunks/BGU5ZGjx.js +1 -0
- package/dist/client/_app/immutable/chunks/BLhBgXDr2.js +1 -0
- package/dist/client/_app/immutable/chunks/BNdlLOgu2.js +2 -0
- package/dist/client/_app/immutable/chunks/BQyPqLag.js +84 -0
- package/dist/client/_app/immutable/chunks/BRQspS80.js +162 -0
- package/dist/client/_app/immutable/chunks/BVz-DmJs2.js +132 -0
- package/dist/client/_app/immutable/chunks/BWPyau1x.js +1 -0
- package/dist/client/_app/immutable/chunks/BXD4L9Ly.js +9 -0
- package/dist/client/_app/immutable/chunks/B_Yg36qy2.js +1 -0
- package/dist/client/_app/immutable/chunks/BcuUc08l.js +292 -0
- package/dist/client/_app/immutable/chunks/BdsP84LY.js +231 -0
- package/dist/client/_app/immutable/chunks/Bie0X5s02.js +62 -0
- package/dist/client/_app/immutable/chunks/BifhSqXX.js +1 -0
- package/dist/client/_app/immutable/chunks/BjVjgMFk2.js +15 -0
- package/dist/client/_app/immutable/chunks/BpwmCo88.js +1 -0
- package/dist/client/_app/immutable/chunks/BxQVBtgJ.js +1 -0
- package/dist/client/_app/immutable/chunks/C2oEw9bf.js +34 -0
- package/dist/client/_app/immutable/chunks/C6Oj8XFW.js +1 -0
- package/dist/client/_app/immutable/chunks/C6v0vZRT2.js +36 -0
- package/dist/client/_app/immutable/chunks/C7H7uo1r.js +70 -0
- package/dist/client/_app/immutable/chunks/C8Fc0cco.js +1 -0
- package/dist/client/_app/immutable/chunks/CDfHwfr9.js +1 -0
- package/dist/client/_app/immutable/chunks/CEW3xh3M.js +124 -0
- package/dist/client/_app/immutable/chunks/CFNmf5NX.js +1 -0
- package/dist/client/_app/immutable/chunks/CGhzzHe4.js +1 -0
- package/dist/client/_app/immutable/chunks/CJMWL00f.js +1 -0
- package/dist/client/_app/immutable/chunks/CLrCY0qQ2.js +1 -0
- package/dist/client/_app/immutable/chunks/COu5VFF2.js +78 -0
- package/dist/client/_app/immutable/chunks/CSKSodPl2.js +1 -0
- package/dist/client/_app/immutable/chunks/CVNFCEpi.js +1 -0
- package/dist/client/_app/immutable/chunks/CWUJwgR2.js +1 -0
- package/dist/client/_app/immutable/chunks/CXC42hVj.js +70 -0
- package/dist/client/_app/immutable/chunks/CZqBFf11.js +30 -0
- package/dist/client/_app/immutable/chunks/CaWcga612.js +1 -0
- package/dist/client/_app/immutable/chunks/CcX7Oofq.js +1 -0
- package/dist/client/_app/immutable/chunks/Chn8RaCU2.js +1 -0
- package/dist/client/_app/immutable/chunks/CtmfIXf-.js +161 -0
- package/dist/client/_app/immutable/chunks/D0Co2O6p.js +7 -0
- package/dist/client/_app/immutable/chunks/D1O9pT8r.js +1 -0
- package/dist/client/_app/immutable/chunks/D1z0eUZA.js +3 -0
- package/dist/client/_app/immutable/chunks/D5KVydqU.js +1 -0
- package/dist/client/_app/immutable/chunks/D6jRqBbL.js +1 -0
- package/dist/client/_app/immutable/chunks/DDXR3Aw12.js +1 -0
- package/dist/client/_app/immutable/chunks/DG5yTEkY.js +1 -0
- package/dist/client/_app/immutable/chunks/DGHybmkM2.js +1 -0
- package/dist/client/_app/immutable/chunks/DITdNjTm.js +7 -0
- package/dist/client/_app/immutable/chunks/D_nZbl6c.js +162 -0
- package/dist/client/_app/immutable/chunks/Dg6QheNk.js +85 -0
- package/dist/client/_app/immutable/chunks/Dn1BfjD4.js +1 -0
- package/dist/client/_app/immutable/chunks/DpEnPnBc.js +1 -0
- package/dist/client/_app/immutable/chunks/Drl36yuV.js +40 -0
- package/dist/client/_app/immutable/chunks/Dt_5ZQE2.js +1 -0
- package/dist/client/_app/immutable/chunks/ED9-GWAc2.js +10 -0
- package/dist/client/_app/immutable/chunks/FqbQrHcz2.js +321 -0
- package/dist/client/_app/immutable/chunks/O1MNaiG9.js +3 -0
- package/dist/client/_app/immutable/chunks/PLsDE8Xa.js +24 -0
- package/dist/client/_app/immutable/chunks/PwGqCEPd.js +106 -0
- package/dist/client/_app/immutable/chunks/QmWylQL4.js +96 -0
- package/dist/client/_app/immutable/chunks/SbORYBuH.js +1 -0
- package/dist/client/_app/immutable/chunks/Vhh-h91d.js +257 -0
- package/dist/client/_app/immutable/chunks/Y3d8lUBM.js +120 -0
- package/dist/client/_app/immutable/chunks/aheLp5ES.js +32 -0
- package/dist/client/_app/immutable/chunks/dcFrWhgf.js +1 -0
- package/dist/client/_app/immutable/chunks/dqbyyLvi2.js +10 -0
- package/dist/client/_app/immutable/chunks/hFfQmBrk2.js +1 -0
- package/dist/client/_app/immutable/chunks/mktnrgVa.js +1 -0
- package/dist/client/_app/immutable/chunks/qD2cSsUD2.js +1 -0
- package/dist/client/_app/immutable/chunks/v-V-aVm52.js +43 -0
- package/dist/client/_app/immutable/chunks/wCc4pE4l.js +3 -0
- package/dist/client/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/dist/client/_app/immutable/entry/app.D6KBNU0y.js +2 -0
- package/dist/client/_app/immutable/entry/start.CQdeQUt-.js +1 -0
- package/dist/client/_app/immutable/nodes/0.DBZ13WOO.js +1 -0
- package/dist/client/_app/immutable/nodes/1.B_AZbN4M.js +1 -0
- package/dist/client/_app/immutable/nodes/2.OqcLisIf.js +28 -0
- package/dist/client/_app/version.json +1 -0
- package/dist/env.js +94 -0
- package/dist/handler.js +1494 -0
- package/dist/index.js +345 -0
- package/dist/server/chunks/0-oTZ8HCk-.js +40 -0
- package/dist/server/chunks/0-oTZ8HCk-.js.map +1 -0
- package/dist/server/chunks/1-nu6YvZRQ.js +9 -0
- package/dist/server/chunks/1-nu6YvZRQ.js.map +1 -0
- package/dist/server/chunks/2-YpqcBGyH.js +54 -0
- package/dist/server/chunks/2-YpqcBGyH.js.map +1 -0
- package/dist/server/chunks/Icon-D37LtZZG.js +186 -0
- package/dist/server/chunks/Icon-D37LtZZG.js.map +1 -0
- package/dist/server/chunks/_error.svelte-NKP81ks-.js +48 -0
- package/dist/server/chunks/_error.svelte-NKP81ks-.js.map +1 -0
- package/dist/server/chunks/_layout.svelte-2Eq-_AqW.js +31 -0
- package/dist/server/chunks/_layout.svelte-2Eq-_AqW.js.map +1 -0
- package/dist/server/chunks/_page.svelte-Chjw6C-d.js +2206 -0
- package/dist/server/chunks/_page.svelte-Chjw6C-d.js.map +1 -0
- package/dist/server/chunks/_server.ts-5K31OG2_.js +31 -0
- package/dist/server/chunks/_server.ts-5K31OG2_.js.map +1 -0
- package/dist/server/chunks/_server.ts-BRaXDyO1.js +29 -0
- package/dist/server/chunks/_server.ts-BRaXDyO1.js.map +1 -0
- package/dist/server/chunks/_server.ts-BuDGLKUC.js +213 -0
- package/dist/server/chunks/_server.ts-BuDGLKUC.js.map +1 -0
- package/dist/server/chunks/_server.ts-Bx1daJ1-.js +53 -0
- package/dist/server/chunks/_server.ts-Bx1daJ1-.js.map +1 -0
- package/dist/server/chunks/_server.ts-By7FRFNB.js +37 -0
- package/dist/server/chunks/_server.ts-By7FRFNB.js.map +1 -0
- package/dist/server/chunks/_server.ts-DIxsjlQ0.js +32 -0
- package/dist/server/chunks/_server.ts-DIxsjlQ0.js.map +1 -0
- package/dist/server/chunks/_server.ts-Dgpc__Yz.js +41 -0
- package/dist/server/chunks/_server.ts-Dgpc__Yz.js.map +1 -0
- package/dist/server/chunks/_server.ts-kWOJv5IZ.js +26 -0
- package/dist/server/chunks/_server.ts-kWOJv5IZ.js.map +1 -0
- package/dist/server/chunks/content-store-DV5Rlfo3.js +5252 -0
- package/dist/server/chunks/content-store-DV5Rlfo3.js.map +1 -0
- package/dist/server/chunks/docpage-BkHysAhp.js +5 -0
- package/dist/server/chunks/docpage-BkHysAhp.js.map +1 -0
- package/dist/server/chunks/exports-C0PApeP1.js +758 -0
- package/dist/server/chunks/exports-C0PApeP1.js.map +1 -0
- package/dist/server/chunks/hooks.server-BnfZljxX.js +42 -0
- package/dist/server/chunks/hooks.server-BnfZljxX.js.map +1 -0
- package/dist/server/chunks/internal-pc3wKdix.js +5374 -0
- package/dist/server/chunks/internal-pc3wKdix.js.map +1 -0
- package/dist/server/chunks/mdfile-DBiwGtNY.js +5 -0
- package/dist/server/chunks/mdfile-DBiwGtNY.js.map +1 -0
- package/dist/server/chunks/site-CmugjRXT.js +57 -0
- package/dist/server/chunks/site-CmugjRXT.js.map +1 -0
- package/dist/server/index.js +4356 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/manifest.js +103 -0
- package/dist/server/manifest.js.map +1 -0
- package/dist/shims.js +32 -0
- package/package.json +24 -16
- package/runtime/crawl.js +58 -0
- package/runtime/preview.js +42 -0
- package/runtime/serve.js +78 -0
- package/runtime/static.js +76 -0
- package/mdsvex.config.js +0 -261
- package/scripts/prepare-engine.mjs +0 -20
- package/src/app.d.ts +0 -17
- package/src/app.html +0 -39
- package/src/content/demo/api/meta.json +0 -5
- package/src/content/demo/api/pet/add-pet.md +0 -105
- package/src/content/demo/api/pet/delete-pet.md +0 -70
- package/src/content/demo/api/pet/find-by-status.md +0 -72
- package/src/content/demo/api/pet/find-by-tags.md +0 -64
- package/src/content/demo/api/pet/get-pet.md +0 -99
- package/src/content/demo/api/pet/meta.json +0 -15
- package/src/content/demo/api/pet/pet-object.md +0 -112
- package/src/content/demo/api/pet/update-pet-with-form.md +0 -69
- package/src/content/demo/api/pet/update-pet.md +0 -79
- package/src/content/demo/api/pet/upload-image.md +0 -79
- package/src/content/demo/api/store/delete-order.md +0 -62
- package/src/content/demo/api/store/get-order.md +0 -70
- package/src/content/demo/api/store/inventory.md +0 -54
- package/src/content/demo/api/store/meta.json +0 -5
- package/src/content/demo/api/store/order-object.md +0 -77
- package/src/content/demo/api/store/place-order.md +0 -83
- package/src/content/demo/api/user/create-user.md +0 -69
- package/src/content/demo/api/user/create-with-list.md +0 -57
- package/src/content/demo/api/user/delete-user.md +0 -61
- package/src/content/demo/api/user/get-user.md +0 -69
- package/src/content/demo/api/user/login.md +0 -80
- package/src/content/demo/api/user/logout.md +0 -45
- package/src/content/demo/api/user/meta.json +0 -14
- package/src/content/demo/api/user/update-user.md +0 -69
- package/src/content/demo/api/user/user-object.md +0 -85
- package/src/content/demo/changelog.md +0 -44
- package/src/content/demo/components/accordion.md +0 -70
- package/src/content/demo/components/api.md +0 -185
- package/src/content/demo/components/badge.md +0 -34
- package/src/content/demo/components/callout.md +0 -83
- package/src/content/demo/components/cards.md +0 -88
- package/src/content/demo/components/code-group.md +0 -55
- package/src/content/demo/components/columns.md +0 -42
- package/src/content/demo/components/frame.md +0 -51
- package/src/content/demo/components/icon.md +0 -54
- package/src/content/demo/components/kbd.md +0 -28
- package/src/content/demo/components/meta.json +0 -26
- package/src/content/demo/components/roadmap.md +0 -86
- package/src/content/demo/components/steps.md +0 -72
- package/src/content/demo/components/tabs.md +0 -146
- package/src/content/demo/components/tooltip.md +0 -44
- package/src/content/demo/components/tree.md +0 -83
- package/src/content/demo/components/type-table.md +0 -77
- package/src/content/demo/components/update.md +0 -48
- package/src/content/demo/components/video.md +0 -56
- package/src/content/demo/components/webhooks.md +0 -109
- package/src/content/demo/components/websockets.md +0 -101
- package/src/content/demo/configuration/ai.md +0 -40
- package/src/content/demo/configuration/cli.md +0 -48
- package/src/content/demo/configuration/deployment.md +0 -105
- package/src/content/demo/configuration/index.md +0 -92
- package/src/content/demo/configuration/layouts.md +0 -51
- package/src/content/demo/configuration/meta.json +0 -5
- package/src/content/demo/configuration/navigation.md +0 -167
- package/src/content/demo/configuration/openapi.md +0 -103
- package/src/content/demo/configuration/search.md +0 -36
- package/src/content/demo/index.md +0 -59
- package/src/content/demo/installation.md +0 -66
- package/src/content/demo/meta.json +0 -15
- package/src/content/demo/quick-start.md +0 -47
- package/src/content/demo/theming/advanced.md +0 -116
- package/src/content/demo/theming/code.md +0 -66
- package/src/content/demo/theming/colors.md +0 -103
- package/src/content/demo/theming/index.md +0 -88
- package/src/content/demo/theming/layout.md +0 -71
- package/src/content/demo/theming/meta.json +0 -5
- package/src/content/demo/theming/themes.md +0 -99
- package/src/content/demo/theming/typography.md +0 -83
- package/src/content/demo/writing/code-blocks.md +0 -154
- package/src/content/demo/writing/diagrams.md +0 -44
- package/src/content/demo/writing/frontmatter.md +0 -33
- package/src/content/demo/writing/markdown.md +0 -62
- package/src/content/demo/writing/meta.json +0 -5
- package/src/hooks.server.ts +0 -49
- package/src/lib/assets/favicon.svg +0 -1
- package/src/lib/base.ts +0 -12
- package/src/lib/components/DynamicIcon.svelte +0 -41
- package/src/lib/components/docs/Analytics.svelte +0 -38
- package/src/lib/components/docs/Banner.svelte +0 -44
- package/src/lib/components/docs/Breadcrumbs.svelte +0 -38
- package/src/lib/components/docs/CopyPageMenu.svelte +0 -119
- package/src/lib/components/docs/DocsLayout.svelte +0 -192
- package/src/lib/components/docs/Footer.svelte +0 -60
- package/src/lib/components/docs/Mermaid.svelte +0 -39
- package/src/lib/components/docs/Navbar.svelte +0 -144
- package/src/lib/components/docs/PageMeta.svelte +0 -35
- package/src/lib/components/docs/PageNav.svelte +0 -44
- package/src/lib/components/docs/SearchDialog.svelte +0 -182
- package/src/lib/components/docs/Sidebar.svelte +0 -85
- package/src/lib/components/docs/SidebarDropdown.svelte +0 -56
- package/src/lib/components/docs/SidebarFooterLinks.svelte +0 -19
- package/src/lib/components/docs/SidebarGroup.svelte +0 -54
- package/src/lib/components/docs/SidebarLink.svelte +0 -67
- package/src/lib/components/docs/TableOfContents.svelte +0 -77
- package/src/lib/components/docs/ThemeToggle.svelte +0 -19
- package/src/lib/components/docs/VersionSwitcher.svelte +0 -80
- package/src/lib/components/kit/Accordion.svelte +0 -60
- package/src/lib/components/kit/AccordionGroup.svelte +0 -13
- package/src/lib/components/kit/Badge.svelte +0 -32
- package/src/lib/components/kit/Callout.svelte +0 -51
- package/src/lib/components/kit/Card.svelte +0 -72
- package/src/lib/components/kit/CardGroup.svelte +0 -21
- package/src/lib/components/kit/CodeGroup.svelte +0 -65
- package/src/lib/components/kit/Columns.svelte +0 -26
- package/src/lib/components/kit/Event.svelte +0 -23
- package/src/lib/components/kit/EventList.svelte +0 -9
- package/src/lib/components/kit/File.svelte +0 -15
- package/src/lib/components/kit/Folder.svelte +0 -46
- package/src/lib/components/kit/Frame.svelte +0 -81
- package/src/lib/components/kit/Icon.svelte +0 -17
- package/src/lib/components/kit/Kbd.svelte +0 -11
- package/src/lib/components/kit/Roadmap.svelte +0 -15
- package/src/lib/components/kit/RoadmapItem.svelte +0 -109
- package/src/lib/components/kit/Step.svelte +0 -63
- package/src/lib/components/kit/Steps.svelte +0 -16
- package/src/lib/components/kit/Tab.svelte +0 -27
- package/src/lib/components/kit/Tabs.svelte +0 -75
- package/src/lib/components/kit/Tooltip.svelte +0 -33
- package/src/lib/components/kit/Tree.svelte +0 -11
- package/src/lib/components/kit/TypeTable.svelte +0 -187
- package/src/lib/components/kit/Update.svelte +0 -32
- package/src/lib/components/kit/Video.svelte +0 -64
- package/src/lib/components/kit/accordion-context.ts +0 -1
- package/src/lib/components/kit/api/Api.svelte +0 -80
- package/src/lib/components/kit/api/ApiExamplePanel.svelte +0 -100
- package/src/lib/components/kit/api/ApiField.svelte +0 -124
- package/src/lib/components/kit/api/Channel.svelte +0 -121
- package/src/lib/components/kit/api/Endpoint.svelte +0 -116
- package/src/lib/components/kit/api/Enum.svelte +0 -44
- package/src/lib/components/kit/api/EnumValues.svelte +0 -35
- package/src/lib/components/kit/api/Expandable.svelte +0 -70
- package/src/lib/components/kit/api/Message.svelte +0 -67
- package/src/lib/components/kit/api/ObjectExample.svelte +0 -11
- package/src/lib/components/kit/api/RequestExample.svelte +0 -11
- package/src/lib/components/kit/api/ResponseExample.svelte +0 -11
- package/src/lib/components/kit/api/Webhook.svelte +0 -115
- package/src/lib/components/kit/api/api-context.ts +0 -15
- package/src/lib/components/kit/tabs-context.ts +0 -8
- package/src/lib/components/kit/tabs-store.svelte.ts +0 -28
- package/src/lib/config/site.ts +0 -34
- package/src/lib/content/index.ts +0 -50
- package/src/lib/content/raw.ts +0 -21
- package/src/lib/content/tree.ts +0 -169
- package/src/lib/index.ts +0 -79
- package/src/lib/nav-match.ts +0 -23
- package/src/lib/openapi/generate.ts +0 -629
- package/src/lib/server/og.ts +0 -140
- package/src/lib/state/search.svelte.ts +0 -9
- package/src/lib/state/theme.svelte.ts +0 -58
- package/src/lib/types.ts +0 -216
- package/src/params/docpage.ts +0 -3
- package/src/params/mdfile.ts +0 -3
- package/src/routes/+error.svelte +0 -46
- package/src/routes/+layout.svelte +0 -25
- package/src/routes/[...path=mdfile]/+server.ts +0 -21
- package/src/routes/[...slug=docpage]/+page.svelte +0 -63
- package/src/routes/[...slug=docpage]/+page.ts +0 -44
- package/src/routes/layout.css +0 -897
- package/src/routes/llms-full.txt/+server.ts +0 -22
- package/src/routes/llms.txt/+server.ts +0 -20
- package/src/routes/og/[...slug]/+server.ts +0 -77
- package/src/routes/rss.xml/+server.ts +0 -65
- package/src/routes/search.json/+server.ts +0 -54
- package/src/routes/sitemap.xml/+server.ts +0 -21
- package/svelte.config.js +0 -35
- package/tsconfig.json +0 -20
- package/vite.config.ts +0 -67
- /package/{static → dist/client}/favicon-dark.svg +0 -0
- /package/{static → dist/client}/favicon-light.svg +0 -0
- /package/{static → dist/client}/favicon.svg +0 -0
- /package/{static → dist/client}/fonts/geist-400.ttf +0 -0
- /package/{static → dist/client}/fonts/geist-600.ttf +0 -0
- /package/{static → dist/client}/fonts/geist-700.ttf +0 -0
- /package/{static → dist/client}/og-image.png +0 -0
- /package/{static → dist/client}/robots.txt +0 -0
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Navigation
|
|
3
|
-
description: Sidebar, groups, dropdowns, tabs, and ordering.
|
|
4
|
-
icon: list
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Navigation
|
|
8
|
-
|
|
9
|
-
Your sidebar is built from the folder structure under `src/content/docs`, and
|
|
10
|
-
ordered by `meta.json` files. The top navigation and area switching come from
|
|
11
|
-
`axerity.json`.
|
|
12
|
-
|
|
13
|
-
## Folders become sidebar sections
|
|
14
|
-
|
|
15
|
-
Each top-level folder under `src/content/docs` becomes a section. Files inside a
|
|
16
|
-
folder become its pages. Nest a folder inside another and it becomes a
|
|
17
|
-
collapsible group.
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
content/docs/
|
|
21
|
-
index.md -> /docs
|
|
22
|
-
installation.md -> /docs/installation
|
|
23
|
-
components/
|
|
24
|
-
callout.md -> /docs/components/callout
|
|
25
|
-
api/
|
|
26
|
-
users/
|
|
27
|
-
get-user.md -> /docs/api/users/get-user (nested group)
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## meta.json
|
|
31
|
-
|
|
32
|
-
Every folder can have a `meta.json` that sets its title, icon, and the order of
|
|
33
|
-
its pages.
|
|
34
|
-
|
|
35
|
-
```json title="meta.json"
|
|
36
|
-
{
|
|
37
|
-
"title": "Getting Started",
|
|
38
|
-
"icon": "rocket",
|
|
39
|
-
"pages": ["index", "installation", "quick-start"]
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
| Field | What it does |
|
|
44
|
-
| ------------- | ------------------------------------------------------------- |
|
|
45
|
-
| `title` | The section or group label |
|
|
46
|
-
| `icon` | A Lucide icon name shown next to the label |
|
|
47
|
-
| `pages` | Order of pages by slug. Anything left out is added at the end |
|
|
48
|
-
| `defaultOpen` | For a nested group, expand it by default |
|
|
49
|
-
|
|
50
|
-
Pages not listed in `pages` are appended in alphabetical order, so you only have
|
|
51
|
-
to list the ones you care about.
|
|
52
|
-
|
|
53
|
-
## Page frontmatter
|
|
54
|
-
|
|
55
|
-
Each page sets its own metadata in frontmatter:
|
|
56
|
-
|
|
57
|
-
```md
|
|
58
|
-
---
|
|
59
|
-
title: Installation
|
|
60
|
-
description: Get Axerity running locally.
|
|
61
|
-
icon: download
|
|
62
|
-
badge: New
|
|
63
|
-
---
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
| Field | What it does |
|
|
67
|
-
| ------------- | ------------------------------------------------------ |
|
|
68
|
-
| `title` | Sidebar label and page title |
|
|
69
|
-
| `description` | Used for SEO, search, and prev/next |
|
|
70
|
-
| `icon` | Lucide icon next to the sidebar link |
|
|
71
|
-
| `badge` | Small pill next to the title, such as `New` |
|
|
72
|
-
| `layout` | `api` switches to the wide API layout |
|
|
73
|
-
| `method` | An HTTP method shown as a colored badge in the sidebar |
|
|
74
|
-
|
|
75
|
-
## Dropdowns and tabs
|
|
76
|
-
|
|
77
|
-
A dropdown swaps the entire sidebar. Use it to split a site into areas like
|
|
78
|
-
Guides and API Reference. Each dropdown can have its own top-nav tabs.
|
|
79
|
-
|
|
80
|
-
```json title="axerity.json"
|
|
81
|
-
{
|
|
82
|
-
"dropdowns": [
|
|
83
|
-
{
|
|
84
|
-
"label": "Guides",
|
|
85
|
-
"icon": "book-open",
|
|
86
|
-
"href": "/docs",
|
|
87
|
-
"match": "/docs",
|
|
88
|
-
"tabs": [
|
|
89
|
-
{ "title": "Documentation", "href": "/docs", "match": "/docs" },
|
|
90
|
-
{ "title": "Components", "href": "/docs/components/callout", "match": "/docs/components" }
|
|
91
|
-
]
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"label": "API Reference",
|
|
95
|
-
"icon": "code",
|
|
96
|
-
"href": "/docs/api/users/get-user",
|
|
97
|
-
"match": "/docs/api"
|
|
98
|
-
}
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
- `href` is where the link goes.
|
|
104
|
-
- `match` is the path prefix that marks a dropdown or tab as active. The longest
|
|
105
|
-
match wins, so nested areas take priority.
|
|
106
|
-
- The sidebar shows only the sections under the active dropdown, and the navbar
|
|
107
|
-
shows only that dropdown's tabs.
|
|
108
|
-
|
|
109
|
-
## Sidebar links
|
|
110
|
-
|
|
111
|
-
Pin external links to the bottom of the sidebar. They stay in place while the
|
|
112
|
-
nav scrolls, and open in a new tab.
|
|
113
|
-
|
|
114
|
-
```json title="axerity.json"
|
|
115
|
-
{
|
|
116
|
-
"sidebarLinks": [
|
|
117
|
-
{ "title": "Support", "href": "https://example.com/support" },
|
|
118
|
-
{ "title": "Dashboard", "href": "https://app.example.com" }
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## Versions
|
|
124
|
-
|
|
125
|
-
Add a version switcher to the navbar. Each entry has a `label` and an `href`.
|
|
126
|
-
|
|
127
|
-
```json title="axerity.json"
|
|
128
|
-
{
|
|
129
|
-
"versions": [
|
|
130
|
-
{ "label": "v2.0", "href": "/v2" },
|
|
131
|
-
{ "label": "v1.0", "href": "/v1" }
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
An `href` can point anywhere, so the simplest setup sends old versions to a
|
|
137
|
-
separate site:
|
|
138
|
-
|
|
139
|
-
```json title="axerity.json"
|
|
140
|
-
{
|
|
141
|
-
"versions": [
|
|
142
|
-
{ "label": "v2.0", "href": "/" },
|
|
143
|
-
{ "label": "v1.0", "href": "https://v1.example.com" }
|
|
144
|
-
]
|
|
145
|
-
}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### Versioned content
|
|
149
|
-
|
|
150
|
-
When a version's `href` is a local path like `/v2`, put that version's pages in
|
|
151
|
-
a matching top-level folder. Each folder is its own independent content tree
|
|
152
|
-
with its own sidebar.
|
|
153
|
-
|
|
154
|
-
```
|
|
155
|
-
content/docs/
|
|
156
|
-
v2/
|
|
157
|
-
index.md -> /v2
|
|
158
|
-
installation.md -> /v2/installation
|
|
159
|
-
v1/
|
|
160
|
-
index.md -> /v1
|
|
161
|
-
installation.md -> /v1/installation
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
The switcher then keeps the reader on the same page across versions. Moving from
|
|
165
|
-
`/v2/installation` to v1 lands on `/v1/installation` when that page exists, and
|
|
166
|
-
falls back to the version's index when it does not. The site root redirects to
|
|
167
|
-
the first version in the list.
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: API reference
|
|
3
|
-
description: Generate a full API reference from an OpenAPI spec.
|
|
4
|
-
icon: webhook
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import { Callout } from '$lib';
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
# API reference
|
|
12
|
-
|
|
13
|
-
Point Axerity at an OpenAPI 3 spec and it generates the whole reference for you:
|
|
14
|
-
a page per operation with parameters, request and response bodies, examples, auth,
|
|
15
|
-
and a page per schema. The pages use the same [API components](/components/api)
|
|
16
|
-
you would write by hand, so they match the rest of your docs.
|
|
17
|
-
|
|
18
|
-
## Point at a spec
|
|
19
|
-
|
|
20
|
-
Add an `openapi` field to `axerity.json`. The simplest form is a path or URL:
|
|
21
|
-
|
|
22
|
-
```json title="axerity.json"
|
|
23
|
-
{
|
|
24
|
-
"openapi": "./openapi.json"
|
|
25
|
-
}
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
The spec can be a local file or a URL, in JSON or YAML:
|
|
29
|
-
|
|
30
|
-
```json title="axerity.json"
|
|
31
|
-
{
|
|
32
|
-
"openapi": "https://api.example.com/openapi.yaml"
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Pages are written into your content tree the next time you run `axerity dev` or
|
|
37
|
-
`axerity build`, and they regenerate when a local spec changes.
|
|
38
|
-
|
|
39
|
-
<Callout type="info">
|
|
40
|
-
|
|
41
|
-
Generated pages are managed for you. They are added to `.gitignore` so they do
|
|
42
|
-
not clutter your repo, and they are rebuilt from the spec every time.
|
|
43
|
-
|
|
44
|
-
</Callout>
|
|
45
|
-
|
|
46
|
-
## Choose where it lands
|
|
47
|
-
|
|
48
|
-
Use the object form to set the output folder and the section title:
|
|
49
|
-
|
|
50
|
-
```json title="axerity.json"
|
|
51
|
-
{
|
|
52
|
-
"openapi": {
|
|
53
|
-
"spec": "./openapi.json",
|
|
54
|
-
"output": "api-reference",
|
|
55
|
-
"title": "API Reference"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
| Field | Type | What it does |
|
|
61
|
-
| -------- | ------ | ----------------------------------------------------- |
|
|
62
|
-
| `spec` | string | Local path or URL to an OpenAPI 3 spec (JSON or YAML) |
|
|
63
|
-
| `output` | string | Content folder for the generated pages |
|
|
64
|
-
| `title` | string | Section title (defaults to the spec's `info.title`) |
|
|
65
|
-
|
|
66
|
-
With `output: "api-reference"`, an operation tagged `Pet` lands at
|
|
67
|
-
`/api-reference/pet/<operationId>` and each schema at
|
|
68
|
-
`/api-reference/schemas/<name>`.
|
|
69
|
-
|
|
70
|
-
## Group several specs
|
|
71
|
-
|
|
72
|
-
Pass an array to generate more than one reference, each into its own folder:
|
|
73
|
-
|
|
74
|
-
```json title="axerity.json"
|
|
75
|
-
{
|
|
76
|
-
"openapi": [
|
|
77
|
-
{ "spec": "./checkout.json", "output": "checkout-api", "title": "Checkout" },
|
|
78
|
-
{ "spec": "./storefront.json", "output": "storefront-api", "title": "Storefront" }
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
## Show it as a navbar tab
|
|
84
|
-
|
|
85
|
-
The generated pages are ordinary docs, so you surface them like any other area:
|
|
86
|
-
add a [dropdown](/configuration/navigation) that points at the output folder.
|
|
87
|
-
Clicking the tab swaps the sidebar to the API reference.
|
|
88
|
-
|
|
89
|
-
```json title="axerity.json"
|
|
90
|
-
{
|
|
91
|
-
"dropdowns": [
|
|
92
|
-
{
|
|
93
|
-
"label": "API Reference",
|
|
94
|
-
"icon": "code",
|
|
95
|
-
"href": "/api-reference/pet/getpetbyid",
|
|
96
|
-
"match": "/api-reference"
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Set `href` to any page inside the folder (a good landing operation), and `match`
|
|
103
|
-
to the folder so the tab highlights while the reader is anywhere in the reference.
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Search
|
|
3
|
-
description: Full text search across your docs.
|
|
4
|
-
icon: search
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Search
|
|
8
|
-
|
|
9
|
-
Axerity ships with full text search powered by [Orama](https://orama.com). Press
|
|
10
|
-
`Cmd K` or `Ctrl K`, or click the search box in the navbar, to open it.
|
|
11
|
-
|
|
12
|
-
## How it works
|
|
13
|
-
|
|
14
|
-
The search index is built at compile time. Every page's title, description, and
|
|
15
|
-
text is collected into a single JSON file. When you open search the first time,
|
|
16
|
-
that file is fetched and loaded into Orama in the browser. Searching then runs
|
|
17
|
-
locally, with no server.
|
|
18
|
-
|
|
19
|
-
## What is indexed
|
|
20
|
-
|
|
21
|
-
- Page titles, with the highest weight.
|
|
22
|
-
- Page descriptions from frontmatter.
|
|
23
|
-
- The page body text, with Markdown and code stripped out.
|
|
24
|
-
- The section name, shown next to each result.
|
|
25
|
-
|
|
26
|
-
There is nothing to configure. Add pages and they are searchable on the next
|
|
27
|
-
build.
|
|
28
|
-
|
|
29
|
-
## Keyboard
|
|
30
|
-
|
|
31
|
-
| Key | Action |
|
|
32
|
-
| -------------- | ----------------- |
|
|
33
|
-
| `Cmd/Ctrl + K` | Open or close |
|
|
34
|
-
| `Up` / `Down` | Move between hits |
|
|
35
|
-
| `Enter` | Open the result |
|
|
36
|
-
| `Esc` | Close |
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Introduction
|
|
3
|
-
description: A documentation site generator for Svelte.
|
|
4
|
-
icon: home
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import { Card, CardGroup, Callout } from '$lib';
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
# Introduction
|
|
12
|
-
|
|
13
|
-
Axerity is a documentation site generator for Svelte. You write your content in
|
|
14
|
-
Markdown, drop in Svelte components when you need them, and get a fast static
|
|
15
|
-
site with search, navigation, and a clean theme.
|
|
16
|
-
|
|
17
|
-
## What you get
|
|
18
|
-
|
|
19
|
-
- File based content. Add a Markdown file and it shows up in the sidebar.
|
|
20
|
-
- A `meta.json` in each folder to set titles, icons, and ordering.
|
|
21
|
-
- Code blocks with syntax highlighting, copy buttons, titles, line highlighting,
|
|
22
|
-
and line numbers.
|
|
23
|
-
- Components you can use right inside Markdown: callouts, cards, tabs, steps,
|
|
24
|
-
accordions, type tables, and a layout for API reference pages.
|
|
25
|
-
- Light and dark themes, driven entirely by CSS variables.
|
|
26
|
-
- Full text search, built at compile time.
|
|
27
|
-
|
|
28
|
-
<Callout type="tip">
|
|
29
|
-
|
|
30
|
-
The whole site is configured from one `axerity.json` file. Drop in Markdown,
|
|
31
|
-
set up your `meta.json` files, and you never have to touch the code.
|
|
32
|
-
|
|
33
|
-
</Callout>
|
|
34
|
-
|
|
35
|
-
## Get started
|
|
36
|
-
|
|
37
|
-
<CardGroup cols={2}>
|
|
38
|
-
<Card title="Installation" icon="download" href="/installation">
|
|
39
|
-
|
|
40
|
-
Get Axerity running locally in about a minute.
|
|
41
|
-
|
|
42
|
-
</Card>
|
|
43
|
-
<Card title="Quick Start" icon="rocket" href="/quick-start">
|
|
44
|
-
|
|
45
|
-
Write your first page and watch the sidebar fill in.
|
|
46
|
-
|
|
47
|
-
</Card>
|
|
48
|
-
<Card title="Components" icon="blocks" href="/components/callout">
|
|
49
|
-
|
|
50
|
-
Browse the components you can use in your pages.
|
|
51
|
-
|
|
52
|
-
</Card>
|
|
53
|
-
<Card title="API Reference" icon="code" href="/api/pet/pet-object">
|
|
54
|
-
|
|
55
|
-
See the layout built for documenting an API.
|
|
56
|
-
|
|
57
|
-
</Card>
|
|
58
|
-
|
|
59
|
-
</CardGroup>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Installation
|
|
3
|
-
description: Get Axerity running locally in a minute.
|
|
4
|
-
icon: download
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Installation
|
|
8
|
-
|
|
9
|
-
Axerity is a CLI. You do not clone or fork anything. Run it, scaffold a site, and
|
|
10
|
-
start writing Markdown.
|
|
11
|
-
|
|
12
|
-
## Requirements
|
|
13
|
-
|
|
14
|
-
- Node.js 24 or newer
|
|
15
|
-
|
|
16
|
-
## Create a site
|
|
17
|
-
|
|
18
|
-
Scaffold a new site with `init`, then start the dev server:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
pnpm dlx @axerity/cli init my-docs
|
|
22
|
-
cd my-docs
|
|
23
|
-
pnpm dlx @axerity/cli dev
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Your site is running at `http://localhost:5173`. `pnpm dlx` runs the CLI without
|
|
27
|
-
installing it. `npx @axerity/cli <command>` works the same way.
|
|
28
|
-
|
|
29
|
-
## Install it
|
|
30
|
-
|
|
31
|
-
For a project you build often, add it as a dev dependency so the version is
|
|
32
|
-
pinned:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
pnpm add -D @axerity/cli
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Then wire up scripts in your `package.json`:
|
|
39
|
-
|
|
40
|
-
```json
|
|
41
|
-
{
|
|
42
|
-
"scripts": {
|
|
43
|
-
"dev": "axerity dev",
|
|
44
|
-
"build": "axerity build",
|
|
45
|
-
"preview": "axerity preview"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
Now `pnpm dev` and `pnpm build` just work, no global install or PATH setup.
|
|
51
|
-
|
|
52
|
-
## Project layout
|
|
53
|
-
|
|
54
|
-
A site is your content and one config file:
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
my-docs/
|
|
58
|
-
axerity.json site configuration
|
|
59
|
-
docs/ your markdown + meta.json
|
|
60
|
-
public/ optional images and assets
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
Write Markdown in `docs/`, order pages with `meta.json`, and configure the site
|
|
64
|
-
in [`axerity.json`](/configuration). The engine runs from its own install, so the
|
|
65
|
-
only thing Axerity ever creates in your project is the `build/` folder. The
|
|
66
|
-
scaffold adds it to your `.gitignore` for you.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Quick Start
|
|
3
|
-
description: Write your first page in two minutes.
|
|
4
|
-
icon: rocket
|
|
5
|
-
badge: New
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Quick Start
|
|
9
|
-
|
|
10
|
-
Adding a page is just creating a Markdown file. Let's add one.
|
|
11
|
-
|
|
12
|
-
## Create a page
|
|
13
|
-
|
|
14
|
-
Make a new file at `src/content/docs/hello.md`:
|
|
15
|
-
|
|
16
|
-
```md
|
|
17
|
-
---
|
|
18
|
-
title: Hello
|
|
19
|
-
icon: book-open
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
# Hello
|
|
23
|
-
|
|
24
|
-
My first Axerity page.
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
It's immediately available at `/hello` and shows up in the sidebar.
|
|
28
|
-
|
|
29
|
-
## Order it with meta.json
|
|
30
|
-
|
|
31
|
-
Each folder has a `meta.json` that controls titles, icons, and ordering:
|
|
32
|
-
|
|
33
|
-
```json
|
|
34
|
-
{
|
|
35
|
-
"title": "Getting Started",
|
|
36
|
-
"icon": "rocket",
|
|
37
|
-
"pages": ["index", "installation", "quick-start", "hello"]
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
Pages listed in `pages` appear in that order; anything you leave out is appended
|
|
42
|
-
alphabetically.
|
|
43
|
-
|
|
44
|
-
## Organize with folders
|
|
45
|
-
|
|
46
|
-
Create a subfolder with its own `meta.json` and it becomes a new sidebar
|
|
47
|
-
section. Subfolders are ordered by naming them in the parent's `pages` list.
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Advanced
|
|
3
|
-
description: Radius, custom tokens, prose, and whole new themes.
|
|
4
|
-
icon: sliders
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import { Callout } from '$lib';
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
# Advanced theming
|
|
12
|
-
|
|
13
|
-
Everything you need to take theming as far as you want.
|
|
14
|
-
|
|
15
|
-
## Roundness
|
|
16
|
-
|
|
17
|
-
Axerity overrides Tailwind's radius scale in one place, so **every** `rounded-*`
|
|
18
|
-
utility across the UI changes at once:
|
|
19
|
-
|
|
20
|
-
```css title="src/routes/layout.css"
|
|
21
|
-
@theme inline {
|
|
22
|
-
--radius-sm: 0.125rem;
|
|
23
|
-
--radius-md: 0.25rem;
|
|
24
|
-
--radius-lg: 0.375rem;
|
|
25
|
-
--radius-xl: 0.5rem;
|
|
26
|
-
--radius-2xl: 0.625rem;
|
|
27
|
-
}
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Want pill-soft corners? Scale these up. Want sharp, terminal-like edges? Set them
|
|
31
|
-
all to `0`.
|
|
32
|
-
|
|
33
|
-
## Make light the default
|
|
34
|
-
|
|
35
|
-
Axerity defaults to dark. To default to light, change two spots:
|
|
36
|
-
|
|
37
|
-
```ts title="src/lib/state/theme.svelte.ts"
|
|
38
|
-
class ThemeState {
|
|
39
|
-
preference = $state<ThemePreference>('light'); // was 'dark'
|
|
40
|
-
}
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
```html title="src/app.html"
|
|
44
|
-
<script>
|
|
45
|
-
const pref = localStorage.getItem('axerity-theme') ?? 'light'; // was 'dark'
|
|
46
|
-
</script>
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
The second one is the no-flash script that sets the theme **before paint**, keep
|
|
50
|
-
it in sync with the default or the page will flash on load.
|
|
51
|
-
|
|
52
|
-
## Add your own token
|
|
53
|
-
|
|
54
|
-
Need a new semantic color, say a highlight background? Add it in three steps:
|
|
55
|
-
|
|
56
|
-
```css title="src/routes/layout.css"
|
|
57
|
-
:root {
|
|
58
|
-
--highlight: oklch(0.95 0.05 95);
|
|
59
|
-
}
|
|
60
|
-
.dark {
|
|
61
|
-
--highlight: oklch(0.3 0.05 95);
|
|
62
|
-
}
|
|
63
|
-
@theme inline {
|
|
64
|
-
--color-highlight: var(--highlight); /* now usable as bg-highlight, text-highlight */
|
|
65
|
-
}
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## A whole new named theme
|
|
69
|
-
|
|
70
|
-
The default light/dark live on `:root` and `.dark`. To ship **additional**
|
|
71
|
-
themes (e.g. a "sepia" reading mode), override the tokens under a `data-theme`
|
|
72
|
-
attribute and set it on `<html>`:
|
|
73
|
-
|
|
74
|
-
```css title="src/routes/layout.css"
|
|
75
|
-
[data-theme='sepia'] {
|
|
76
|
-
--bg: oklch(0.96 0.02 85);
|
|
77
|
-
--surface: oklch(0.98 0.015 85);
|
|
78
|
-
--fg: oklch(0.28 0.03 70);
|
|
79
|
-
--accent: oklch(0.5 0.12 50);
|
|
80
|
-
/* …override the rest of the semantic tokens… */
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
```ts title="apply it"
|
|
85
|
-
document.documentElement.dataset.theme = 'sepia';
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Because components read only semantic tokens, a complete new theme is just a new
|
|
89
|
-
block of variable values, no component changes.
|
|
90
|
-
|
|
91
|
-
<Callout type="tip">
|
|
92
|
-
|
|
93
|
-
This is exactly how the default `.dark` block works. A named theme is the same
|
|
94
|
-
idea with a different selector.
|
|
95
|
-
|
|
96
|
-
</Callout>
|
|
97
|
-
|
|
98
|
-
## Restyle the prose
|
|
99
|
-
|
|
100
|
-
Rendered Markdown is styled under `.doc-content` in `src/routes/layout.css`,
|
|
101
|
-
headings, links, tables, blockquotes, inline code. Adjust spacing, sizes, or
|
|
102
|
-
weights there to change how content reads. For example, tighten heading rhythm:
|
|
103
|
-
|
|
104
|
-
```css title="src/routes/layout.css"
|
|
105
|
-
.doc-content h2 {
|
|
106
|
-
margin-top: 2rem;
|
|
107
|
-
font-size: 1.4rem;
|
|
108
|
-
}
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
<Callout type="warning">
|
|
112
|
-
|
|
113
|
-
Keep edits in `.doc-content` and the token blocks. Touching individual component
|
|
114
|
-
files is rarely needed, and makes future updates harder to merge.
|
|
115
|
-
|
|
116
|
-
</Callout>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Code blocks
|
|
3
|
-
description: Change the syntax-highlighting theme.
|
|
4
|
-
icon: code
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
import { Callout } from '$lib';
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
# Code block themes
|
|
12
|
-
|
|
13
|
-
Code is highlighted with [Shiki](https://shiki.style) using a **dual theme**,
|
|
14
|
-
one for light, one for dark, configured in `mdsvex.config.js`.
|
|
15
|
-
|
|
16
|
-
```js title="mdsvex.config.js"
|
|
17
|
-
const themes = { light: 'github-light', dark: 'vesper' };
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Pick any [bundled Shiki theme](https://shiki.style/themes) for each side:
|
|
21
|
-
|
|
22
|
-
```js title="mdsvex.config.js"
|
|
23
|
-
const themes = { light: 'min-light', dark: 'github-dark-default' };
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
<Callout type="warning">
|
|
27
|
-
|
|
28
|
-
`mdsvex.config.js` is read at build time, so **restart the dev server** after
|
|
29
|
-
changing themes, Vite doesn't hot-reload it.
|
|
30
|
-
|
|
31
|
-
</Callout>
|
|
32
|
-
|
|
33
|
-
## Block background
|
|
34
|
-
|
|
35
|
-
Shiki inlines each theme's own background, but Axerity overrides it with the
|
|
36
|
-
`--surface-raised` token so code blocks match cards and panels. That rule is in
|
|
37
|
-
`src/routes/layout.css`:
|
|
38
|
-
|
|
39
|
-
```css title="src/routes/layout.css"
|
|
40
|
-
.doc-content pre.shiki {
|
|
41
|
-
background-color: var(--surface-raised) !important;
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Remove the override if you'd rather keep the Shiki theme's native background.
|
|
46
|
-
|
|
47
|
-
## Languages
|
|
48
|
-
|
|
49
|
-
Grammars are preloaded in `mdsvex.config.js`. Add any language you use:
|
|
50
|
-
|
|
51
|
-
```js title="mdsvex.config.js"
|
|
52
|
-
const langs = ['svelte', 'typescript', 'javascript', 'json', 'bash', 'css', 'python'];
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Unlisted languages fall back to plain text.
|
|
56
|
-
|
|
57
|
-
## Fence options
|
|
58
|
-
|
|
59
|
-
Authors get titles, line highlighting, and line numbers out of the box:
|
|
60
|
-
|
|
61
|
-
````md
|
|
62
|
-
```ts title="example.ts" {2} showLineNumbers
|
|
63
|
-
const a = 1;
|
|
64
|
-
const b = 2; // highlighted
|
|
65
|
-
```
|
|
66
|
-
````
|