DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:stylingpages

StylingPages Plugin

Compatible with DokuWiki

Greebo

plugin Allows users to change the css/js files of this plugin with wikitext

Last updated on
2018-10-06
Provides
Action
Repository
Source

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Tagged with css, javascript, style, styling

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

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

plugin/stylingpages.txt · Last modified: 2019-11-29 12:10 by Dr-Yukon

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki