Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 2276 Bytes
1 | --- |
2 | title: Documentation |
3 | in_menu: true |
4 | sort_info: 7 |
5 | --- |
6 | ## Overview |
7 | |
8 | kramdown is first and foremost a library for converting text written in a superset of Markdown to |
9 | HTML. However, due to its modular architecture it is able to support additional input and output |
10 | formats. The following input and output formats are currently supported: |
11 | |
12 | * Input: [kramdown](parser/kramdown.html) (a superset of Markdown), [html](parser/html.html) |
13 | * Output: [HTML](converter/html.html), [LaTeX](converter/latex.html) |
14 | |
15 | |
16 | ## Usage |
17 | |
18 | {:ruby: lang='ruby'} |
19 | |
20 | The kramdown package provides two ways for using it: |
21 | |
22 | * **As a library** |
23 | |
24 | kramdown uses basically the same API as [RedCloth], [BlueCloth] and [Maruku]: |
25 | |
26 | require 'kramdown' |
27 | |
28 | puts Kramdown::Document.new(text).to_html |
29 | {:ruby} |
30 | |
31 | The second parameter to the `new` call is an options hash for (de)activating certain features. For |
32 | example, to disable automatic header ID generation, you can do the following: |
33 | |
34 | puts Kramdown::Document.new(text, :auto_ids => false).to_html |
35 | {:ruby} |
36 | |
37 | The default parser used is `kramdown`, however, you can select a different one with the `:input` |
38 | option: |
39 | |
40 | puts Kramdown::Document.new(text, :input => 'html').to_latex |
41 | {:ruby} |
42 | |
43 | You can also reuse the created document object to produce multiple outputs: |
44 | |
45 | doc = Kramdown::Document.new(text, :input => 'html') |
46 | puts doc.to_html |
47 | puts doc.to_latex |
48 | {:ruby} |
49 | |
50 | More information on how to use or extend kramdown can be found in the [API |
51 | documentation](rdoc/index.html)! |
52 | |
53 | * **As an application** |
54 | |
55 | Together with the library files a binary called `kramdown` is shipped which can be used to convert |
56 | text in any supported format (currently only kramdown syntax) to any supported output format (e.g. |
57 | HTML or LaTeX). It either reads from the files specified as the command line arguments or from the |
58 | standard input. For example: |
59 | |
60 | kramdown path/to/kramdown/doc/syntax.page |
61 | |
62 | The input and output formats as well as all available kramdown options are supported through |
63 | command line switches. |
64 | |
65 | |
66 | ## Tests |
67 | |
68 | kramdown uses various test suites to verify the correct working of the parsers and converters. For |
69 | more information, have a look at the [tests document](tests.html). |
70 | |
71 | |
72 | {include_file: doc/links.markdown} |