91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
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
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
Then the standard Fossil header and footer are added to the document
prior to being displayed. The "class='fossil-doc'" attribute is
required for this to occur. The "data-title='...'" attribute is
optional, but if it is present the text will become the title displayed
in the Fossil header. An example of this can be seen in the text
of the [/artifact/84b4b3d041d93a?txt=1 | Index Of Fossil Documentation]
document.
<h2>Server-Side Text Substitution</h2>
Fossil can do a few types of substitution of server-side information
into the embedded document.
<h3>1. $ROOT</h3>
To allow for repositories [server/ | served deeper than the root of the
URL hierarchy], Fossil can substitute the repository's root in the URL
scheme into HTML <tt>href</tt> and <tt>action</tt> attributes. For
example:
<nowiki><pre>
[$ROOT/doc.wiki | doc at project root]
</pre></nowiki>
might become this in the rendered HTML:
<nowiki><pre>
<a href="/project/root/doc.wiki">doc at project root</a>
</pre></nowiki>
As you can see, this happens for all source document types that end up
rendering as HTML, not just source documents in the HTML
<tt>fossil-doc</tt> format described at the end of the prior section.
<h3>2. $NONCE</h3>
If you put the string <tt>nonce="$NONCE"</tt> or <tt>nonce='$NONCE'</tt>
anywhere in your document, the server's per-page CSP nonce value is
substituted into the document at that point. This is most useful in
combination with the HTML embedded doc type when using
<tt><script></tt> and <tt><style></tt> tags to allow that
tag to be accepted by Fossil's default
[https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | CSP settings].
<h3>3. TH1 Documents</h3>
Fossil will substitute the value of [./th1.md | TH1 expressions] within
<tt>{</tt> curly braces <tt>}</tt> into the output HTML if you have
configured it with the <tt>--with-th1-docs</tt> option, which is
disabled by default.
<h2>Examples</h2>
This file that you are currently reading is an example of
embedded documentation. The name of this file in the fossil
source tree is "<b>www/embeddeddoc.wiki</b>".
You are perhaps looking at this
|