mixin disqus(shortname) #disqus_thread script. var disqus_shortname = '#{shortname}'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); noscript | Please enable JavaScript to view the a(href="http://disqus.com/?ref_noscript") comments powered by Disqus. //- Menu: //- renders the menu item recursively mixin menu(m, depth) li.menu-item(class=('-level-' + depth + (m.sections ? ' -parent' : ''))) if m.url a.link.title(href=(base + m.url + (m.anchor || '')) class=((active === m.url && !m.anchor ? '-active' : '') + (' link-' + m.slug)))= m.title else if m.title span.title= m.title //- Headings if m.headings && m.url === active && !m.expand && !m.anchor ul.headings.heading-list - for (var key in m.headings) +heading(m.headings[key], 0) //- Sub-pages if m.sections ul.submenu - for (var key in m.sections) +menu(m.sections[key], depth + 1) //- Headings as subpages if m.headings && m.url === active && m.expand && !m.anchor - for (var key in m.headings) +heading-menu(m.headings[key], depth) //- Heading: //- renders the heading item recursively mixin heading(h, depth) li.heading-item(class=('-depth-' + h.depth)) a.hlink(href=('#' + h.id) class=('link-' + h.id)) = h.title if h.headings ul.heading-list(class=('-depth-' + h.depth)) - for (var key in h.headings) +heading(h.headings[key], depth + 1) //- Heading-menu: //- Renders the heading item recursively, but in the markup of a regular menu. //- Used for single-page sites mixin heading-menu(h, depth) li.menu-item(class=('-level-' + depth + (h.headings ? ' -parent' : ''))) a.link.title(href=('#' + h.id) class=('link-' + h.id)) = h.title if h.headings ul.submenu - for (var key in h.headings) +heading-menu(h.headings[key], depth + 1) //- //- Heading //- mixin header-nav .header-nav .right if meta.github a.iconlink(href='https://github.com/' + meta.github, data-title=meta.github) // span.title Open in GitHub span.icon.-github mixin footer-nav(prev, next) if prev || next .footer-nav if prev .left a(href=prev.url) span.title= prev.pageTitle if next .right a(href=next.url) span.label= "Next: " span.title= next.pageTitle //- //- html //- doctype html html head meta(charset='utf-8') - for (var i in styles) link(rel='stylesheet' href=styles[i]) - for (var i in scripts) script(src=scripts[i]) title= title meta(name='viewport' content='width=device-width') - if (meta.googleAnalytics) script. if (!{!meta.googleAnalytics.domain} || window.location.hostname.indexOf(!{JSON.stringify(meta.googleAnalytics.domain)}) === window.location.hostname.length - #{meta.googleAnalytics.domain.length}) { (function(d,o,c,p,r,e,s){d['GoogleAnalyticsObject']=r;d[r]=d[r]||function(){(d[r].q=d[r].q||[]).push(arguments)},d[r].l=1*new Date();e=o.createElement(c),s=o.getElementsByTagName(c)[0];e.async=1;e.src=p;s.parentNode.insertBefore(e,s)})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create',!{JSON.stringify(meta.googleAnalytics.id)},'auto') } body.-menu-visible .doc-layout .toggle.menu-toggle.js-menu-toggle .menu.toc-menu ul +menu(toc, 0) .body(class=('page-' + slug)) +header-nav .markdown-body != contents - if (meta.disqus) +disqus(meta.disqus) +footer-nav(prev, next)