This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
/
default.haxproj
276 lines (231 loc) · 14.1 KB
/
default.haxproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
turn on whatever syntax highlighting for eased grokkage..
(for new projects, ignore rather than copy-paste the following
very haxtatic-codebase-developer-specific |C| directives)
no special comments syntax supported,
no random inline comments like this after the first |_| directive,
which follows:
|C|process:pages:
skip=[], force=["*"], dirs=[]
|C|_hax_onparseerror: abort
|C|dtformat:mydtf_germanstyle: %d.%m.%Y
|C|dtformat:mydtf_longmonth: %d %B
|C|dtformat:mydtf_shortmonth: %b %d
|C|hax_dir_cache:
|C|_hax_relpath_sitemap: -xml/sitemap.xml
|C|_hax_relpath_postatoms: -xml
|C|_hax_domainname: metaleap.github.io/haxtatic
|B|basics:
title="Basics", atomFile="-xml/basics.atom", blokIndexPageFile="basics/index.html", inSitemap=True, desc=>
<p>This material may appear "unduly exhaustive" at
first glance, but this is all blatantly-simple-stuff
and mostly just spelled out in (almost) every last
minor detail for completeness and future reference.</p>
<p>Notably no article on <b>"how to author pages"</b>.
That's because there's nothing to it once a quick note
is made of {X|lb:projdir where to place them|},
{X|lb:tmplsnip which outer-template is applied during processing & how|},
as well as the diverse range of {X|lt:index haXtags|}
that any page (indeed any user-authored/-customized file
in a project) may embed and combine in any manner.</p>
|B|tags:
title="haXtags", atomFile="-xml/tags.atom", blokIndexPageFile="tags/index.html", inSitemap=True, desc=>
<p class="up">Embed {T|Hax|} tags anywhere in source contents, {X|lb:tmplsnip templates|}, {X|lb:tmplsnip#snippets snippets|}
or {X|lb:haxproj *.haxproj|} files with a simple notation: <code>{<i>Prefix</i>|<i>Name</i>|<!---->}</code> or
<code>{<i>Prefix</i>|<i>Name</i>: <i>Args</i>|<!---->}</code>.</p>
<p>Example: <code>{P<!---->|date|<!---->}</code> outputs in-place the currently set {X|lb:datetime page date|} (using the
built-in fallback date-time format since none was specified in the tag) when it is processed: {X|note:{P|date|}|}.</p>
<p>Available "prefixes" (or <i>haxTag types</i>) are (in order of simplicity) <b>T</b>, <b>B</b>, <b>P</b> and <b>X</b>:</p>
|B|xtypes:
title="X-renderers", atomFile="-xml/xtypes.atom", blokIndexPageFile="xtypes/index.html", inSitemap=True, desc=>
<p>Any {X|lt:x X-tag|} {X|lb:haxproj#xdecl declared and defined|} in a project always invokes a so-called "X-renderer":</p>
<ul><li>a specific, specialized programmatic output-rendering routine integrated into the {T|Hax|} code-base,</li>
<li>each offering its own degree of configurability (the once-per-tag-definition settings) and parameterization (the
varying-dynamically-per-tag-invocation settings).</li></ul>
<p>{T|Hax|} ships with numerous such simple-yet-versatile X-renderers <b>that are listed below</b>, and custom ones may be coded up
and integrated straightforwardly in Haskell (if minimally comfortable with the language and its tool-chain) — starting from the
2 <a href="#down">demo</a> starter samples.</p>
<p>All the following built-in X-renderers are ready to use in X-tag definitions:</p>
|T|blokIntroMore_xtypes:
|T|blokIntroMore_basics:
|T|blokIntroMore_tags: {X|dox-blokmore-tags|}
|T|Hax: <i>HaXtatic</i>
|T|SiteTitle: HaXtatic Docs
|T|XdemoInfo: {T|Xpurpose|}<p>This "verging on useless" X-renderer exists solely to serve as a
<a href="http://github.com/metaleap/haxtatic/blob/master/src/X/Demo{P|xn|}.hs">code sample</a> to start from when
wanting to develop custom X-renderers within the {T|Hax|} code-base in Haskell.</p>
|T|Xearly: <h3>Stage:</h3><p>{X|lt:index#stages Early|} — this X-renderer does not require a page context for
rendering: therefore many <i>{P|fileBaseName|}</i>-invoking X-tags encountered during pre-templating (at
start-up time) may be eagerly {X|lt:index#Processing processed|} immediately in-place (for overall-reduced
per-page processing loads).</p>
|T|Xpage: <h3>Stage:</h3><p>{X|lt:index#stages Page|} — this X-renderer requires a page context for rendering: therefore
any <i>{P|fileBaseName|}</i>-invoking X-tags encountered during pre-templating (at start-up time) will be
skipped over, thus only process per-page, once present.</p>
|T|Xearlyorpage: <h3>Stage:</h3><p>{X|lt:index#stages Early or Page|} — this X-renderer determines dynamically (documented
further <a href="#dynstage">below</a>) whether or not it requires a page context for rendering, so depending on each
<i>{P|fileBaseName|}</i>-invoking X-tag's configuration and/or parameters:</p><ul><li><i>some</i> encountered
during pre-templating (at start-up time) may be eagerly {X|lt:index#Processing processed|} immediately in-place
(for overall-reduced per-page processing loads),</li> <li> and <i>others</i> will be skipped over, thus only
process per-page, once present.</li></ul>
|T|Xpurpose: {X|h: Purpose |}
|T|Xcfg: <span id="decl">{X|h: Declaration / Configuration |}</span>
|T|Xargs: <span id="args">{X|h: Invocation / Parameters |}</span>
|T|Xdecl: <p>To demonstrate valid {X|lb:haxproj#xdecl *.haxproj|} directives declaring <i>{P|fileBaseName|}</i>
{X|lt:x X-tags|}:</p>
|T|Xdeclnameopt: followed by a {X|c: :|} colon if an <b>optional</b> {X|``lb:syntax syntax-sensitive|} properties block follows,
comprised (if present at all) of <i>all</i> the following properties in <i>this</i> very order:
|T|Xdeclnotopt: a <b>mandatory</b> and {X|``lb:syntax syntax-sensitive|} properties block,
comprised of <i>all</i> the following properties in <i>this</i> very order:
|T|Xdeclopt: a {X|``lb:syntax syntax-sensitive|} but <b>optional</b> properties block,
comprised of <i>all</i> the following properties in <i>this</i> very order:
|T|Xcompact: <p class="hd-note">This topic is in a compact format for users already familiar with the essentials of
{X|lb:haxproj#xdecl declaring|} X-tags and invoking them. If found challenging, try the
{X|lx:hax.miniTag more|}-{X|lx:hax.htmlImage elaborate|}-{X|lx:hax.htmlLink and|}-{X|lx:hax.xmlEscape introductory|}
topics first to form a better grasp on the basics and overall mechanisms.</p>
|T|Xnoesc: No HTML/XML/etc.-escaping of inputs is performed, provide correct values for the intended output format.
|X|hax.htmlLink:lb: ../basics: attr = [] , xmlEscape = (False , False) , uriAutoExt = ".html"
|X|hax.htmlLink:lt: ../tags: attr = [] , xmlEscape = (False , False) , uriAutoExt = ".html"
|X|hax.htmlLink:lx: ../xtypes: attr = [] , xmlEscape = (False , False) , uriAutoExt = ".html"
|X|hax.htmlLink:_lb: basics: attr = [] , xmlEscape = (False , False) , uriAutoExt = ".html"
|X|hax.htmlLink:_lt: tags: attr = [] , xmlEscape = (False , False) , uriAutoExt = ".html"
|X|hax.htmlLink:_lx: xtypes: attr = [] , xmlEscape = (False , False) , uriAutoExt = ".html"
|X|hax.htmlImage:doxpic: {P| /-pics/otiosely/long/path |}: attrLink=[], attrImg=[], xmlEscape=False
|X|hax.xmlEscape:xesc
|X|hax.noOp:id
|X|hax.miniTag:c: code
|X|hax.miniTag:h: h2: attr=[ ("id" , "{:c:}") ]
|X|hax.miniTag:note: span: attr=[("class" , "hd-note")]
|X|hax.miniTag:xli: li
|X|hax.dtFormat:dt_std2german: :mydtf_germanstyle
|X|hax.dtFormat:dt_short2long: mydtf_shortmonth:mydtf_longmonth
|X|hax.dtFormat:dt_std2short: :mydtf_shortmonth
|X|hax.dtFormat:dt_german2iso: mydtf_germanstyle:_hax_dtformat_iso8601
|X|hax.dtFormat:dt_long2std: mydtf_longmonth:
|X|hax.htmlLinks:doxtopnav:li:
attr = [("class","ml-nav"),("&class","ml-nav-sel")],
itemsFirst = [("" , "Intro")],
itemsLast = [("xtypes/" , "{B|title:xtypes|}")],
wrapHref = ("{P|/" , "index.html|}")
|X|hax.htmlAnchors:doxpagetoc:h2:
considerEmpty = 0,
outputIfEmpty = "<style type='text/css'>.hd-toc { display: none; }</style>",
xmlEscapeHref = False
|X|hax.feedView: doxtopicindex:
xnameGroupHeading = "id",
feedWrap = ("<ul id=\"doxindexlisting\" class=\"hd-feed\">" , "</ul>"),
xnameFeedItem = "dox-topicitem",
feedMore = []
|X|hax.iterator:xdescs:
prefix = "{", suffix = "}", joinVia = "}{",
content = ""
|X|hax.iterator:myenum
|X|hax.iterator:myenumlist:
prefix = "<i><ul class=\"my-blogs\"><br/><li>",
suffix = "</li><br/></ul></i>",
joinVia = "</li><br/><li>",
content=>
<a id="b_link_</i>{:i:}<i>" href="/</i>{:v:}<i>/index.html"> </i>{B|title: {:v:} |}<i> </a>
|P|xdesc:
dt = "1234-12-15", cat = "demoSimplest", title = "", link = "http://github.com/metaleap/haxtatic/blob/master/src/X/DemoSimplest.hs",
more = [("declmore" , ""),
("cfgmore" , "<i>(no other settings)</i>"),
("usage" , "") ],
content=>
Outputs <code><h1>Hello World!</h1></code>.
|P|xdesc:
dt = "1234-11-15", cat = "demoCfgArgs", title = "", link = "http://github.com/metaleap/haxtatic/blob/master/src/X/DemoCfgArgs.hs",
more = [("declmore" , "</code> or <code>|X|demoCfgArgs:<i>myTag</i>:<i>greetname</i>"),
("cfgmore" , "<i>(no other settings)</i>"),
("usage" , "|<!---->}</code> or <code>{X<!---->|<i>myTag</i>:<i>greetname</i>") ],
content=>
Outputs <code><h4>Hello, <b><i>greetname</i>!</b></h4></code>.
|P|xdesc:
dt = "1234-10-15", cat = "hax.miniTag", title = "", link = "",
more = [("declmore" , ":<i>somehtmltag</i>: <i>..</i>"),
("cfgmore" , "{X|c:attr|}"),
("usage" , ":<i> tag's inner-markup content </i>") ],
content=>
Outputs {X|c: <<i>somehtmltag ..</i>><i>tag's inner-markup content</i></<i>somehtmltag</i>> |}.
|P|xdesc:
dt = "1234-09-10", cat = "hax.htmlImage", title = "", link = "",
more = [("declmore" , ":<i>some/rel/base/path</i>: <i>..</i>"),
("cfgmore" , "{X|c:attrLink|}, {X|c:attrImg|}, {X|c:xmlEscape|}"),
("usage" , ":<i>rel-to-base/path/no/whitespace and optionally some description text</i>") ],
content=>
Outputs {X|c: <img <i>..</i> /> |} or {X|c: <a <i>..</i>><img <i>..</i> /></a> |}.
|P|xdesc:
dt = "1234-08-25", cat = "hax.htmlLink", title = "", link = "",
more = [("declmore" , ":<i>some/rel/base/path</i>: <i>..</i>"),
("cfgmore" , "{X|c:attr|} , {X|c:xmlEscape|} , {X|c:uriAutoExt|} "),
("usage" , ":<i>rel-to-base/path/no/whitespace and then the link text text</i>") ],
content=>
Outputs {X|c: <a <i>..</i>><i>..</i></a> |}.
|P|xdesc:
dt = "1234-08-15", cat = "hax.htmlLinks", title = "", link = "",
more = [("declmore" , ":<i>outerhtmltag</i>: <i>..</i>"),
("cfgmore" , "{X|c:attr|}, {X|c:itemsFirst|}, {X|c:itemsLast|}, {X|c:wrapHref|}"),
("usage" , ": items = [..] , attr = [..]") ],
content=>
Helps with site navigation: outputs a sequence of {X|c: <a href=".."> .. </a> |} or
{X|c: <<i>outerhtmltag</i> ..><a href=".."> .. </a></<i>outerhtmltag</i>> |}
in a uniform manner.
|P|xdesc:
dt = "1234-07-20", cat = "hax.htmlAnchors", title = "", link = "",
more = [("declmore" , ":<i>gatherhtmltag</i>: <i>..</i>"),
("cfgmore" , "{X|c:considerEmpty|}, {X|c:outputIfEmpty|}, {X|c:xmlEscapeHref|}"),
("usage" , ":<i>outerhtmltag</i>: attr = [..]") ],
content=>
Helps with page-level tables-of-content: outputs a sequence of
{X|c: <a href="#.."> .. </a> |} or
{X|c: <<i>outerhtmltag</i> ..><a href="#.."> .. </a></<i>outerhtmltag</i>> |}
— one per {X|c: <<i>gatherhtmltag</i>> |} element found in the content source file.
|P|xdesc:
dt = "1234-07-10", cat = "hax.xmlEscape", title = "", link = "",
more = [("declmore" , ""),
("cfgmore" , "<i>(no other settings)</i>"),
("usage" , ": <i>any "content' to <> XML&HTML-escape</i>") ],
content=>
Outputs the given content with all occurrences of any of {X|c: & < > " ' |} each appropriately
entity-escaped for safe inclusion in HTML/XML/etc. markup.
|P|xdesc:
dt="1234-06-30", cat = "hax.dtFormat", title = "", link = "",
more = [("declmore" , ":<i>dtf_in</i>:<i>dtf_out</i>"),
("cfgmore" , "<i>(no other settings)</i>"),
("usage" , ": <i>any date/time value currently formatted as inputdtfname or as YYYY-MM-DD</i>")],
content=>
Outputs in a designated output format any input date/time text-values encoded in a designated input format.
|P|xdesc:
dt = "1234-06-22", cat = "hax.unMarkup", title = "", link = "",
more = [("declmore" , ""),
("cfgmore" , "<i>(no other settings)</i>"),
("usage" , ": <i>any content to plain-text-ify</i>") ],
content=>
Outputs the given content with HTML/XML/etc. markup tags (but not entities outside such tags) naively replaced by space characters.
|P|xdesc:
dt = "1234-06-11", cat = "hax.noOp", title = "", link = "",
more = [("declmore" , "</code> or <code>|X|hax.noOp:<i>myTag</i>:<i>constant-content-here</i>"),
("cfgmore" , "<i>(no other settings)</i>"),
("usage" , ": <i>any content to output or discard here</i>") ],
content=>
Outputs either the given content exactly-as-specified, or ignores it and outputs the pre-configured "constant" content.
|P|xdesc:
dt = "1234-06-05", cat = "hax.snippet", title = "", link = "",
more = [("declmore" , ": <i>..</i>"),
("cfgmore" , "{X|c:vars|}, {X|c:content|}"),
("usage" , ": vars = [..], content = ".."") ],
content=>
Renders the named "snippet" (aka. "controls" / "components" / "sub-templates") substituting the specified
named-parameter values.
|P|xdesc:
dt = "1234-05-15", cat = "hax.iterator", title = "", link = "",
more = [("declmore" , ": <i>..</i>"),
("cfgmore" , "{X|c:prefix|}, {X|c:suffix|}, {X|c:joinVia|}, {X|c:content|}"),
("usage" , ": .. ") ],
content=>
Outputs a sequence of values from the specified enumerator, applying the specified filtering/ordering/limits.
|P|xdesc:
dt = "1234-04-15", cat = "hax.feedView", title = "", link = "",
more = [("declmore" , ": <i>..</i>"),
("cfgmore" , "{X|c:xnameGroupHeading|}, {X|c:feedWrap|}, {X|c:xnameFeedItem|}, {X|c:feedMore|}"),
("usage" , ": feeds = [..] , groups = [..] , xVars = [..] ") ],
content=>
Renders posts from the specified feeds grouped as specified, delegating display logic to the specified X-tags.