articles.lisp - cl-yag - Common Lisp Yet Another website Generator HTML git clone git://bitreich.org/cl-yag/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/cl-yag/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- articles.lisp (3537B) --- 1 ;; MIND: The tilde character "~" must be escaped like this '~~' to use it as a literal. 2 3 4 ;; Define Your Webpage 5 6 (defvar *config* 7 (list 8 :webmaster "Your autor name here" 9 :title "Your website's title." 10 :description "Yet another website on the net" 11 :url "https://my.website/~~user/" ;; the trailing slash is mandatory! RSS links will fail without it. Notice the '~~' to produce a literal '~' 12 :rss-item-number 10 ;; limit total amount of items in RSS feed to 10 13 :date-format "%DayNumber %MonthName %Year" ;; format for date %DayNumber %DayName %MonthNumber %MonthName %Year 14 :default-converter :markdown2 15 :html t ;; 't' to enable export to a html website / 'nil' to disable 16 :gopher t ;; 't' to enable export to a gopher website / 'nil' to disable 17 :gemini t ;; 't' to enable export to a gemini capsule / 'nil' to disable 18 :gemini-path "gemini://perso.pw/blog/" ;; absolute path of your gemini capsule 19 :gemini-index "index.md" ;; filename of index file 20 :gopher-path "/user" ;; absolute path of your gopher directory 21 :gopher-server "my.website" ;; hostname of the gopher server 22 :gopher-port "70" ;; tcp port of the gopher server, 70 usually 23 :gopher-format "[~d|~a|~a|~a|~a]~%" ;; menu format (geomyidae) 24 :gopher-index "index.gph" ;; menu file (geomyidae) 25 ;; :gopher-format "~d~a ~a ~a ~a~%" ;; menu format (gophernicus and others) 26 ;; :gopher-index "gophermap" ;; menu file (gophernicus and others) 27 )) 28 29 30 (converter :name :markdown :extension ".md" :command "peg-markdown -t html -o %OUT data/%IN") 31 (converter :name :markdown2 :extension ".md" :command "multimarkdown -t html -o %OUT data/%IN") 32 (converter :name :org-mode :extension ".org" 33 :command (concatenate 'string 34 "emacs data/%IN --batch --eval '(with-temp-buffer (org-mode) " 35 "(insert-file \"%IN\") (org-html-export-as-html nil nil nil t)" 36 "(princ (buffer-string)))' --kill | tee %OUT")) 37 38 ;; Define your articles and their display-order on the website below. 39 ;; Display Order is 'lifo', i.e. the top entry in this list gets displayed as the topmost entry. 40 ;; 41 ;; An Example Of A Minimal Definition: 42 ;; (post :id "4" :date "2015-12-31" :title "Happy new year" :tag "news") 43 44 ;; An Example Of A Definitions With Options: 45 ;; (post :id "4" :date "2015-05-04" :title "The article title" :tag "news" :author "Me" :tiny "Short description for home page") 46 ;; 47 ;; A Note On Keywords: 48 ;; :author can be omitted. If so, it's value gets replaced by the value of :webmaster. 49 ;; :tiny can be omitted. If so, the article's full text gets displayed on the all-articles view. (most people don't want this.) 50 51 52 (post :title "test" 53 :id "t" :date "20171214" :tag "cl-yag" :converter :org-mode) 54 55 ;; CSS 56 (post :title "CSS For cl-yag" 57 :id "css" :date "20171202" :tag "cl-yag" 58 :author "lambda" :tiny "Read more") 59 60 ;; README 61 (post :title "README" 62 :id "README" :date "20171202" :tag "cl-yag" 63 :author "lambda" :tiny "Read cl-yag's README") 64 65 ;; 1 66 (post :title "My first post" 67 :id "1" :date "20160429" :tag "pony" 68 :tiny "This is the first message" :author "Solène")