squeeze

A static site generator that can put the toothpaste back in the tube.
git clone https://git.stjo.hn/squeeze
Log | Files | Refs | README | LICENSE

markdown.pl (944B)


      1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      2 % File: markdown.pl
      3 % Description: DCG definition of a Markdown file.
      4 %	Markdown files may have no metadata at the start,
      5 %	or they may have a Title, Subtitle, and Date (all optional, but in that order).
      6 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      7 
      8 markdown(Entry, Title, Subtitle, Date) -->
      9 	"Title: ",
     10 	anything(Title),
     11 	newline,
     12 	"Subtitle: ",
     13 	anything(Subtitle),
     14 	newline,
     15 	"Date: ",
     16 	anything(Date),
     17 	newline, newline,
     18 	anything(Entry).
     19 
     20 markdown(Entry, Title, null, Date) -->
     21 	"Title: ",
     22 	anything(Title),
     23 	newline,
     24 	"Date: ",
     25 	anything(Date),
     26 	newline, newline,
     27 	anything(Entry).
     28 
     29 markdown(Entry, Title, Subtitle, null) -->
     30 	"Title: ",
     31 	anything(Title),
     32 	newline,
     33 	"Subtitle: ",
     34 	anything(Subtitle),
     35 	newline, newline,
     36 	anything(Entry).
     37 
     38 markdown(Entry, Title, null, null) -->
     39 	"Title: ",
     40 	anything(Title),
     41 	newline, newline,
     42 	anything(Entry).
     43 
     44 markdown(Entry, null, null, null) -->
     45 	anything(Entry).