ReadMe.markdown @ 5a8c3dda25ee

Fix relative links rebase
author constantine@gmail.com
date Tue, 08 Oct 2013 00:02:43 +0700
parents ade5266185db
children (none)
Markdown Extension for hgweb
============================

[TOC]

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.

You can add relative links to [nested](relative/doca.md) pages, or to current [headers](#config),
or even to images 
_(actually at BitBucket relative links are
[broken](https://bitbucket.org/site/master/issue/6315/relative-urls-in-readmemd-files-only-work) 
and you don't see logo, but hgext.markdown can do it :)_

![logo](relative/logo.png)

##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]
	# Must be absolute path
	templates = /example/hgext.markdown/templates
	style = markdown
	#optional; 'tip' is default value.
	markdown.changeid = tip
	#optional; use in with TortoiseHG or Windows
	#markdown.egg = Markdown-2.3.1
	[extensions]
	hgext.markdown=/example/hgext.markdown


##Usage with TortoiseHg or Windows##

If you want to use this extension with TortoiseHg or Windows, you will need to
obtain the python markdown package [http://packages.python.org/Markdown/](http://packages.python.org/Markdown/), 
put Markdown-X.Y.Z.zip into extension directory and uncomment markdown.egg in config file

##Preview##

You can preview changes in your working copy before committing them by browsing to e.g.
[http://localhost:8000/preview/ReadMe.markdown](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.