add html pages format

This commit is contained in:
2025-11-18 07:19:40 +01:00
parent ddd78b2707
commit dc01de4a4a
3 changed files with 36 additions and 1 deletions

View File

@@ -38,7 +38,8 @@ public/:
mkdir $@ mkdir $@
$(pages): public/%.html: %.md | public/ $(pages): public/%.html: %.md | public/
lowdown $< > $@ sed 's/\(\[.*\)\(.*\)\.md)/\1)/g' $< |\
lowdown -m filename=$(basename $@) -s --template default.html > $@
.PHONY: clean .PHONY: clean
clean: clean:

28
default.html Normal file
View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html$ifdef(lang)$ lang="$lang$"$endif$>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
$for(author.split)$
<meta name="author" content="$this.escapehtmlattr$" />
$endfor$
$ifdef(date)$
<meta name="date" content="$date.escapehtmlattr$" />
$endif$
$for(css.split)$
<link rel="stylesheet" href="$this.escapehtmlurl$" />
$endfor$
$for(javascript.split)$
<script src="$this.escapehtmlurl$"></script>
$endfor$
<title>$ifdef(title)$$title.escapehtml$$endif$</title>
$htmlheader$
</head>
<body>
$ifdef(title)$<h1>$title.escapehtml$</h1>$endif$
$body$
$ifdef(filename)$
<a href="https://gitea.dmz.rs/Decentrala/wiki/_edit/dev/$filename$" />Edit this page</a>
$endif$
</body>
</html>

View File

@@ -1,3 +1,9 @@
---
title: DMZ Wiki
lang: RS
affiliation: DMZ
---
# Znanje # Znanje
Svako može držati predavanje na bilo koju temu, samo se najavite na forumu. Svako može držati predavanje na bilo koju temu, samo se najavite na forumu.