summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarc Chantreux <khatar@phear.org>2015-09-15 13:33:29 +0200
committerMarc Chantreux <khatar@phear.org>2015-09-15 13:33:29 +0200
commita457b308c39c90efceda981ddb867ea6f32f3f20 (patch)
tree2ab603458dfe0b7bff8db261afc175059dc5d0b8
downloadspore.github.io-a457b308c39c90efceda981ddb867ea6f32f3f20.tar.gz
examples from eiro.github.com
-rw-r--r--Makefile36
-rw-r--r--readme.md1
-rw-r--r--site.mk22
-rw-r--r--template.html533
4 files changed, 92 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d0dbf96
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,36 @@
+# depth is defined in subdirectories as .., ../.. and so on. 
+depth?=.
+include site.mk
+feed= news.html atom.xml unixtips.html unixtips.atom.xml
+
+all: $(basics) $(webpages) theme.css
+
+website: FORCE $(webpages) 
+
+FORCE:
+	perl6 bin/atom atom > atom.xml
+	perl6 bin/atom news > news.md
+	cd posts/2015; make
+
+menu: menu.md.
+	m4 -I$(depth)/m4 post defs render $< | pandoc -t html5 -o $@ 
+
+clean:
+	rm -f menu $(webpages)
+
+%.css: %.styl
+	stylus -c $<
+
+r.html: test_defs.zsh
+	zsh test_defs.zsh > r.tap
+	tapprouve r.tap > r.html
+
+$(keywords_m4): $(depth)/keywords
+	perl bin/m4keys  $< > $@
+	
+.md.html: $(basics)
+	$(htmlify) < $< > $@
+
+snitch:
+	@echo mdpages:  $(mdpages)
+	@echo webpages: $(webpages)
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..eaa1dcf
--- /dev/null
+++ b/readme.md
@@ -0,0 +1 @@
+# Here the spore description
diff --git a/site.mk b/site.mk
new file mode 100644
index 0000000..df9d895
--- /dev/null
+++ b/site.mk
@@ -0,0 +1,22 @@
+.POSIX:
+.SUFFIXES: .md .html .json
+SHELL=/bin/zsh
+
+mdpages  = $(wildcard *.md)
+webpages = ${mdpages:.md=.html}
+template_html=$(depth)/template.html5
+keywords_m4=$(depth)/m4/defs
+basics= $(template_html) $(keywords_m4) menu
+
+# { m4 -I$(depth)/m4 pre defs - |\
+
+htmlify = \
+    { pandoc -Vdepth=$(depth) \
+	--toc --template $(template_html) -s -B menu |\
+	    m4 -I$(depth)/m4 post defs render - }
+
+.md.json: menu
+	m4 $(depth)/defs $<  | pandoc -Vdepth=$(depth) -tjson | json_pp > $@
+
+can_comment  = perl $(depth)/add_comment_links.pl
+
diff --git a/template.html5 b/template.html5
new file mode 100644
index 0000000..617e504
--- /dev/null
+++ b/template.html5
@@ -0,0 +1,33 @@
+<!DOCTYPE html><html$if(lang)$ lang="$lang$"$endif$>
+<head><meta charset="utf-8" />
+<meta http-equiv="x-ua-compatible" content="ie=edge" />
+<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
+<link rel="stylesheet" href="$depth$/unsemantic.css"/>
+<link rel="stylesheet" href="$depth$/theme.css" />
+<link href='http://fonts.googleapis.com/css?family=Orbitron' rel='stylesheet' type='text/css'> 
+$for(author-meta)$<meta name="author" content="$author-meta$">$endfor$
+$if(date-meta)$<meta name="dcterms.date" content="$date-meta$">$endif$
+<title>$if(title-prefix)$$title-prefix$ - $endif$$if(pagetitle)$$pagetitle$$endif$</title>
+$if(highlighting-css)$<style type="text/css">$highlighting-css$</style>$endif$
+$for(css)$<link rel="stylesheet" href="$css$">$endfor$
+$if(math)$$math$$endif$
+$for(header-includes)$$header-includes$$endfor$
+</head><body $if(isa)$class="$isa$"$endif$>
+    <div id="wrapper"><header role="banner" class="grid-container">
+    <div class="grid-100"><h1>Spore - REST in pace since 2008</h1>
+</div></header>
+  <main role="main" class="grid-container">
+  <div class="grid-20">
+      <section>$for(include-before)$$include-before$$endfor$</section>
+      $if(toc)$<nav id="$idprefix$TOC">$toc$</nav>$endif$
+<img src="$depth$/logos/hackers.svg"/>
+<a href="http://mongueurs.net/"><img src="http://mongueurs.net/img/logo_100x100_idx.png" alt="Perl, what else?" title="powered by perl" /></a>
+<a href="$depth$/atom.xml"><img src="http://upload.wikimedia.org/wikipedia/en/4/43/Feed-icon.svg" alt="[Valid Atom 1.0]" title="my atom" id="atomLink" /></a> 
+<a href="http://validator.w3.org/feed/check.cgi?url=http%3A//eiro.github.io/atom.xml"><img src="http://validator.w3.org/feed/images/valid-atom.png" alt="[Valid Atom 1.0]" title="Validate my Atom 1.0 feed" /></a>
+  </div>
+<div class="grid-80">$if(title)$<h1>$title$</h1>$endif$
+    <section class="content"
+    >$body$<span class="dynamic-px-width"></span></section></div> 
+  </main>
+</div> 
+</body></html>