Compare commits
No commits in common. "34d9d8134f27d10cc27ac8dfe10540e5cdf91dd0" and "f16745d9ad3b2ba50c2965814d2fd67c4f3b3683" have entirely different histories.
34d9d8134f
...
f16745d9ad
2 changed files with 6 additions and 10 deletions
14
build.sh
14
build.sh
|
@ -18,13 +18,6 @@ template () {
|
|||
fi
|
||||
}
|
||||
|
||||
markdown () {
|
||||
# TODO: hacky
|
||||
cmark --unsafe "$1" \
|
||||
| sed "s/<a /<a rel='noopener noreferrer' /gi" \
|
||||
| sed 's/\[\[\(.*\)\]\]/<a href="\1.html">\1<\/a>/g'
|
||||
}
|
||||
|
||||
outdir=build
|
||||
mkdir -p $outdir
|
||||
# Autocopiarnos :)
|
||||
|
@ -32,7 +25,7 @@ cp ./*.sh ./*.md ./*.css ./*.png ./*.mp4 "$outdir"
|
|||
|
||||
index="$outdir/index.html"
|
||||
inicio=true header=false template "nulo.in" > "$index"
|
||||
markdown index.md >> "$index"
|
||||
cmark --unsafe index.md >> "$index"
|
||||
echo "<h2>Lista de páginas</h2><ul>" >> "$index"
|
||||
|
||||
for file in *.md; do
|
||||
|
@ -40,7 +33,10 @@ for file in *.md; do
|
|||
title="$(basename "$file" .md)"
|
||||
outfile="$outdir/$title.html"
|
||||
template "$title" "$file" > "$outfile"
|
||||
markdown "$file" >> "$outfile"
|
||||
cmark --unsafe "$file" >> "$outfile"
|
||||
# TODO: hacky
|
||||
sed -i "s/<a /<a rel='noopener noreferrer' /gi" "$outfile"
|
||||
sed -i 's/\[\[\(.*\)\]\]/<a href="\1.html">\1<\/a>/g' "$outfile"
|
||||
echo "<li><a href='$title.html'>$title</a></li>" >> "$index"
|
||||
done
|
||||
|
||||
|
|
2
index.md
2
index.md
|
@ -16,6 +16,6 @@ Algunos de mis proyectos:
|
|||
|
||||
Algunas cosas que escribí recientemente:
|
||||
|
||||
- [[Arreglando bugs ajenos]]
|
||||
- [[Arrelgando bugs ajenos]]
|
||||
|
||||
Webamigx: [nadie@nulo.in](mailto:nadie@nulo.in) <small>no gods no webmasters</small>
|
||||
|
|
Reference in a new issue