-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnacara.js
100 lines (95 loc) · 2.92 KB
/
nacara.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
const standard = require('nacara/dist/layouts/standard/Export').default;
const mdMessage = require('nacara/dist/js/utils').mdMessage;
const React = require('react');
const prelude = require('nacara/dist/layouts/standard/Prelude');
const markdown = require('nacara/dist/js/utils').markdown;
const homepageLayout = (model, pageContext) => {
return new Promise((resolve, reject) => {
// Use the markdown converter exposed by your F# layout
const html = { __html: markdown(pageContext.Content, model.Config.Plugins.Markdown) };
const content = <div className="content" dangerouslySetInnerHTML={html} />;
// Re-use existing base page (writting in F#)
const page = prelude.basePage(model, pageContext.Attributes.Title, content);
resolve(page);
})
}
module.exports = {
githubURL: "https://github.com/thoth-org/thoth-org.github.io",
url: "https://thoth-org.github.io/",
source: "docs",
output: "docs_deploy",
baseUrl: "/",
editUrl: "https://github.com/thoth-org/thoth-org.github.io/edit/master/docs",
title: "Thoth",
debug: true,
version: "0.0.0",
navbar: {
links: [
{
href: "/index.html",
label: "Documentation",
icon: "fas fa-book"
},
{
href: "https://gitter.im/fable-compiler/Fable",
label: "Support",
icon: "fab fa-gitter",
isExternal: true
},
{
href: "https://github.com/thoth-org/",
icon: "fab fa-github",
isExternal: true
},
{
href: "https://twitter.com/MangelMaxime",
icon: "fab fa-twitter",
isExternal: true,
color: "#55acee"
}
]
},
layouts: {
default: standard.Default,
changelog: standard.Changelog,
homepage: homepageLayout
},
plugins: {
markdown: [
{
path: 'markdown-it-container',
args: [
'warning',
mdMessage("warning")
]
},
{
path: 'markdown-it-container',
args: [
'info',
mdMessage("info")
]
},
{
path: 'markdown-it-container',
args: [
'success',
mdMessage("success")
]
},
{
path: 'markdown-it-container',
args: [
'danger',
mdMessage("danger")
]
},
{
path: 'nacara/dist/js/markdown-it-anchored.js'
},
{
path: 'nacara/dist/js/markdown-it-toc.js'
}
]
}
};