Pass config to template

This commit is contained in:
thematdev 2022-07-15 14:07:23 +03:00
parent 636ac88daf
commit 874fb9591e
Signed by: thematdev
GPG Key ID: D12878639B090D90
3 changed files with 82 additions and 72 deletions

View File

@ -57,7 +57,7 @@ def get_pandoc_page(page):
template = data['template']
with open(f'{path}/render.html', 'r') as f:
inserted = f.read()
return render_template(template, markdown=inserted)
return render_template(template, markdown=inserted, config=data)
@app.route('/')

View File

@ -38,6 +38,8 @@ a {
white-space: pre; /* for some weird reason this affects pre blocks */
}
/* BEGIN ALGORITHMICA OLD STYLE */
body {
/* color: #444; */
font-family: "Times New Roman", Times, "Tinos", serif;
@ -544,6 +546,10 @@ a[href=''] {
cursor: default;
}
/* END OLD ALGORITHMICA STYLE */
/* BEGIN PANDOC EMBEDDED STYLE FOR CODE */
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
@ -614,4 +620,4 @@ a[href=''] {
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
/* END PANDOC EMBEDDED STYLE FOR CODE */

View File

@ -11,6 +11,10 @@
</head>
<body>
<div class="pagehead">
</div>
<div class="pagebody">
{{markdown|safe}}
</div>
</body>
</html>