Reference your component in markown
Render a custom integration block from Markdown synced with Git Sync
Last updated
Was this helpful?
Render a custom integration block from Markdown synced with Git Sync
This guide maps a fenced code block to your custom component. After Git Sync imports the Markdown file, GitBook renders the component in the page.
Before you start, make sure that:
Your integration defines a custom block in gitbook-manifest.yaml.
Your repository syncs with Git Sync.
In gitbook-manifest.yaml, add a markdown mapping to the block:
blocks:
- id: block-name
title: My custom block
markdown:
codeblock: blocksyntax
body: contentThe codeblock value identifies the Markdown fence. The body value identifies the component property that receives the fence content.
In a Markdown file that Git Sync imports, add a fenced code block:
GitBook creates your custom block with content set to something.
Add properties after the fence name when your component needs more values:
GitBook sets content to something and propA to A.
Commit and push the manifest and Markdown changes.
Wait for Git Sync to import the commit.
Open the synced page in GitBook.
GitBook renders the fenced block as your custom component.
For custom block configuration, see Configure your integration. For component rendering, see the Component reference.
Last updated
Was this helpful?
```blocksyntax
something
``````blocksyntax propA="A"
something
```