page.pug 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. extends master.pug
  2. block head
  3. if injectCode.css
  4. style(type='text/css')!= injectCode.css
  5. if injectCode.head
  6. != injectCode.head
  7. if config.features.featurePageComments
  8. != comments.head
  9. block body
  10. #root
  11. page(
  12. locale=page.localeCode
  13. path=page.path
  14. title=page.title
  15. description=page.description
  16. :tags=page.tags
  17. created-at=page.createdAt
  18. updated-at=page.updatedAt
  19. author-name=page.authorName
  20. :author-id=page.authorId
  21. editor=page.editorKey
  22. :is-published=page.isPublished.toString()
  23. toc=Buffer.from(page.toc).toString('base64')
  24. :page-id=page.id
  25. sidebar=Buffer.from(JSON.stringify(sidebar)).toString('base64')
  26. toc-options=Buffer.from(JSON.stringify(tocOptions)).toString('base64')
  27. nav-mode=config.nav.mode
  28. comments-enabled=config.features.featurePageComments
  29. effective-permissions=Buffer.from(JSON.stringify(effectivePermissions)).toString('base64')
  30. comments-external=comments.codeTemplate
  31. )
  32. template(slot='contents')
  33. div!= page.render
  34. template(slot='comments')
  35. div!= comments.main
  36. if injectCode.body
  37. != injectCode.body
  38. if config.features.featurePageComments
  39. != comments.body