mandocsite

an attempt to use mandoc(1) as a site framework
git clone git://kloet.net/mandocsite
Download | Log | Files | Refs

Makefile (508B)


      1 INDEX = index.xml
      2 SRC   = index.8
      3 CSS   = style.css
      4 
      5 $(INDEX): $(SRC) $(CSS)
      6 	mandoc -Thtml -mdoc -O style=$(CSS) $(SRC) > $(INDEX)
      7 	sed -i '/<table class="head">/,/<\/table>/d' $(INDEX)
      8 	sed -i '/<table class="foot">/,/<\/table>/d' $(INDEX)
      9 	sed -i '1,2c\
     10 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\
     11    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\
     12 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">\
     13 	' $(INDEX)
     14 
     15 clean:
     16 	rm -f $(INDEX)
     17 
     18 serve:
     19 	python -m http.server