Table of Contents
StylingPages Plugin
Compatible with DokuWiki
- 2022-07-31 "Igor" unknown
- 2020-07-29 "Hogfather" unknown
- 2018-04-22 "Greebo" yes
- 2017-02-19 "Frusterick Manners" unknown
The intended use of this plugin is to manage the css/less/js files that the wiki reads from the plugin folder.
By default the configuration is empty.
WARNING
this plugin can be abused to change other files, use it with care
Installation
Install the plugin using the Plugin Manager and the download URL above, which points to the latest version of the plugin. Refer to Plugins on how to install plugins manually.
Examples/Usage
I use it to:
- customize the template (a.k.a. theme)
- add an advertisement
- style classes for plugin wrap
- …anything else that can be done with css and javascript after the page is loaded…
WARNING
I recommend you restrict page edits with ACL when you allow script.js
See README for more examples.
This example creates, replaces, or deletes these files when the page wiki:styling is saved:
- all.css and all.less - for all media types
- screen.css and screen.less - for screen media type (style.css and style.less are alternatives)
- print.css and print.less - for print media type
- speech.css and speech.less - for speech media type
- script.js
Configuration:
wiki:styling=/^(all|screen|print|speech)\.(css|less)$/, wiki:styling=/^script\.js$/
Wikitext of wiki:styling:
<code css all.css> /* placed in <stylingpages_plugin_dir>/all.css */ #dokuwiki__site::before { content: 'Hello from stylingpages'; color: black; background: white; border: 1px solid red; } </code> <code css all.css> /* combined with the code above (same file) */ #dokuwiki__site::after { content: 'Hello from stylingpages'; color: black; background: white; border: 1px solid red; } </code> <code javascript script.js> /* placed in <stylingpages_plugin_dir>/script.js */ alert('Hello from stylingpages'); </code>
Development
Change Log
- Initial version (2018-10-06 16:24)
Known Bugs and Issues
ToDo/Wish List
Create an issue if you want something.
FAQ
No FAQ entries yet.
Discussion
I prefer issues, but you can also leave messages here. — flaviojs 2018-10-06 17:05