var head = require('./head.part') var tabs = require('./tabs.part') var leftnav = require('./leftnav.part') var footer = require('./footer.part') module.exports = (opts) => { // render the hero var hero = '' if (opts.hero) { hero = opts.hero } else { hero = `

Scuttlebot

` } // pick the navs var tabFn = tabs[opts.section || 'docs'] || function () { return '' } var leftnavFn = leftnav[opts.tab || 'basics'] // next and see-also var seeAlso = '', next = '' if (opts.seeAlso) seeAlso = `` if (opts.next) next = `

${opts.next[1]}

` // render the page return ` ${head({ title: opts.title })} ${hero} ${tabs.sections(opts.section)} ${tabFn(opts.tab)} ${footer(opts.path)} ` }