[READ-ONLY] Mirror of https://github.com/flo-bit/tiny-docs. quick setup, simple, minimalistic docs for your github project flo-bit.dev/tiny-docs/
0

Configure Feed

Select the types of activity you want to include in your feed.

tiny-docs / docs / 04-customizing.md
1.2 kB 45 lines
1# Customizing 2 3For bigger changes (styling, new components, custom embeds), vendor tiny-docs into your repo as `docs-builder/`: 4 5```bash 6git clone --depth 1 --branch v1 https://github.com/flo-bit/tiny-docs docs-builder 7rm -rf docs-builder/.git 8``` 9 10The workflow auto-detects `docs-builder/` and uses it instead of the upstream copy. Edit anything under `docs-builder/src/` and commit — your fork ships on the next push. 11 12## Adding a custom component to markdown 13 141. Create a component, e.g. `docs-builder/src/embeds/my-thing/MyThing.astro`. 152. Register it in `docs-builder/astro.config.ts`: 16 17 ```ts 18 customEmbeds({ 19 embeds: [ 20 // ...existing 21 { 22 componentName: "MyThing", 23 directiveName: "mything", 24 importPath: "src/embeds/my-thing", 25 }, 26 ], 27 }), 28 ``` 29 303. Use it in any markdown file: 31 32 ```md 33 ::mything{label="hello" count=3} 34 ``` 35 36Props on the directive are passed straight to the component. For URL-triggered embeds, add a `urlMatcher` — see [`src/embeds/youtube/embed.ts`](../src/embeds/youtube/embed.ts) for an example. 37 38## Local development 39 40```bash 41npm install 42npm run dev 43``` 44 45Put markdown in `docs/` and a `README.md` at the repo root, same as the deployed setup.