1. Luke Plant
  2. ella

Commits

Luke Plant  committed e029a34

Added script (and CSS) for building better docs

  • Participants
  • Parent commits d1650b4
  • Branches default

Comments (0)

Files changed (2)

File build_docs.sh

View file
+#!/bin/sh
+
+SRCS=$(find src/ -name '*.hs')
+DIRS=$(find src/ -type d)
+
+# Sources
+
+for file in $SRCS 
+do 
+	ODIR=$(echo dist/doc/html/ella/`dirname $file`)
+	mkdir -p $ODIR
+	HsColour -css -anchor $file > $ODIR/`basename $file .hs`.html
+done
+for DIR in $DIRS
+do
+	DEST=dist/doc/html/ella/$DIR/hscolour.css
+	cp hscolour.css $DEST
+done
+
+# Docs
+
+haddock --html --title="Ella" --odir=dist/doc/html/ella   $SRCS \
+    --source-module="src/%{MODULE/.//}.html" \
+        --source-entity="src/%{MODULE/.//}.html#%{NAME}"

File hscolour.css

View file
+.keyglyph, .layout {color: #000099;}
+.keyword {color: blue;}
+.comment, .comment a {color: green;}
+.str, .chr {color: #003366;}
+.varop { color: #330099;}
+.num { color:red;}
+.conid { color: #993300;}
+.conid, .varid, .conop, .num, .cpp, .sel, .definition {}