How to use the common-tags.html function in common-tags

To help you get started, we’ve selected a few common-tags examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github doczjs / docz / core / docz-core / src / utils / parse-html.ts View on Github external
} = ctx

  const headStr = `
    ${favicon ? `` : ''}
    ${head.meta ? generateMetaTags(head.meta) : ''}
    ${head.links ? generateLinkTags(head.links) : ''}
    ${head.raw ? generateRawTags(head.raw) : ''}
    ${head.scripts ? generateScriptTags(head.scripts) : ''}
    ${generateCSSReferences(css, publicPath)}`

  const footerStr = `
    ${body.raw ? generateRawTags(body.raw) : ''}
    ${body.scripts ? generateScriptTags(body.scripts) : ''}
    ${generateJSReferences(js, publicPath)}`

  const doc = ctags.html(
    template({
      title,
      description,
      lang,
      head: headStr,
      footer: footerStr,
      publicUrl: getPublicUrl(config, dev),
    })
  )

  return trimWhitespace ? ctags.oneLineTrim(doc) : emptyLineTrim(doc)
}