Ticket #1714 (closed enhancement: fixed)

Opened 6 years ago

Last modified 5 years ago

Use wiki page to provide global CSS rules

Reported by: jens.b@web.de Assigned to: martin_s
Priority: normal Component: Request-a-Hack
Severity: normal Keywords: wiki css
Cc: Trac Release: 0.11

Description

I patched my trac install to supply a conversion from text/x-trac-wiki to text/css, so I can use a certain wiki page ("SiteStyle??") to give my wiki authors direct control over the site CSS (linked from the templates via <link rel="stylesheet" href="/proj/wiki/SiteStyle?format=css" type="text/css" />).

The Trac developers suggested this should be made an extension instead of a core feature (see http://trac.edgewall.org/ticket/5639), but I don't know how to hook a plugin into the respective code or where to start learning. It would be great if someone could pick this up! Perhaps even the aforementioned link element could be inserted by the plugin automatically.

Attachments

Change History

11/07/08 18:29:16 changed by martin_s

Have a look at my new AddHeadersPlugin which can be used (with trac 0.11 or later) to add the needed link tag. I tested this with Firefox 3 under Ubuntu Hardy today and Firebug (a firefox plug-in for web devlopers) tells me that there were no CSS rules found, probably because it is still sent out as text/plain not text/css. This can be fixed e.g. by writing a request provider plug-in.

Would the following be sufficient for you?:

  • Trac 0.11 or later is used.
  • Trac admin defines in the trac.ini configuration file one (or maybe more) special wiki pages which are used for CSS.
  • The plugin provides a local page, e.g. /project/wikicss.css as text/css usable for browsers.
  • The plugin also adds a header link tag so this CSS file is used when browsing trac.

11/09/08 00:01:03 changed by martin_s

  • owner changed from anybody to martin_s.
  • status changed from new to assigned.

11/09/08 00:02:23 changed by martin_s

  • keywords set to wiki css.
  • status changed from assigned to closed.
  • resolution set to fixed.
  • release changed from 0.10 to 0.11.

I implemented this now as described in comment:1 as WikiCssPlugin.


Add/Change #1714 (Use wiki page to provide global CSS rules)




Change Properties
Action