function plugin(hook, vm) {
    hook.mounted(function () {
        let content = window.Docsify.dom.find('.content');
        if (content) {
            let nav = window.Docsify.dom.create('aside', '');
            window.Docsify.dom.toggleClass(nav, 'add', 'nav');
            window.Docsify.dom.before(content, nav);
        }
    });
    hook.doneEach(function () {
        let nav = window.Docsify.dom.find('.nav');
        if (nav) {
            nav.innerHTML = pageToC().trim();
            if (nav.innerHTML === '') {
                window.Docsify.dom.toggleClass(nav, 'add', 'nothing');
            } else {
                window.Docsify.dom.toggleClass(nav, 'remove', 'nothing');
            }
        }
    });
}
/**
 * Main docsify plugin function
 * @param hook
 * @param vm
 */
Main docsify plugin function
@param hook
@param vm
Main docsify plugin function @param hook @param vm
function plugin(hook, vm) {
    hook.mounted(function () {
        let content = window.Docsify.dom.find('.content');
        if (content) {
            let nav = window.Docsify.dom.create('aside', '');
            window.Docsify.dom.toggleClass(nav, 'add', 'nav');
            window.Docsify.dom.before(content, nav);
        }
    });
    hook.doneEach(function () {
        let nav = window.Docsify.dom.find('.nav');
        if (nav) {
            nav.innerHTML = pageToC().trim();
            if (nav.innerHTML === '') {
                window.Docsify.dom.toggleClass(nav, 'add', 'nothing');
            } else {
                window.Docsify.dom.toggleClass(nav, 'remove', 'nothing');
            }
        }
    });
}
function plugin ( hook , vm ) { hook . mounted ( function ( ) { let content = window . Docsify . dom . find ( '.content' ) ; if ( content ) { let nav = window . Docsify . dom . create ( 'aside' , '' ) ; window . Docsify . dom . toggleClass ( nav , 'add' , 'nav' ) ; window . Docsify . dom . before ( content , nav ) ; } } ) ; hook . doneEach ( function ( ) { let nav = window . Docsify . dom . find ( '.nav' ) ; if ( nav ) { nav . innerHTML = pageToC ( ) . trim ( ) ; if ( nav . innerHTML === '' ) { window . Docsify . dom . toggleClass ( nav , 'add' , 'nothing' ) ; } else { window . Docsify . dom . toggleClass ( nav , 'remove' , 'nothing' ) ; } } } ) ; }
Main docsify plugin function
 @param hook
 @param vm
Main docsify plugin function @param hook @param vm