UNPKG

gitdocs

Version:

Easy to use, SEO-friendly, beautiful documentation that lives in your git repo.

14 lines (11 loc) 247 B
function getRobotsTxt (config = {}) { const lines = [ 'User-agent: *', `Sitemap: ${config.domain || ''}/sitemap.xml`, `Disallow: ${config.crawlable ? '' : '/'}`, ] return lines.join('\n') } module.exports = { getRobotsTxt, }