OpenWetWare:Dewikify: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
No edit summary
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
See the [[OpenWetWare:Dewikify/Demo]] page for the dewikify process in action
#REDIRECT [[OpenWetWare:Software/Extensions/Dewikify]]
 
==OWW dewikifying==
 
To take advantage of the dewikify script on OpenWetWare, all your pages should be under one
[[OpenWetWare:Namespaces | namespace]]. For the following, let's suppose you're using the Foo namespace. Then you can access the dewikified version at http://foo.openwetware.org/. The top page will be the page just named Foo on this wiki. All links from this page to other pages that begin with Foo: will automatically be dewikified. Other pages will not be dewikified.
 
The conversion is done simply by capitalizing the first letter, e.g. foo to Foo on the wiki. However, if your namespace has a different capitalization, spaces, punctuation, or you just wish to have an alias, then you will need to contact us to do a mapping for you, e.g. syntheticbiology is mapped to Synthetic_Biology.
 
===Page Template===
The pages are dewikified by grabbing the page content and inserting it inside a template. The default template is [[Dewikify:Default]]. If you want your pages to have another format, for example, if you want to center your pages, create a page [[Dewikify:Foo]]. In the page, insert !BODY! and it will be replaced by the page. For example, look at [[Dewikify:Synthetic Biology]] (try to edit the page to see the content).
 
===Cache===
The pages are cached. Currently, it is cached for 1 day before automatically grabbing a new version from the wiki. This delay before changes on the wiki shows up on the static page perhaps can be considered a feature so that random visitors don't see your page while it has been half-updated. Otherwise, there's not much speed to be gained from this caching so if people would rather that changes instantly show up (or if you prefer it the way it is), let me know.
 
You can force a cache flush at any time and also quickly edit any page. Just add the letter 'x' to the end of any dewikified url. For example, suppose you have the page http://foo.openwetware.org/Bar.html. If you go to the URL bar and add an x to get http://foo.openwetware.org/Bar.htmlx and hit enter, then you will be automatically redirected to the OWW page to edit the page Foo:Bar. This will also clear the cache of all pages under the Foo namespace.
 
===Virtual Host===
You can also use another virtual host to hide the openwetware connection, for example [http://syntheticbiology.org/ http://syntheticbiology.org/] is the equivalent of [http://syntheticbiology.openwetware.org http://syntheticbiology.openwetware.org]. You will need to update your DNS to point the server name to the OWW server and let us know so we can setup a virtual host for you on the machine.
 
===Hiding Info on Dewikified Version===
It is possible to have stuff only show up on the wiki and not on the dewikified version or vice versa. For example, you can give the dewikified version out to the general public and you may rather not have lots of links about lab chores. To do this, you can put text that only shows up on the wiki and is completely removed during the dewikify process.
 
Two new tags are defined to allow this.
 
  <wikionly>This text will only appear on the wiki, and not when being dewikified</wikionly>
  <nonwikionly>This text will only appear on the dewikified version and not on the wiki</nonwikionly>
 
Wiki tags inside these tags are handled as expected. What this means is that you can conditionally include wiki markup. For example, lists work correctly (see the [[OpenWetWare:Dewikify/Demo]] page). You can not break up a wiki tag inside and outside one of these tags (it isn't a complete pre-processor).
 
If the closing wikionly/nonwikionly tag is followed by a newline, then that newline is also removed in the right condition. This is useful when interacting with other wiki markup.
 
==Installation==
 
This server is running the [http://austin.che.name/devel/Dewikify.pm dewikify] perl script written by [[Austin Che]]. To adapt the script to your own wiki or server, download the script and follow the instructions in the comments at the top. Optionally, you should also if you have access to the wiki server itself, install the [http://austin.che.name/devel/dewikify.php.txt dewikify.php] MediaWiki extension. This extension is required for the wikionly and nonwikionly tags.
 
----
All features and bugs are due to [[Austin Che]]. Feel free to send comments or improvements.

Latest revision as of 08:55, 17 November 2007