added example page
authorMiguel <m.i@gmx.at>
Wed, 20 Feb 2019 13:31:57 +0000 (14:31 +0100)
committerMiguel <m.i@gmx.at>
Wed, 20 Feb 2019 13:31:57 +0000 (14:31 +0100)
LICENSE
Makefile [deleted file]
README.md
examples/example01/0010_first/index.md [new file with mode: 0644]
examples/example01/0020_second/0010_sub_first/index.md [new file with mode: 0644]
examples/example01/0020_second/0020_sub_second/index.md [new file with mode: 0644]
examples/example01/0020_second/index.md [new file with mode: 0644]
examples/example01/index.md [new file with mode: 0644]
examples/example01/template.html [new file with mode: 0644]

diff --git a/LICENSE b/LICENSE
index 04a7a8d..7016f9c 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright Michal Idziorek <m.i@gmx.at> (c) 2018.,2019
+Copyright Michal Idziorek <m.i@gmx.at> (c) 2018,2019
 
 All rights reserved.
 
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
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
index 7a42498..4d03cc1 100644 (file)
--- 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 (file)
index 0000000..02f2cb3
--- /dev/null
@@ -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 (file)
index 0000000..257cc56
--- /dev/null
@@ -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 (file)
index 0000000..5716ca5
--- /dev/null
@@ -0,0 +1 @@
+bar
diff --git a/examples/example01/0020_second/index.md b/examples/example01/0020_second/index.md
new file mode 100644 (file)
index 0000000..48827ce
--- /dev/null
@@ -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 (file)
index 0000000..6363c7b
--- /dev/null
@@ -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 (file)
index 0000000..efef39f
--- /dev/null
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html lang="en">
+
+    <head>
+       <title>###TITLE###</title>
+       <meta charset="UTF-8" />
+        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+       <meta name="description" content="###DESCRIPTION###"/>
+       <meta name="keywords" content="###KEYWORDS###" />
+       <meta name="author" content="Anonymous" />
+        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
+       <link rel="stylesheet" href="###ROOT###/pandoc.css" />
+    </head>
+
+    <body>
+
+       <div class="container" id="top">
+
+           <div class="row">
+
+               <div class="col-12 p-0">
+    
+                   <nav class="navbar navbar-expand-sm navbar-dark bg-primary">
+
+                       <a class="navbar-brand" href="###ROOT###/index.html">
+                           testpage
+                       </a>
+
+                       <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
+                            <span class="navbar-toggler-icon"></span>
+                       </button>
+
+                       <div class="collapse navbar-collapse" id="navbarSupportedContent">
+                           <ul class="navbar-nav mr-auto">
+                               ###MENU###
+                           </ul>
+                       </div>
+
+                   </nav>
+
+                   <nav aria-label="breadcrumb">
+                       <ol class="breadcrumb">
+                          ###BREADCRUMBS###
+                       </ol>
+                   </nav>
+
+                   <div class="px-3">
+                       ###CONTENT###
+                       <ul class="nav flex-column">
+                           ###SUBMENU###
+                       </ul>
+                   </div>
+
+                   <div id="footer" class="p-3 bg-primary text-light text-center">
+                        powered by <a class="text-white" href="https://www.idziorek.net/blog/Haskell-Projects/Estatico-Page-Maker/index.html">est├ítico</a>
+                   </div>
+               </div>
+           </div>
+       </div>
+
+        <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
+        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
+        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
+    </body>
+
+</html>