honkit-plugin-browser-detected-tabs
v0.0.8
Published
Tabbed browsing navigation with browser detection
Downloads
2
Readme
honkit-plugin-browser-detected-tabs
Description
This Honkit plugin provides tabbed browsing navigation with browser detection. It allows you to display content conditionally based on the user's operating system.
Installation
Install the plugin via npm:
npm install honkit-plugin-browser-detected-tabs
Add the plugin to your
book.json
:{ "plugins": ["honkit-plugin-browser-detected-tabs"] }
Install the plugins:
npx honkit install
Usage
To use the browser detected tabs in your Honkit book, you can use the custom {% osContent %}
block tags in your markdown files.
A full example is below which includes the navigation buttons needed by the plug-in.
Example
<button class="osToggle" data-os="Windows">Windows</button>
<button class="osToggle" data-os="Mac">Mac</button>
<button class="osToggle" data-os="Linux">Linux</button>
{% osContent "Mac" %}
This content is only visible on macOS.
{% endosContent %}
{% osContent "Windows" %}
This content is only visible on Windows.
{% endosContent %}
{% osContent "Linux" %}
This content is only visible on Linux.
{% endosContent %}
License
This project is licensed under the MIT License.