[Jamwiki-devel] Feedback request: custom Javascript, meta tags, etc in JAMWiki
Brought to you by:
wrh2
From: <jam...@li...> - 2011-12-20 05:54:50
|
Hi All, As part of the development for JAMWiki 1.2 I've been trying to make it easier to customize the look & feel of JAMWiki. Thus far code has been committed to: * Add a JAMWiki:Header topic for adding custom header text to all pages * Split the current "StyleSheet" CSS topic into "JAMWiki:System.css" (read-only for core CSS, will be upgraded with new core styles after major releases) and "JAMWiki:Custom.css" (editable, to allow customizations by site owners, will never be modified by upgrades) * Move some previously-hard-coded HTML to template files so that look and feel can be tweaked without requiring a re-compile. One area that I would like to get some feedback on is how best to allow custom code to be inserted in the document's <head> tag, such as <meta> tags, <script> tags, etc. I looked through the Mediawiki docs on this subject, and they don't have a particularly elegant solution, so I'd be interested in suggestions. I'd like it to be easy for a site to (for example) include JQuery or add Facebook meta tags, and the options I was considering are: 1. Add a text block that admins can edit via Special:Admin that will simply be copied verbatim into the document <head>. This is flexible, but will break page rendering if the HTML syntax is wrong. 2. Add an editable wiki topic (admin-only permission) that does the same as #1, and has the same downside as #1. 3. Add new JAMWiki:System.js and JAMWiki:Custom.js system topics that hold Javascript, similar to the current CSS topics. To support custom <meta> tags, a key-value entry tool could be built in the Special:Admin interface. 4. ??? I've been giving this some thought for a while now and haven't come up with a solution that I'm happy with, so any suggestions from the people on this list, and ideally pointers to any other projects that have implemented this type of functionality in an elegant way, would be much appreciated. Ryan |