From 428d1b9565cb9a7c5ea61eaaa5358354912488e8 Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 20 Feb 2019 14:31:57 +0100 Subject: added example page --- LICENSE | 2 +- Makefile | 17 ------ README.md | 40 ++++++++++++- examples/example01/0010_first/index.md | 4 ++ .../example01/0020_second/0010_sub_first/index.md | 1 + .../example01/0020_second/0020_sub_second/index.md | 1 + examples/example01/0020_second/index.md | 4 ++ examples/example01/index.md | 4 ++ examples/example01/template.html | 66 ++++++++++++++++++++++ 9 files changed, 120 insertions(+), 19 deletions(-) delete mode 100644 Makefile create mode 100644 examples/example01/0010_first/index.md create mode 100644 examples/example01/0020_second/0010_sub_first/index.md create mode 100644 examples/example01/0020_second/0020_sub_second/index.md create mode 100644 examples/example01/0020_second/index.md create mode 100644 examples/example01/index.md create mode 100644 examples/example01/template.html diff --git a/LICENSE b/LICENSE index 04a7a8d..7016f9c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright Michal Idziorek (c) 2018.,2019 +Copyright Michal Idziorek (c) 2018,2019 All rights reserved. diff --git a/Makefile b/Makefile deleted file mode 100644 index d19bbf4..0000000 --- a/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -INDIR=/home/miguel/git/idziorek_net -INDIR=/home/miguel/git/softwarefools_com -OUTDIR=/mnt/andromeda/htmlpub/idziorek_net -OUTDIR=/mnt/andromeda/htmlpub/softwarefools_com -#OUTDIR=/tmp/idziorek_net -HTMLROOT=https://www.idziorek.net -HTMLROOT=https://www.softwarefools.com -#HTMLROOT=/tmp/idziorek_net - -run: build clean - stack run staticus-exe -- ${INDIR} ${OUTDIR} ${HTMLROOT} -build: - stack build -clean: - -rm ${OUTDIR}/* -r -showdoc: - stack haddock diff --git a/README.md b/README.md index 7a42498..4d03cc1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,41 @@ # estatico -This is a simple static website generator coded in haskell by miguel +This is a simple static website generator coded in Haskell. +It uses pandoc for the heavy work, as syntax highlighting and parsing +of the markdown files. + +## features + +* No Database +* Only Static Content +* Sitemap derived from Directory Tree +* Simple Markdown Files + +# gitweb + +https://github.com/miguelclean/estatico + +# dockerhub + +https://hub.docker.com/r/migueldirty/estatico/builds + +# example usage + +__NOTE: make sure DIR\_OUT exists and is a free directory__ + +You can use the example websites inside the examples/ directory for a start. + +Inside the input directory (e.g. ./examples/example01/) run something along this lines: + + DIR_IN=`pwd` + DIR_OUT=/mnt/yourwebsiteroot + HTML_ROOT=https://www.example.com + SUDO=sudo + IMAGE=migueldirty/estatico + ${SUDO} docker run --rm -v${DIR_IN}:/in:ro -v${DIR_OUT}:/out:rw ${IMAGE} /in /out ${HTML_ROOT} + +Or if you want to test it locally use some local DIR\_OUT and HTML\_ROOT instead: + + DIR_OUT=/home/miguel/testpage + HTML_ROOT=/home/miguel/testpage + diff --git a/examples/example01/0010_first/index.md b/examples/example01/0010_first/index.md new file mode 100644 index 0000000..02f2cb3 --- /dev/null +++ b/examples/example01/0010_first/index.md @@ -0,0 +1,4 @@ +first page +========== + +this is the first page diff --git a/examples/example01/0020_second/0010_sub_first/index.md b/examples/example01/0020_second/0010_sub_first/index.md new file mode 100644 index 0000000..257cc56 --- /dev/null +++ b/examples/example01/0020_second/0010_sub_first/index.md @@ -0,0 +1 @@ +foo diff --git a/examples/example01/0020_second/0020_sub_second/index.md b/examples/example01/0020_second/0020_sub_second/index.md new file mode 100644 index 0000000..5716ca5 --- /dev/null +++ b/examples/example01/0020_second/0020_sub_second/index.md @@ -0,0 +1 @@ +bar diff --git a/examples/example01/0020_second/index.md b/examples/example01/0020_second/index.md new file mode 100644 index 0000000..48827ce --- /dev/null +++ b/examples/example01/0020_second/index.md @@ -0,0 +1,4 @@ +second page +=========== + +second page has a submenu diff --git a/examples/example01/index.md b/examples/example01/index.md new file mode 100644 index 0000000..6363c7b --- /dev/null +++ b/examples/example01/index.md @@ -0,0 +1,4 @@ +test page +========= + +this is a simply a md file diff --git a/examples/example01/template.html b/examples/example01/template.html new file mode 100644 index 0000000..efef39f --- /dev/null +++ b/examples/example01/template.html @@ -0,0 +1,66 @@ + + + + + ###TITLE### + + + + + + + + + + + +
+ +
+ +
+ + + + + +
+ ###CONTENT### + +
+ + +
+
+
+ + + + + + + -- cgit v1.2.3