data/articles.lisp (3830 bytes)
1 ;; MIND: The tilde character "~" must be escaped like this '~~' to use it as a literal. 2 3 (in-package #:cl-yag) 4 5 6 (setf *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 (register-generator :key :html 30 :create-site-fn #'create-html-site) 31 (register-generator :key :gopher 32 :create-site-fn #'create-gopher-hole) 33 (register-generator :key :gemini 34 :create-site-fn #'create-gemini-capsule) 35 36 ;; Define Your Webpage 37 38 (converter :name :markdown :extension ".md" :command "peg-markdown -t html -o %OUT data/%IN") 39 (converter :name :markdown2 :extension ".md" :command "multimarkdown -t html -o %OUT data/%IN") 40 (converter :name :org-mode :extension ".org" 41 :command (concatenate 'string 42 "emacs data/%IN --batch --eval '(with-temp-buffer (org-mode) " 43 "(insert-file \"%IN\") (org-html-export-as-html nil nil nil t)" 44 "(princ (buffer-string)))' --kill | tee %OUT")) 45 46 ;; Define your articles and their display-order on the website below. 47 ;; Display Order is 'lifo', i.e. the top entry in this list gets displayed as the topmost entry. 48 ;; 49 ;; An Example Of A Minimal Definition: 50 ;; (post :id "4" :date "2015-12-31" :title "Happy new year" :tag "news") 51 52 ;; An Example Of A Definitions With Options: 53 ;; (post :id "4" :date "2015-05-04" :title "The article title" :tag "news" :author "Me" :tiny "Short description for home page") 54 ;; 55 ;; A Note On Keywords: 56 ;; :author can be omitted. If so, it's value gets replaced by the value of :webmaster. 57 ;; :tiny can be omitted. If so, the article's full text gets displayed on the all-articles view. (most people don't want this.) 58 59 60 (post :title "test" 61 :id "t" :date "20171214" :tag "cl-yag" :converter :org-mode) 62 63 ;; CSS 64 (post :title "CSS For cl-yag" 65 :id "css" :date "20171202" :tag "cl-yag" 66 :author "lambda" :tiny "Read more") 67 68 ;; README 69 (post :title "README" 70 :id "README" :date "20171202" :tag "cl-yag" 71 :author "lambda" :tiny "Read cl-yag's README") 72 73 ;; 1 74 (post :title "My first post" 75 :id "1" :date "20160429" :tag "pony" 76 :tiny "This is the first message" :author "Solène")