git.m455.casa

lol

clone url: git://git.m455.casa/lol


src/static.scm

1 ;; files ---------------------------------------------------
2 (define CONFIG-FILE "config.scm")
3
4 ;; mutated variables ---------------------------------------
5 (define *config-data*
6 #<<string-block
7 (
8 ;; variables ----------------------------------------------
9 (author "sherry blah")
10 (description "my cool blog")
11 (keywords "programming, thoughts, feelings")
12 (domain "example.com")
13
14 ;; conditionals -------------------------------------------
15 (clean-build-directory? "yes")
16 (generate-posts-page? "yes")
17 (generate-rss-feed? "yes")
18
19 ;; directories --------------------------------------------
20 (build-directory "build")
21 (source-directory "source")
22 (assets-directory "assets")
23 (templates-directory "templates")
24 (posts-directory "source/posts")
25
26 ;; files --------------------------------------------------
27 (css-file "style.css")
28 (rss-file "feed.rss")
29
30 ;; templates ----------------------------------------------
31 (html-page-template "templates/page.html")
32 (posts-page-template "templates/posts.txt")
33 (rss-channel-template "templates/channel.xml")
34 (rss-item-template "templates/item.xml")
35 )
36 string-block
37 )
38
39 (define DEFAULT-CONTENTS-CSS
40 #<<string-block
41 body {
42 font-family: sans-serif;
43 margin: 25px auto;
44 max-width: 600px;
45 line-height: 1.5;
46 }
47
48 a {
49 color: blue;
50 }
51
52 img {
53 max-width: 100%;
54 }
55
56 @media only screen and (max-width: 700px) {
57 body {
58 margin: 10px;
59 }
60 }
61 string-block
62 )
63
64 (define DEFAULT-CONTENTS-POSTS-PAGE
65 #<<string-block
66 title: posts
67
68 {{links}}
69 string-block
70 )
71
72 (define DEFAULT-CONTENTS-HTML-PAGE
73 #<<string-block
74 <!DOCTYPE html>
75 <html lang="en">
76 <head>
77 <meta charset="utf-8">
78 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
79 <link rel="alternate" type="application/rss+xml" title="RSS feed" href="https://{{domain}}/{{rss-file}}">
80 <link rel="icon" href="data:,">
81 <meta name="author" content="{{author}}">
82 <meta name="description" content="{{description}}">
83 <meta name="keywords" content="{{keywords}}">
84 <title>{{page-title}}</title>
85 <style>
86 {{css}}
87 </style>
88 </head>
89 <body>
90 {{page-contents}}
91 </body>
92 </html>
93 string-block
94 )
95
96 (define DEFAULT-CONTENTS-RSS-ITEM
97 #<<string-block
98 <item>
99 <title><![CDATA[{{page-title}}]]></title>
100 <link>{{page-url}}</link>
101 <guid isPermaLink="true">{{page-url}}</guid>
102 <pubDate>{{page-date}}</pubDate>
103 <description><![CDATA[<a href="{{page-url}}">{{page-title}}</a>]]></description>
104 </item>
105 string-block
106 )
107
108 (define DEFAULT-CONTENTS-RSS-CHANNEL
109 #<<string-block
110 <?xml version="1.0" encoding="UTF-8" ?>
111 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
112 <channel>
113 <title>{{domain}}</title>
114 <link>https://{{domain}}</link>
115 <description>RSS feed for {{domain}}</description>
116 <atom:link href="https://{{domain}}/{{rss-file}}" rel="self" type="application/rss+xml" />
117 {{rss-items}}
118 </channel>
119 </rss>
120 string-block
121 )
122