use pandoc default files for metadata and applying templates as needed
This commit is contained in:
parent
39db7ded7d
commit
12fc6478e1
17 changed files with 50 additions and 30 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
build/
|
||||
*.html
|
||||
result
|
||||
|
|
3
build.sh
3
build.sh
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
find . -iname "*.md" -type f -exec sh -c 'pandoc -s -f markdown -t html --template=src/template.html -o "${0%.md}.html" "${0}"' {} \;
|
||||
find src -type d -exec sh -c 'srcpath="$(realpath ${0})"; outpath=$(realpath "build${0#src}"); echo "src=$srcpath; dst=$outpath"; mkdir -p "$outpath" && cd "$srcpath" && pandoc -d "${srcpath}/defaults.pandoc" -o "${outpath}/index.html" ' {} \;
|
||||
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
with pkgs;
|
||||
{
|
||||
this = callPackage ./default.nix { };
|
||||
this = callPackage ./nix { };
|
||||
}
|
8
src/blog/defaults.pandoc
Normal file
8
src/blog/defaults.pandoc
Normal file
|
@ -0,0 +1,8 @@
|
|||
defaults:
|
||||
- ../defaults.pandoc
|
||||
input-files:
|
||||
- index.md
|
||||
template: ../template.html
|
||||
|
||||
metadata:
|
||||
title: dadada's Blog
|
3
src/blog/gpg/defaults.pandoc
Normal file
3
src/blog/gpg/defaults.pandoc
Normal file
|
@ -0,0 +1,3 @@
|
|||
defaults: ../../defaults.pandoc
|
||||
metadata:
|
||||
title: Managing stripped GPG keys
|
|
@ -1,7 +1,3 @@
|
|||
---
|
||||
title: Managing stripped GPG keys
|
||||
...
|
||||
|
||||
*2017-12-03*
|
||||
|
||||
```
|
||||
|
|
3
src/blog/home-layout/defaults.pandoc
Normal file
3
src/blog/home-layout/defaults.pandoc
Normal file
|
@ -0,0 +1,3 @@
|
|||
defaults: ../../defaults.pandoc
|
||||
metadata:
|
||||
title: My $HOME
|
|
@ -1,7 +1,3 @@
|
|||
---
|
||||
title: My $HOME
|
||||
...
|
||||
|
||||
*2018-09-03*
|
||||
|
||||
Recently, I came across a blog posting titled "[$HOME, sweet $HOME](https://morr.cc/home-sweet-home/)", where [@blinry](https://morr.cc/) advocates for structuring your `$HOME` directory based on projects and their activity.
|
||||
|
|
|
@ -1,6 +1,2 @@
|
|||
---
|
||||
title: Blogs
|
||||
...
|
||||
|
||||
- [Managing stripped GPG keys](gpg/)
|
||||
- [My $HOME](home-layout/)
|
||||
|
|
13
src/defaults.pandoc
Normal file
13
src/defaults.pandoc
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Fallbacks
|
||||
|
||||
from: markdown
|
||||
to: html5
|
||||
|
||||
input-files:
|
||||
- index.md
|
||||
|
||||
standalone: true
|
||||
metadata:
|
||||
author:
|
||||
- dadada
|
||||
title: dadada
|
|
@ -1,7 +1,3 @@
|
|||
---
|
||||
title: dadada
|
||||
...
|
||||
|
||||
**Welcome to my personal homepage ;-)**
|
||||
|
||||
## About this page
|
||||
|
|
8
src/projects/defaults.pandoc
Normal file
8
src/projects/defaults.pandoc
Normal file
|
@ -0,0 +1,8 @@
|
|||
defaults:
|
||||
- ../defaults.pandoc
|
||||
input-files:
|
||||
- index.md
|
||||
template: ../template.html
|
||||
|
||||
metadata:
|
||||
title: dadada's projects
|
|
@ -1,7 +1,3 @@
|
|||
---
|
||||
title: Projects
|
||||
...
|
||||
|
||||
See also my [GitHub](https://github.com/dadada) and [Gitlab](https://gitlab.com/dadada_).
|
||||
|
||||
## Contributions
|
||||
|
|
8
src/talks/defaults.pandoc
Normal file
8
src/talks/defaults.pandoc
Normal file
|
@ -0,0 +1,8 @@
|
|||
defaults:
|
||||
- ../defaults.pandoc
|
||||
input-files:
|
||||
- index.md
|
||||
template: ../template.html
|
||||
|
||||
metadata:
|
||||
title: dadada's Talks
|
|
@ -1,5 +1 @@
|
|||
---
|
||||
title: Talks
|
||||
...
|
||||
|
||||
- [systemd.generator(7)](systemd.generator/)
|
||||
|
|
3
src/talks/systemd.generator/defaults.pandoc
Normal file
3
src/talks/systemd.generator/defaults.pandoc
Normal file
|
@ -0,0 +1,3 @@
|
|||
defaults: ../../defaults.pandoc
|
||||
metadata:
|
||||
title: systemd.generator(7)
|
|
@ -1,7 +1,3 @@
|
|||
---
|
||||
title: systemd.generator(7)
|
||||
...
|
||||
|
||||
*2019-03-14*
|
||||
|
||||
[Recording](https://www.youtube.com/watch?v=X88zHJjodFw)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue