gitbook-plugin-reflinks
v1.0.1
Published
GitBook plugin for creating reference links
Readme
GitBook Plugin: Reflinks
A GitBook plugin that enhances content references with beautiful, interactive link blocks.
Features
- Transforms
content-refblocks into styled reference links - Automatically extracts titles from referenced markdown files
- Modern, responsive design with hover effects
- Supports both local markdown files and external URLs
Installation
Add the plugin to your book.json:
{
"plugins": ["reflinks"]
}Then install the plugin:
gitbook installUsage
Basic Syntax
{% content-ref href="path/to/file.md" %}
Optional custom text
{% endcontent-ref %}Examples
- Reference a local markdown file:
{% content-ref href="getting-started.md" %}
{% endcontent-ref %}- Reference with custom text:
{% content-ref href="https://example.com" %}
Click here to learn more
{% endcontent-ref %}- Reference with URL parameter:
{% content-ref url="https://example.com" %}
{% endcontent-ref %}Styling
The plugin automatically applies a modern, responsive design to all reference links with:
- Clean, minimal layout
- Hover effects
- Chevron icon indicator
- Consistent spacing and padding
- Responsive design for all screen sizes
Configuration
The plugin supports the following configuration in book.json:
{
"pluginsConfig": {
"reflinks": {
"title": "Reference" // Optional: Custom title for reference section
}
}
}License
MIT © CPBox
