initial commit

main
silverwizard 3 months ago
commit 1f0ac499f8
  1. 1
      .gitignore
  2. 7
      local.env
  3. 23
      mark.sh
  4. 3
      src/hibeck.md
  5. 3
      src/test.md
  6. 3
      src/test2.md
  7. 6
      static.sh
  8. 56
      static/style.css
  9. 2
      templates/cardbegin.html
  10. 2
      templates/cardend.html
  11. 1
      templates/date.sh
  12. 8
      templates/footer.html
  13. 4
      templates/header.html

1
.gitignore vendored

@ -0,0 +1 @@
dest/

@ -0,0 +1,7 @@
BASEDIR="/home/silverwizard/Generator/"
SRC="$BASEDIR/src"
STATIC="$BASEDIR/static"
TEMPLATES="$BASEDIR/templates"
DEST="/var/www/htdocs"
export BASEDIR SRC STATIC TEMPLATES DEST

@ -0,0 +1,23 @@
IFS='
'
cat templates/header.html > dest/index.html
for file in `find src -type f -name "*.md"`
do
src=$file
dest=`echo $file |sed -e 's/^src/dest/' -e 's/md$/html/'`
echo "SRC: $src DEST: $dest"
cat templates/header.html > $dest
cat templates/cardbegin.html >> $dest
markdown_py $src >> $dest
sh templates/date.sh $src >> $dest
cat templates/cardend.html >> $dest
cat templates/cardbegin.html >> dest/index.html
markdown_py $src >> dest/index.html
sh templates/date.sh $src >> dest/index.html
cat templates/cardend.html >> dest/index.html
cat templates/footer.html >> $dest
done
cat templates/footer.html >> dest/index.html

@ -0,0 +1,3 @@
# This should be new!
Heya Becky and Robo!

@ -0,0 +1,3 @@
# This is a test
I am trying to create a blogpost - but I don't know what I'm doing

@ -0,0 +1,3 @@
# I should have a title
I want to do another test

@ -0,0 +1,6 @@
#!/bin/sh
. ./local.env
cd $BASEDIR
sh mark.sh
cp static/* dest/
cp dest/* $DEST

@ -0,0 +1,56 @@
* {
box-sizing: border-box;
columns: 2 auto;
columns: auto 12em;
columns: auto auto;
}
body {
font-family: Arial;
padding: 20px;
background: #f1f1f1;
}
h1 {
padding: 30px;
font-size: 40px;
text-align: center;
background: white;
}
.leftcolumn {
float: left;
width: 75%;
}
.rightcolumn {
float: left;
width: 25%;
padding-left: 20px;
}
.card {
background-color: white;
padding: 20px;
margin-top: 20px;
}
.row:after {
content: "";
display: table;
clear: both;
}
.footer {
padding: 20px;
text-align: center;
background: #ddd;
margin-top: 20px;
}
@media screen and (max-width: 800px) {
.leftcolumn, .rightcolumn {
width: 100%;
padding: 0;
}
}

@ -0,0 +1,2 @@
<div class="row">
<div class="card">

@ -0,0 +1,2 @@
</div>
</div>

@ -0,0 +1 @@
echo "<h5>Post Dated: `stat -f %Sm $1`</h5>"

@ -0,0 +1,8 @@
</div>
<div class="rightcolumn">
<div class="card">
<h2>Who Am I</h2>
<p>I'm a hacker who is trying to survive the Software Crisis</p>
</div>
</div>
</html>

@ -0,0 +1,4 @@
<html>
<link rel="stylesheet" href="style.css">
<h1>A Meditation On Hating Security</h1>
<div class="leftcolumn">
Loading…
Cancel
Save