• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..Today-

conf/H13-Sep-2019-84

lang/en/H13-Sep-2019-106

READMEH A D06-Oct-20182 KiB7148

action.phpH A D06-Oct-20185 KiB153102

plugin.info.txtH A D06-Oct-2018198 76

README

1====== stylingpages plugin for DokuWiki ======
2
3Allows users to change the css/js files of this plugin with wikitext.
4
5The intended use of this plugin is to manage the css/less/js
6files that the wiki reads from the plugin folder.
7
8By default the configuration is empty.
9
10**WARNING**
11this plugin can be abused to change other files, use it with care
12
13
14===== Example configurations =====
15
161) <code>wiki:styling=/^(all|screen|print|speech)\.(css|less)$/</code>
17
18When the wiki:styling page is saved it will create, replace, or delete these files:
19
20  * all.css and all.less - for all media types
21  * screen.css and screen.less - for screen media type (style.css and style.less are alternatives)
22  * print.css and print.less - for print media type
23  * speech.css and speech.less - for speech media type
24
252) <code>wiki:styling=/^script\.js$/</code>
26
27When the wiki:styling page is saved it will create, replace, or delete this file:
28
29  * script.js
30
313) <code>wiki:styling=/^(all|screen|print|speech)\.(css|less)$/, wiki:styling=/^script\.js$/</code>
32
33You can have multiple entries with the same page.
34
354) <code>wiki:css=/^(all|screen|print|speech)\.(css|less)$/, wiki:javascript=/^script\.js$/</code>
36
37You can have different pages.
38In this screnario, I recommend restricting write access to wiki:javascript with ACL.
39
40**WARNING**
41Different pages aiming for the same file won't combine their code.
42The file will be according to the last page that was saved.
43
44
45===== Example wikitext =====
46
47<code css all.css>
48/* placed in <stylingpages_plugin_dir>/all.css */
49#dokuwiki__site::before {
50  content: 'Hello from stylingpages';
51  color: black;
52  background: white;
53  border: 1px solid red;
54}
55</code>
56
57<code css all.css>
58/* combined with the code above (same file) */
59#dokuwiki__site::after {
60  content: 'Hello from stylingpages';
61  color: black;
62  background: white;
63  border: 1px solid red;
64}
65</code>
66
67<code javascript script.js>
68/* placed in <stylingpages_plugin_dir>/script.js */
69alert('Hello from stylingpages');
70</code>
71