Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kjdev/apache-mod-hoedown
mod_hoedown is Markdown handler module for Apache HTTPD Server
https://github.com/kjdev/apache-mod-hoedown
Last synced: about 1 month ago
JSON representation
mod_hoedown is Markdown handler module for Apache HTTPD Server
- Host: GitHub
- URL: https://github.com/kjdev/apache-mod-hoedown
- Owner: kjdev
- License: apache-2.0
- Created: 2013-10-03T04:31:44.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-31T08:21:01.000Z (almost 11 years ago)
- Last Synced: 2024-11-18T00:52:39.392Z (2 months ago)
- Language: C
- Size: 239 KB
- Stars: 3
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mod_hoedown
mod_hoedown is Markdown handler module for Apache HTTPD Server.
## Dependencies
* [hoextdown](https://github.com/kjdev/hoextdown.git)
## Build
```
% git clone --recursive --depth=1 https://github.com/kjdev/apache-mod-hoedown.git
% cd apache-mod-hoedown
% ./autogen.sh (or autoreconf -i)
% ./configure [OPTION]
% make
% make install
```### Build options
Incorporation of external file.
* --enable-hoedown-url-support
access: `http://localhost/none.md?url=https://raw.github.com/kjdev/apache-mod-hoedown/master/README.md`
apache path.
* --with-apxs=PATH
* --with-apr=PATH
* --with-apreq2=PATH## Configration
httpd.conf:
```
LoadModule hoedown_module modules/mod_hoedown.soAddHandler hoedown .md
#
# SetHandler hoedown
#
Header
```---
### Extension options
Markdown extension support (default: Off).
#### HoedownExtSpaceHeaders
```
# hoge
#foo
```Enable:
```
hoge
#foo
```Disable:
```
hoge
foo
```#### HoedownExtTables
```
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cel
```Enable:
```
First Header
Second HeaderContent Cell
Content CellContent Cell
Content Cel```
Disable:
```
First Header | Second Header
------------- | -------------
Content Cell | Content Cell
Content Cell | Content Cel
```#### HoedownExtFencedCode
```php
echo "hello world";
```Enable:
```
echo "hello world";
```Disable:
```
php
echo "hello world";
```#### HoedownExtFootnotes
```
Footnotes[^1] have a label[^label] and a definition[^!DEF].[^1]: This is a footnote
[^label]: A footnote on "label"
[^!DEF]: The definition of a footnote.
```Enable:
```
Footnotes1 have a label2 and a definition3.
```* footer
```
```Disable:
```
Footnotes[^1] have a label[^label] and a definition[^!DEF].
[^1]: This is a footnote
[^label]: A footnote on "label"
[^!DEF]: The definition of a footnote.
```#### HoedownExtAutolink
```
https://github.com/kjdev
```Enable:
```
```Disable:
```
https://github.com/kjdev
```#### HoedownExtStrikethrough
```
this is ~~good~~ bad.
```Enable:
```
this is
goodbad.
```Disable:
```
this is ~~good~~ bad.
```#### HoedownExtUnderline
```
this is _good_ bad.
```Enable:
```
this is good bad.
```Disable:
```
this is good bad.
```#### HoedownExtHighlight
```
this is ==good== bad.
```Enable:
```
this is good bad.
```Disable:
```
this is ==good== bad.
```#### HoedownExtQuote
```
this is "good" bad.
```Enable:
```
this is good bad.
```Disable:
```
this is "good" bad.
```#### HoedownExtSuperscript
```
hoge^(fuga)
hoge ^fuga
hoge ^fu^ga
```Enable:
```
hogefuga
hoge fuga
hoge fuga
```Disable:
```
hoge^(fuga)
hoge ^fuga
hoge ^fu^ga
```#### HoedownExtLaxSpacing
?
#### HoedownExtNoIntraEmphasis
```
hoge_fuga_foo
```Enable:
```
hoge_fuga_foo
```Disable:
```
hogefugafoo
```#### HoedownExtDisableIndentedCode
```
echo "hoge"
```Enable:
```
echo "hoge"
```Disable:
```
echo "hoge"
```#### HoedownExtSpecialAttribute
```
# header {.head #id1}[kjdev](https://github.com/kjdev){#id2 .link .github}
* item1 {#item1 .item}
* item2 {.hoge #item2 .item}
```Enable:
```
header
- item1
- item2
```
Disable:
```
header {.head #id1}
kjdev{#id2 .link .github}
- item1 {#item1 .item}
- item2 {.hoge #item2 .item}
```
---
### HTML Render options
HTML render option (default: Off).
#### HoedownRenderSkipHtml
```
hogefoo
```
Enable:
```
hogefoo
```
Disable:
```
hogefoo
```
#### HoedownRenderSkipStyle
```
hogefoo
```
Enable:
```
hogefoo
```
Disable:
```
hogefoo
```
#### HoedownRenderSkipImages
```
Image:
```
Enable:
```
Image:
```
Disable:
```
Image:
```
#### HoedownRenderSkipLinks
```
Link: here
```
Enable:
```
Link: here
```
Disable:
```
Link: here
```
#### HoedownRenderExpandTabs
Does not use.
#### HoedownRenderSafelink
```
[github](https://github.com/kjdev)
[file](file:///local.file)
```
Enable:
```
github
[file](file:///local.file)
```
Disable:
```
```
#### HoedownRenderToc
```
## header2-1
## header2-2
```
Enable:
```
header2-1
header2-2
```
* toc render:
```
```
Disable:
```
header2-1
header2-2
```
#### HoedownRenderHardWrap
```
hoge
foo
```
Enable:
```
hoge
foo
```
Disable:
```
hoge
foo
```
#### HoedownRenderUseXhtml
```
---
```
Enable:
```
```
Disable:
```
```
#### HoedownRenderEscape
```
here
```
Enable:
```
<a href="#">here</a>
```
Disable:
```
```
#### HoedownRenderUseTaskList
```
* [ ] task1
* [x] task2
* [ ] task3
```
Enable:
```
- task1
- task2
- task3
```
Disable:
```
- [ ] task1
- [x] task2
- [ ] task3
```
#### HoedownRenderLineContinue
```
hoge
foo
huga
```
Enable:
```
hoge foo huga
```
Disable:
```
hoge
foo
huga
```
### Table of Contents options
Required HoedownRenderToc option.
View the table of contents as a header and footer.
#### HoedownTocHeader
Table of contents header.
#### HoedownTocFooter
Table of contents footer.
View the table of contents as a HoedownTocEnd from HoedownTocBegin.
#### HoedownTocBegin
Table of contents begin level (default: 2).
#### HoedownTocEnd
Table of contents end level (default: 6).
```
# header1
## header2
### header3
#### header4
##### header5
###### header6
```
#### Example
default:
```
```
conf: `HoedownTocBegin 1`, `HoedownTocEnd 3`
```
```
conf: `HoedownTocHeader '
```
```
You can change the toc range by specifying the toc parameters.
* `http://localhot/markdown.md?toc=3`
Same as HoedownTocBegin = 3, HoedownTocEnd = 3.
* `http://localhot/markdown.md?toc=3:5`
Same as HoedownTocBegin = 3, HoedownTocEnd = 5.
#### HoedownRenderTocUnescape
Table of contents escapel flags.
Required HoedownRenderToc option.
```
## `Hoge`
## `Foo`
```
Enable:
```
Hoge
Foo
```
* toc render:
```
```
Disable:
```
Hoge
Foo
```
* toc render:
```
```
### Class options
Set the class attribute of the list.
#### HoedownClassUl
ul tag class attribute.
```
* a
```
default:
```
- a
```
conf: `HoedownClassUl ul-list`
```
- a
```
#### HoedownClassOl
ol tag class attribute.
```
1. a
```
default:
```
- a
```
conf: `HoedownClassUl ol-list`
```
- a
```
#### HoedownClassTask
Required HoedownRenderUseTaskList option.
Class attribute of the task list (ex: `* [ ]` or `* [x]`).
```
* [ ] a
```
default:
```
- a
```
conf: `HoedownClassUl task-list`
```
- a
```
### Style options
Set the style layout file.
#### HoedownStylePath
Set the style layout file directory path (default: httpd Document root).
#### HoedownStyleDefault
Set the style layout file name.
#### HoedownStyleExtension
Set the style layout file extension (default: .html).
#### Example
/var/www/style/default.html:
```
Markdown Layout
```
conf:
```
HoedownStylePath /var/www/style
HoedownStyleDefault default
HoedownStyleExtension .html
```
This will expand the markdown file next to the line
with the `` of style.html.
#### Example multiple style
* /var/www/style/style.html
* /var/www/style/style-2.html
You can change the layout file by specifying the layout parameters.
* `http://localhot/markdown.md`
use style: /var/www/style/default.html
* `http://localhot/markdown.md?style=style`
use style: /var/www/style/style.html
* `http://localhot/markdown.md?style=style-2`
use style: /var/www/style/style-2.html
## Post Markdown
You can also send a markdown Markdown content parameter. (Send to POST)
```
POST http://localhot/markdown.md
```
form:
```
```
none.md does not exists.
### Order
Load the content in order.
1. A local file
2. Markdown Parameters
3. URL parameters
Output together.