1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-19 13:19:42 +02:00

Show parent page title (#14)

* Fix

show parent page

* Update pages.js

* fix

* merge
This commit is contained in:
cabad11 2018-12-09 21:45:28 +03:00 committed by GitHub
parent 262c1614ed
commit 9966131100
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 1671 additions and 12878 deletions

12071
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
import hljs from "highlight.js/lib/highlight";
import hljs from 'highlight.js/lib/highlight';
import javascript from 'highlight.js/lib/languages/javascript';
import style from 'highlight.js/styles/github-gist.css';

View file

@ -30,7 +30,7 @@ export default class Writing {
const {default: CodeStyler} = await import(/* webpackChunkName: "code-styling" */ './../classes/codeStyler');
return new CodeStyler({
selector: '.block-code',
selector: '.block-code'
});
};
}

View file

@ -45,7 +45,7 @@ export default class Writing {
moduleEl.appendChild(this.nodes.editorWrapper);
if (settings.page){
if (settings.page) {
this.page = settings.page;
}

View file

@ -43,8 +43,10 @@ router.get('/page/:id', async (req, res, next) => {
try {
let page = await Pages.get(pageId);
let pageParent = await page.parent;
res.render('pages/page', {
page
page, pageParent
});
} catch (error) {
res.status(404);

View file

@ -8,7 +8,7 @@
</a>
{% if page._parent %}
<a href="/page/{{ page._parent }}" class="page__header-nav">
Parent {{ page._parent }}
Parent {{ pageParent.title }}
</a>
{% endif %}
<time class="page__header-time">

2466
yarn.lock

File diff suppressed because it is too large Load diff