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 = `
` } // pick the navs var tabFn = tabs[opts.section || 'docs'] var leftnavFn = leftnav[opts.tab || 'basics'] // render the page return ` ${head()} ${hero} ${tabs.sections(opts.section)} ${tabFn(opts.tab)} ${footer(opts.path)} ` }