page.pug 1.12 KB
Newer Older
1
extends master.pug
2 3

block head
4 5 6 7
  if injectCode.css
    style(type='text/css')!= injectCode.css
  if injectCode.head
    != injectCode.head
8 9
  if config.features.featurePageComments
    != comments.head
10 11

block body
12
  #root
13 14 15 16 17
    page(
      locale=page.localeCode
      path=page.path
      title=page.title
      description=page.description
18
      :tags=page.tags
19 20 21
      created-at=page.createdAt
      updated-at=page.updatedAt
      author-name=page.authorName
22
      :author-id=page.authorId
23
      :is-published=page.isPublished.toString()
24
      toc=Buffer.from(page.toc).toString('base64')
Nicolas Giard's avatar
Nicolas Giard committed
25
      :page-id=page.id
26
      sidebar=Buffer.from(JSON.stringify(sidebar)).toString('base64')
NGPixel's avatar
NGPixel committed
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')
NGPixel's avatar
NGPixel committed
33
        div!= page.render
34 35
      template(slot='comments')
        div!= comments.main
36 37
  if injectCode.body
    != injectCode.body
38 39
  if config.features.featurePageComments
    != comments.body