Not logged in

@pagedown #Markdown wiki pages for Fossil

This makes any Fossil wiki page that starts with **@pagedown** render with *markdown*, insted of Fossil's *built-in* wiki format. It requires some JavaScript files to be stored in a separate branch in your Fossil repository (similary to how Github uses a gh-pages branch to store documentation for projects). This includes an install script that will prepare a Fossil repository for you. If you have questions or if you want to contribute, you can contact me at bill <dot> burdick <at> gmail <dot> com.

##Here is a list of fossil-based extensions to Pagedown markup

1. links that start with two slashes are "repository-relative" and extend the repository URL, instead of the server's top URL.

##How to install this package in a fossil repository, using the install script

1. make sure your current work is committed
1. unzip the Fossil pagedown code(//zip/ into a working directory for your repository
1. run **./install**
1. remove the code you downloaded (it's in your repository, now)

##How to install manually (this is really just a description of what the install command does)

1. make sure your current work is committed
1. make a branch, called 'pagedown', off the base commit in your repository, so you can store the files there without interfering with your project's file structure. Here's one way to do this is this:
fossil branch new web `fossil timeline -t ci|tail -1|sed -e 's/^.*^[\\([^]*\)[]].*$/\1/'`
1. check out the 'pagedown' branch (this shoud clear your directory)
1. unpack the Fossil pagedown code(../../zip/
1. place the fossil-pagedown files in the root of your project
1. add the files to fossil and commit
1. run fossil ui, go to Admin->Header and replace the contents with the contents of the provided header file
1. check out your old branch
1. remove the code you downloaded (it's in your repository, now)
1. open the fossil ui and put these lines into the head part of the header (in the Admin section of fossil):
<script src="$baseurl/doc/pagedown/jquery-1.7.1.min.js" type="text/javascript"></script> <script src="$baseurl/doc/pagedown/Markdown.Converter.js" type="text/javascript"></script> <script src="$baseurl/doc/pagedown/md.js" type="text/javascript"></script> <script> var projectName = '$project_name' var baseUrl = '$baseurl' </script>
1. add an onload="detectPagedown()" attribute to the body element in the header

##How to use markdown in wiki pages

Put @pagedown at the start of any wiki pages you want to display using markdown. You can see this in the source to this page(?mimetype=text/plain)

##How to use markdown in the body of an html page Make sure the JavaScript files are accessible to your webpage and include them in the head:

<script src="$baseurl/doc/pagedown/jquery-1.7.1.min.js" type="text/javascript"></script> <script src="/doc/pagedown/Markdown.Converter.js" type="text/javascript"></script> <script src="/doc/pagedown/md.js" type="text/javascript"></script>

Add an onload replacePagedown() attribute to body, like this:

<body onload='replacePagedown()'> ##License

Stack Overflow's Markdown.Converter.js is licensed with the MIT license(LICENSE.Pagedown?mimetype=text/plain) JQuery is licensed here( Other files are licensed with the ZLIB license(LICENSE?mimetype=text/plain) and are copyright (c) 2012 Bill Burdick