depsterr.com

The sources and build system for depsterr.com
git clone git://depsterr.com/git/depsterr.com
Log | Files | Refs | LICENSE

commit 89ea8a8ef4309ab566b63dbd15769385ed038c65
Author: depsterr <depsterr@protonmail.com>
Date:   Thu, 25 Jun 2020 19:11:36 +0200

created functional page builder

Diffstat:
Adoc/about.html | 20++++++++++++++++++++
Adoc/blog/entry.html | 21+++++++++++++++++++++
Adoc/blog/entry2.html | 21+++++++++++++++++++++
Adoc/blog/index.html | 21+++++++++++++++++++++
Adoc/index.html | 20++++++++++++++++++++
Adoc/irc.html | 20++++++++++++++++++++
Afooter.html | 2++
Aheader.html | 10++++++++++
Amake_pages.sh | 42++++++++++++++++++++++++++++++++++++++++++
Anavbar.html | 6++++++
Asrc/about.md | 3+++
Asrc/blog/entry.md | 3+++
Asrc/blog/entry2.md | 3+++
Asrc/blog/index.md | 2++
Asrc/index.md | 3+++
Asrc/irc.md | 3+++
16 files changed, 200 insertions(+), 0 deletions(-)

diff --git a/doc/about.html b/doc/about.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> + <head> + <title>depsterr.com</title> + <link href=data:, rel=icon> + <style> + /* todo */ + </style> + </head> + <body> +<nav id="navbar"> + <a href="/index.html">Home</a> + <a href="/blog">Blog</a> + <a href="/about.html">About</a> + <a href="/git">git</a> +</nav> +<h1>About</h1> +<p>This is a little page that I have!</p> + </body> +</html> diff --git a/doc/blog/entry.html b/doc/blog/entry.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + <head> + <title>depsterr.com</title> + <link href=data:, rel=icon> + <style> + /* todo */ + </style> + </head> + <body> +<nav id="navbar"> + <a href="/index.html">Home</a> + <a href="/blog">Blog</a> + <a href="/about.html">About</a> + <a href="/git">git</a> +</nav> +<aside id="sidebar"><ul><li><a href="entry.html">entry</a></li><li><a href="entry2.html">entry2</a></li><li><a href="index.html">index</a></li></ul></aside> +<h1>My opinion</h1> +<p>Things</p> + </body> +</html> diff --git a/doc/blog/entry2.html b/doc/blog/entry2.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + <head> + <title>depsterr.com</title> + <link href=data:, rel=icon> + <style> + /* todo */ + </style> + </head> + <body> +<nav id="navbar"> + <a href="/index.html">Home</a> + <a href="/blog">Blog</a> + <a href="/about.html">About</a> + <a href="/git">git</a> +</nav> +<aside id="sidebar"><ul><li><a href="entry.html">entry</a></li><li><a href="entry2.html">entry2</a></li><li><a href="index.html">index</a></li></ul></aside> +<h1>My opinion 2</h1> +<p>another thing</p> + </body> +</html> diff --git a/doc/blog/index.html b/doc/blog/index.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + <head> + <title>depsterr.com</title> + <link href=data:, rel=icon> + <style> + /* todo */ + </style> + </head> + <body> +<nav id="navbar"> + <a href="/index.html">Home</a> + <a href="/blog">Blog</a> + <a href="/about.html">About</a> + <a href="/git">git</a> +</nav> +<aside id="sidebar"><ul><li><a href="entry.html">entry</a></li><li><a href="entry2.html">entry2</a></li><li><a href="index.html">index</a></li></ul></aside> +<h1>Blog</h1> +<p>welcome to the blog!</p> + </body> +</html> diff --git a/doc/index.html b/doc/index.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> + <head> + <title>depsterr.com</title> + <link href=data:, rel=icon> + <style> + /* todo */ + </style> + </head> + <body> +<nav id="navbar"> + <a href="/index.html">Home</a> + <a href="/blog">Blog</a> + <a href="/about.html">About</a> + <a href="/git">git</a> +</nav> +<h1>depsterr.com</h1> +<p>home of nothing</p> + </body> +</html> diff --git a/doc/irc.html b/doc/irc.html @@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> + <head> + <title>depsterr.com</title> + <link href=data:, rel=icon> + <style> + /* todo */ + </style> + </head> + <body> +<nav id="navbar"> + <a href="/index.html">Home</a> + <a href="/blog">Blog</a> + <a href="/about.html">About</a> + <a href="/git">git</a> +</nav> +<h1>Irc</h1> +<p><a href="irc.depsterr.com">irc.depsterr.com</a></p> + </body> +</html> diff --git a/footer.html b/footer.html @@ -0,0 +1,2 @@ + </body> +</html> diff --git a/header.html b/header.html @@ -0,0 +1,10 @@ +<!DOCTYPE html> +<html> + <head> + <title>depsterr.com</title> + <link href=data:, rel=icon> + <style> + /* todo */ + </style> + </head> + <body> diff --git a/make_pages.sh b/make_pages.sh @@ -0,0 +1,42 @@ +#! /bin/sh +cd "$(dirname "$0")" + +DESTDIR=doc +SRCDIR=src +HASHFILE=checksums + +HEADER="$SRCDIR/header.html" +NAVBAR="$SRCDIR/navbar.html" +FOOTER="$SRCDIR/footer.html" + +# md to html program +MD=smu + +# generate pages +for file in $(find "$SRCDIR" -maxdepth 1 -type f -name '*.md'); do + destination="$(echo "$file" | sed -e "s/$SRCDIR/$DESTDIR/g" -e 's/\.md/\.html/g')" + "$MD" "$file" | cat "$HEADER" "$NAVBAR" - "$FOOTER" > "$destination" +done + +# create dirs +for dir in $(find "$SRCDIR" -type d -not -name "$SRCDIR"); do + mkdir -p "${dir/$SRCDIR/$DESTDIR}" +done + +# generate blog pages +for dir in $(find "$SRCDIR" -type d -not -name "$SRCDIR"); do + sidebar="<aside id=\"sidebar\"><ul>" + for file in $(find "$dir" -type f -name '*.md' | sed 's/\.md/\.html/g'); do + file="$(basename "$file")" + sidebar="${sidebar}<li><a href=\"$file\">${file%.html}</a></li>" + done + sidebar="${sidebar}</ul></aside>" + for file in $(find "$dir" -type f -name '*.md'); do + destination="$(echo "$file" | sed -e "s/$SRCDIR/$DESTDIR/g" -e 's/\.md/\.html/g')" + cat "$HEADER" "$NAVBAR" - "$FOOTER" > "$destination" <<-EOF +$sidebar +$("$MD" "$file") +EOF + done +done + diff --git a/navbar.html b/navbar.html @@ -0,0 +1,6 @@ +<nav id="navbar"> + <a href="/index.html">Home</a> + <a href="/blog">Blog</a> + <a href="/about.html">About</a> + <a href="/git">git</a> +</nav> diff --git a/src/about.md b/src/about.md @@ -0,0 +1,3 @@ +# About + +This is a little page that I have! diff --git a/src/blog/entry.md b/src/blog/entry.md @@ -0,0 +1,3 @@ +# My opinion + +Things diff --git a/src/blog/entry2.md b/src/blog/entry2.md @@ -0,0 +1,3 @@ +# My opinion 2 + +another thing diff --git a/src/blog/index.md b/src/blog/index.md @@ -0,0 +1,2 @@ +# Blog +welcome to the blog! diff --git a/src/index.md b/src/index.md @@ -0,0 +1,3 @@ +# depsterr.com + +home of nothing diff --git a/src/irc.md b/src/irc.md @@ -0,0 +1,3 @@ +# Irc + +[irc.depsterr.com](irc.depsterr.com)