wikijs-fork/server/views/page.pug
2022-09-20 16:55:05 -04:00

43 lines
1.3 KiB
Plaintext

extends master.pug
block head
if injectCode.css
style(type='text/css')!= injectCode.css
if injectCode.head
!= injectCode.head
if config.features.featurePageComments
!= comments.head
block body
#root
page(
locale=page.localeCode
path=page.path
title=page.title
description=page.description
:tags=page.tags
created-at=page.createdAt
updated-at=page.updatedAt
author-name=page.authorName
:author-id=page.authorId
editor=page.editorKey
:is-published=page.isPublished.toString()
toc=Buffer.from(page.toc).toString('base64')
:page-id=page.id
sidebar=Buffer.from(JSON.stringify(sidebar)).toString('base64')
nav-mode=config.nav.mode
comments-enabled=config.features.featurePageComments
effective-permissions=Buffer.from(JSON.stringify(effectivePermissions)).toString('base64')
comments-external=comments.codeTemplate
edit-shortcuts=Buffer.from(JSON.stringify(config.editShortcuts)).toString('base64')
filename=pageFilename
)
template(slot='contents')
div!= page.render
template(slot='comments')
div!= comments.main
if injectCode.body
!= injectCode.body
if config.features.featurePageComments
!= comments.body