ReadMe.markdown @ c90dd6006009

merge
author Chris Eldredge <celdredge@fool.com>
date Mon, 13 May 2013 17:02:02 +0100
parents 737c9dda302a
children 0c5a7b4e6613
Markdown Extension for hgweb
============================

Similar to GitHub, this module looks for a file named ReadMe.md or
ReadMe.markdown (case insensitive).

A custom theme is provided that displays the formatted contents on the summary (index) view.

In addition to showing formatted information on the summary view, this module replaces
the default `file` view for `.md` or `.markdown` files, enabling you to use the
[WikiLinks](http://packages.python.org/Markdown/extensions/wikilinks.html) extension
to support documentation split across several pages.

##Install##

1. Install Python-Markdown (http://packages.python.org/Markdown/install.html)
1. Clone this repository to /example/hgext.markdown
1. Add the following to your hgweb config

config:

	[web]
	templates = /example/hgext.markdown
	style = markdown
	markdown.changeid = tip     #optional; 'tip' is default value.
	
	[extensions]
	hgext.markdown=/example/hgext.markdown


##Usage with TortoiseHg##

If you want to use this extension with TortoiseHg, you will need to
obtain the python markdown package (http://packages.python.org/Markdown/)
and uncomment the section in [\_\_init\_\_.py](\_\_init\_\_.py) that adjusts the python module path.

##Preview##

You can preview changes in your working copy before committing them by browsing to e.g. `http://localhost:8000/preview/ReadMe.markdown`.

##Security##

This extension enables users with commit/push access to hgweb to create arbitrary html content that may be browsed by other users.
At this time no attempt has been made to detect or prevent attacks such as cross-site scripting (xss) and other types of attacks.
In general this extension should only be used if you trust all users with push access.