Natural Push Machine

    eleventy-plugin-nav-menu

    0.0.1 • Public • Published

    eleventy-plugin-nav-menu

    npm npm bundle size (minified) npm

    ⛵️ A responsive nav menu shortcode for Eleventy

    Install

    npm install eleventy-plugin-nav-menu

    Usage

    const navMenuPlugin = require('eleventy-plugin-nav-menu');
    
    module.exports = function(eleventyConfig) {
        eleventyConfig.addPlugin(navMenuPlugin)
    
        return { /* ... */ }
    }

    The plugin adds three shortcodes:

    • navMenu: A chunk of html
    • navMenuStyles: Minimal (and minified) styles
    • navMenuScript: Minified JavaScript

    Add them to your layout like so:

    <!DOCTYPE html>
        <head>
            {% navMenuStyles %}
        </head>
        <body>
            <!-- Use with @11ty/eleventy-navigation is optional -->
            {% navMenu collections.all | eleventyNavigation %}
        </body>
        {% navMenuScript %}
    </html>

    Warning

    This library is a work in progress. Expect changes before v1.0.0 release. Use at your own risk.

    License

    MIT © Sean McPherson

    Install

    npm i eleventy-plugin-nav-menu

    DownloadsWeekly Downloads

    5

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    5.57 kB

    Total Files

    4

    Last publish

    Collaborators

    • seanmcp