diff --git a/index.html b/index.html index ab88441..fe2f0f7 100644 --- a/index.html +++ b/index.html @@ -26,23 +26,8 @@ gtag('config', 'G-MMJ5PY11XY'); - - - - - - + + @@ -80,6 +65,21 @@ return html + footer; }); }, + function (hook, vm) { + hook.mounted(function() { + var div = Docsify.dom.create('div') + div.id = 'gitalk-container' + var main = Docsify.dom.getNode('#main') + div.style = `width: ${main.clientWidth}px; margin: 0 auto 20px;` + Docsify.dom.appendTo(Docsify.dom.find('.content'), div) + }) + + hook.doneEach(function() { + var el = document.getElementById('gitalk-container') + while(el.hasChildNodes()) el.removeChild(el.firstChild) + gitalk.render('gitalk-container') + }) + } ], } @@ -87,5 +87,18 @@ + + + +