diff --git a/Makefile b/Makefile
index 7761ca4dc..7d982eded 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,8 @@ SOURCEFILES:= \
Hledger/Cli/Commands/*hs \
hledger-lib/*hs \
hledger-lib/Hledger/*hs \
- hledger-lib/Hledger/Data/*hs
+ hledger-lib/Hledger/Data/*hs \
+ hledger-lib/Hledger/Read/*hs
DOCFILES:=README README2 MANUAL NEWS CONTRIBUTORS SCREENSHOTS
BINARYFILENAME=`runhaskell ./hledger.hs --binary-filename`
PATCHLEVEL:=$(shell expr `darcs changes --count --from-tag=\\\\\.` - 1)
@@ -317,12 +318,12 @@ data/100000x1000x10.journal: tools/generatejournal
# DOCUMENTATION
# Documentation source files are UPPERCASE files in the top directory.
-# website/ contains both html generated from these (UPPERCASE.html) and
-# revision-controlled resource files (everything else). website/api-doc
+# site/ contains both html generated from these (UPPERCASE.html) and
+# revision-controlled resource files (everything else). site/api-doc
# contains only generated files.
cleandocs:
- rm -rf website/[A-Z]*.html website/api-doc/*
+ rm -rf site/[A-Z]*.html site/api-doc/*
# rebuild all docs
docs: site apidocs
@@ -337,6 +338,9 @@ site: site/hakyll
cleansite: site/hakyll
cd site; ./hakyll clean
+previewsite: site/hakyll
+ cd site; ./hakyll preview
+
site/hakyll: site/hakyll.hs
cd site; ghc --make hakyll.hs $(PREFERMACUSRLIBFLAGS)
@@ -346,9 +350,9 @@ viewsite: site
# generate html versions of docs (and the hledger.org website)
# work around pandoc not handling full rst image directive
# html:
-# for d in $(DOCFILES); do $(PANDOC) --toc -s -H website/header.html -A website/footer.html -r rst $$d >website/$$d.html; done
-# cd website && ln -sf ../SCREENSHOTS && $(RST2HTML) SCREENSHOTS >SCREENSHOTS.html && rm -f SCREENSHOTS
-# cd website; rm -f index.html; ln -s README.html index.html; rm -f profs; ln -s ../profs
+# for d in $(DOCFILES); do $(PANDOC) --toc -s -H site/header.html -A site/footer.html -r rst $$d >site/$$d.html; done
+# cd site && ln -sf ../SCREENSHOTS && $(RST2HTML) SCREENSHOTS >SCREENSHOTS.html && rm -f SCREENSHOTS
+# cd site; rm -f index.html; ln -s README.html index.html; rm -f profs; ln -s ../profs
pdf: docspdf codepdf
@@ -356,7 +360,7 @@ pdf: docspdf codepdf
# generate pdf versions of main docs
# work around rst2pdf needing images in the same directory
docspdf:
- -for d in $(DOCFILES); do (cd website && ln -sf ../$$d && $(RST2PDF) $$d && rm -f $$d); done
+ -for d in $(DOCFILES); do (cd site && ln -sf ../$$d && $(RST2PDF) $$d && rm -f $$d); done
# format all code as a pdf for offline reading
ENSCRIPT=enscript -q --header='$$n|$$D{%+}|Page $$% of $$=' --line-numbers --font=Courier6 --color -o-
@@ -367,7 +371,7 @@ codepdf:
cat cabal.ps make.ps haskell.ps | ps2pdf - >code.pdf
# view all docs and code as pdf
-PDFS=website/{README,README2,MANUAL,NEWS,CONTRIBUTORS,SCREENSHOTS}.pdf code.pdf
+PDFS=site/{README,README2,MANUAL,NEWS,CONTRIBUTORS,SCREENSHOTS}.pdf code.pdf
viewall: pdf
$(VIEWPDF) $(PDFS)
@@ -384,29 +388,29 @@ pushdocs: push
# For this to work the hoogle cgi must be built with base target "main".
# XXX move the framed index building into haddock: ?
apidocs: haddock hscolour #sourcegraph #hoogle
- sed -i -e 's%^>website/api-doc/hscolour.css
+ cp site/api-doc/src-hledger.html site/api-doc/src-Main.html ; \
+ HsColour -print-css >site/api-doc/hscolour.css
sourcegraph:
-SourceGraph hledger.cabal
@@ -419,7 +423,7 @@ HOOGLE=$(HOOGLESRC)/dist/build/hoogle/hoogle
HOOGLEVER=`$(HOOGLE) --version |tail -n 1 | sed -e 's/Version /hoogle-/'`
hoogle: hoogleindex
if test -f $(HOOGLE) ; then \
- cd website/api-doc && \
+ cd site/api-doc && \
rm -f $(HOOGLEVER) && \
ln -s . $(HOOGLEVER) && \
cp -r $(HOOGLESRC)/src/res/ . && \
@@ -431,8 +435,8 @@ hoogle: hoogleindex
#generate a hoogle index
hoogleindex:
- $(HADDOCK) -o website/api-doc --hoogle $(MAIN) && \
- cd website/api-doc && \
+ $(HADDOCK) -o site/api-doc --hoogle $(MAIN) && \
+ cd site/api-doc && \
hoogle --convert=main.txt --output=default.hoo
######################################################################
@@ -555,7 +559,7 @@ pullprofs:
# make hledgerPLATFORM first
pushbinary:
-gzip -9 $(BINARYFILENAME)
- -rsync -aP $(BINARYFILENAME).gz joyful.com:/repos/hledger/website/binaries/
+ -rsync -aP $(BINARYFILENAME).gz joyful.com:/repos/hledger/site/binaries/
# show project stats useful for release notes
stats: showlastreleasedate showreleaseauthors showloc showcov showlocalchanges showreleasechanges #simplebench #showerrors