master.pug 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. doctype html
  2. html(lang=siteConfig.lang)
  3. head
  4. meta(http-equiv='X-UA-Compatible', content='IE=edge')
  5. meta(charset='UTF-8')
  6. meta(name='viewport', content='user-scalable=yes, width=device-width, initial-scale=1, maximum-scale=5')
  7. meta(name='theme-color', content='#1976d2')
  8. meta(name='msapplication-TileColor', content='#1976d2')
  9. meta(name='msapplication-TileImage', content='/_assets/favicons/mstile-150x150.png')
  10. title= pageMeta.title + ' | ' + config.title
  11. //- SEO / OpenGraph
  12. meta(name='description', content=pageMeta.description)
  13. meta(property='og:title', content=pageMeta.title)
  14. meta(property='og:type', content='website')
  15. meta(property='og:description', content=pageMeta.description)
  16. meta(property='og:image', content=pageMeta.image)
  17. meta(property='og:url', content=pageMeta.url)
  18. meta(property='og:site_name', content=config.title)
  19. //- Favicon
  20. link(rel='apple-touch-icon', sizes='180x180', href='/_assets/favicons/apple-touch-icon.png')
  21. link(rel='icon', type='image/png', sizes='192x192', href='/_assets/favicons/android-chrome-192x192.png')
  22. link(rel='icon', type='image/png', sizes='32x32', href='/_assets/favicons/favicon-32x32.png')
  23. link(rel='icon', type='image/png', sizes='16x16', href='/_assets/favicons/favicon-16x16.png')
  24. link(rel='mask-icon', href='/_assets/favicons/safari-pinned-tab.svg', color='#1976d2')
  25. link(rel='manifest', href='/_assets/manifest.json')
  26. //- Site Properties
  27. script.
  28. var siteConfig = !{JSON.stringify(siteConfig)}
  29. var siteLangs = !{JSON.stringify(langs)}
  30. //- Dev Mode Warning
  31. if devMode
  32. script.
  33. siteConfig.devMode = true
  34. //- Icon Set
  35. if config.theming.iconset === 'fa'
  36. link(
  37. type='text/css'
  38. rel='stylesheet'
  39. href='https://use.fontawesome.com/releases/v5.10.0/css/all.css'
  40. )
  41. else if config.theming.iconset === 'fa4'
  42. link(
  43. type='text/css'
  44. rel='stylesheet'
  45. href='https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css'
  46. )
  47. //- CSS
  48. <% for (var index in htmlWebpackPlugin.files.css) { %>
  49. <% if (htmlWebpackPlugin.files.cssIntegrity) { %>
  50. link(
  51. type='text/css'
  52. rel='stylesheet'
  53. href='<%= htmlWebpackPlugin.files.css[index] %>'
  54. integrity=config.security.securitySRI ? '<%= htmlWebpackPlugin.files.cssIntegrity[index] %>' : false
  55. crossorigin='<%= webpackConfig.output.crossOriginLoading %>'
  56. )
  57. <% } else { %>
  58. link(
  59. type='text/css'
  60. rel='stylesheet'
  61. href='<%= htmlWebpackPlugin.files.css[index] %>'
  62. )
  63. <% } %>
  64. <% } %>
  65. //- JS
  66. <% for (var index in htmlWebpackPlugin.files.js) { %>
  67. <% if (htmlWebpackPlugin.files.jsIntegrity) { %>
  68. script(
  69. type='text/javascript'
  70. src='<%= htmlWebpackPlugin.files.js[index] %>'
  71. integrity=config.security.securitySRI ? '<%= htmlWebpackPlugin.files.jsIntegrity[index] %>' : false
  72. crossorigin='<%= webpackConfig.output.crossOriginLoading %>'
  73. )
  74. <% } else { %>
  75. script(
  76. type='text/javascript'
  77. src='<%= htmlWebpackPlugin.files.js[index] %>'
  78. )
  79. <% } %>
  80. <% } %>
  81. != analyticsCode.head
  82. block head
  83. body
  84. != analyticsCode.bodyStart
  85. block body
  86. != analyticsCode.bodyEnd