You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: data/System/PublishPlugin.txt
+83-61Lines changed: 83 additions & 61 deletions
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,19 @@ _Originally written for TWiki, previously known as !GenHTMLAddOn, !PublishAddOn,
19
19
!PublishPlugin provides support for the generation of stand-alone HTML from a web. It will generate fully rendered versions of a set of Foswiki pages together with any attached files.
20
20
21
21
%TOC%
22
-
22
+
<script type="text/javascript">
23
+
function showPublishOptions() {
24
+
var select = document.getElementsByClassName('selectedFormat');
25
+
var chosen = select[0].value + 'Options';
26
+
var options = document.getElementsByClassName('publishOptionsSet');
27
+
for (var i = 0; i < options.length; i++) {
28
+
if (options[i].className.indexOf(chosen) >= 0)
29
+
options[i].style.display = 'block';
30
+
else
31
+
options[i].style.display = 'none';
32
+
}
33
+
}
34
+
</script>
23
35
When you want to read a document stored in Foswiki, you have to have access to the web server that hosts that document. There are times when this may not be desirable, or even possible. For example:
24
36
1 Foswiki is used to create documentation which has to be readable off-line
25
37
1 Published versions of Foswiki pages must be read-only
<input type="text" name="inclusions" class="foswikiInputField" value="%URLPARAM{"inclusions" default="*"}%" size="50"/><br />Use * for all topics.
99
+
<input type="text" name="inclusions" class="foswikiInputField" value="%URLPARAM{"inclusions" default="*" encode="entity"}%" size="50"/><br />Use * for all topics.
86
100
</td>
87
101
<td>
88
102
=inclusions=
@@ -94,7 +108,7 @@ padding:.5em;
94
108
the names of topics to *exclude*.
95
109
</td>
96
110
<td>
97
-
<input type="text" name="exclusions" class="foswikiInputField" value="%URLPARAM{"exclusions" default=""}%" size="50"/><br />Leave blank to include all topics.
111
+
<input type="text" name="exclusions" class="foswikiInputField" value="%URLPARAM{"exclusions" default="" encode="entity"}%" size="50"/><br />Leave blank to include all topics.
98
112
</td>
99
113
<td>
100
114
=exclusions=
@@ -105,7 +119,7 @@ padding:.5em;
105
119
Name of a topic that contains a table, each row of which maps a topic names to the version of that topic to publish.
106
120
</td>
107
121
<td>
108
-
<input type="text" name="versions" class="foswikiInputField" value="%URLPARAM{"versions" default=""}%" size="50"/><br />Leave blank to publish the most recent version of each topic. The table can be generated by a %SEARCH or other macro. For example: =| Web.<nop>TopicName | 1.33 |=. If a topic does not appear in the table, the most recent version will be published.
122
+
<input type="text" name="versions" class="foswikiInputField" value="%URLPARAM{"versions" default="" encode="entity"}%" size="50"/><br />Leave blank to publish the most recent version of each topic. The table can be generated by a %SEARCH or other macro. For example: =| Web.<nop>TopicName | 1.33 |=. If a topic does not appear in the table, the most recent version will be published.
109
123
</td>
110
124
<td>
111
125
=versions=
@@ -117,7 +131,7 @@ padding:.5em;
117
131
*excluded* if the RE matches the topic content.
118
132
</td>
119
133
<td>
120
-
<input type="text" name="filter" class="foswikiInputField" value="%URLPARAM{"filter" default=""}%" size="50" /><br />Leave blank to include all topics.
134
+
<input type="text" name="filter" class="foswikiInputField" value="%URLPARAM{"filter" default="" encode="entity"}%" size="50" /><br />Leave blank to include all topics.
121
135
</td>
122
136
<td>
123
137
=filter=
@@ -128,15 +142,15 @@ padding:.5em;
128
142
Comma-separated list of Plugins to enable during publish.
129
143
</td>
130
144
<td>
131
-
<input type="text" name="enableplugins" class="foswikiInputField" value="%URLPARAM{"enableplugins" default=""}%" size="50"/><br /> Leave blank to enable all plugins. You are recommended to disable any plugins that generate buttons in the output.<br />
145
+
<input type="text" name="enableplugins" class="foswikiInputField" value="%URLPARAM{"enableplugins" default="" encode="entity"}%" size="50"/><br /> Leave blank to enable all plugins. You are recommended to disable any plugins that generate buttons in the output.<br />
132
146
The currently enabled plugins are: %ACTIVATEDPLUGINS%
133
147
</td>
134
148
<td>
135
149
=enableplugins=
136
150
</td>
137
151
</tr>
138
152
<tr>
139
-
<th colspan="3" style="background-color:gold">Output options</th>
153
+
<th colspan="3" class="headingBar">Output options</th>
140
154
</tr>
141
155
<tr>
142
156
<td>Select skin for published HTML</td>
@@ -145,7 +159,6 @@ padding:.5em;
145
159
The skin provides the template for how topics are published. See [[%SYSTEMWEB%.Skins][Skins]] for more informations on skins.<br />
146
160
You are recommended to pick =basic_publish=, or =plain=, or a =print= skin.
147
161
Your installation may also offer a special =export= or =publish= skin.<br />%I% The =view= [[SkinTemplates][template]] is used to generate published pages, so =view.%URLPARAM{"skin" default="basic_publish"}%.tmpl= is the template that will be used to generate the output. You can preview any topic in this skin simply by appending =?skin=%URLPARAM{"skin" default="basic_publish"}%= to the end of the view URL. Note that the standard =VIEW_TEMPLATE= template override still works when publishing.
Path of a directory relative to ={PublishPlugin}{Dir}= where you want the output generated. '/' means generate the output directly in ={PublishPlugin}{Dir}=.
241
+
Path of a directory relative to ={PublishPlugin}{Dir}= where you want
242
+
the output generated. '/' means generate the output directly in
Speed up the ftp publishing by only uploading modified files. This will
323
+
store a (tiny) checksum (.md5) file on the server alongside each uploaded
324
+
file which will be used to optimise future uploads. Recommended.
325
+
</td>
326
+
<td>
327
+
=fastupload=
328
+
</td>
329
+
</tr>
314
330
</table>
315
331
</td>
316
332
</tr>
317
333
<tr>
318
-
<th colspan="3" style="background-color:gold">Other output generator options</th>
334
+
<th colspan="3" class="headingBar">
335
+
Other output generator options
336
+
</th>
319
337
</tr>
320
338
<tr>
321
-
<td>Some output generators support extra options (e.g. for =pdf=, you can add =htmldoc= command-line parameters here, such as =--linkstyle underline=)</td>
The available parameter names are shown in the publish form above, in the last column.
366
387
@@ -406,6 +427,7 @@ This add-on started life as the !GenHTMLAddon, written by Foswiki:Main/CrawfordC
406
427
| License: | GPL |
407
428
| Version: | %$VERSION% |
408
429
| Change History: | |
430
+
| 30 May 2009 | Foswikitask:Item8168: fixed genopt (extras) |
409
431
| 22 May 2009 | Foswikitask:Item8165: fixed missing BASEWEB and other internal preferences. This was resulting in the wrong web being used for some operations |
410
432
| 16 May 2009 | Foswikitask:Item1626: fixed META{"formfield" Foswikitask:Item8150: (Marc Schaefer) fix for -skin parameter Foswikitask:Item1557: doc fix Foswikitask:Item1585: allow history topic in different web Foswikitask:Item871: add missing newline at start of topic text. Foswikitask:Item1449: topic publisher was not popping the context correctly Foswikitask:Item1632: improve backporting support |
411
433
| 18 Mar 2009 | Foswikitask:Item804: automatically create publish dir Foswikitask:Item8078: support publishing to a subdir of the publish dir, under url param control |
0 commit comments