ronn: update content

This commit is contained in:
Rico Sta. Cruz 2017-10-15 14:40:01 +08:00
parent 03405b6d63
commit b640bba1d6
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 37 additions and 20 deletions

57
ronn.md
View File

@ -2,6 +2,9 @@
title: Ronn title: Ronn
category: Ruby libraries category: Ruby libraries
layout: 2017/sheet layout: 2017/sheet
updated: 2017-10-15
weight: -1
prism_languages: [bash, ruby, json, markdown]
intro: | intro: |
Ronn generates Man pages. See [ronn(1)](http://rtomayko.github.io/ronn/ronn.1.html), [ronn-format(7)](http://rtomayko.github.com/ronn/ronn-format.7.html). Also see it on GitHub: [rtomayko/ronn](https://github.com/rtomayko/ronn). Ronn generates Man pages. See [ronn(1)](http://rtomayko.github.io/ronn/ronn.1.html), [ronn-format(7)](http://rtomayko.github.com/ronn/ronn-format.7.html). Also see it on GitHub: [rtomayko/ronn](https://github.com/rtomayko/ronn).
--- ---
@ -13,13 +16,13 @@ intro: |
#### Installation #### Installation
``` ```bash
gem install ronn gem install ronn
``` ```
#### Usage #### Usage
``` ```bash
ronn foo.1.md # creates foo.1.html ronn foo.1.md # creates foo.1.html
ronn -r foo.1.md # creates foo.1 (--roff) ronn -r foo.1.md # creates foo.1 (--roff)
ronn -r -h foo.1.md # builds --roff and --html ronn -r -h foo.1.md # builds --roff and --html
@ -30,7 +33,7 @@ Ronn is a Ruby gem.
### Basic template ### Basic template
``` ```markdown
name(1) -- short, single-sentence description name(1) -- short, single-sentence description
============================================= =============================================
@ -89,9 +92,19 @@ _emphasis_
### Linking ### Linking
#### Manual references
``` ```
Manual references: sh(1) markdown(7) sh(1)
Sections: [STANDARDS][], [SEE ALSO][], [DIFFERENT TEXT][#SEE-ALSO] markdown(7)
```
#### Sections
```
[STANDARDS][]
[SEE ALSO][]
[DIFFERENT TEXT][#SEE-ALSO]
``` ```
#### URL links #### URL links
@ -104,6 +117,8 @@ Sections: [STANDARDS][], [SEE ALSO][], [DIFFERENT TEXT][#SEE-ALSO]
## Frequently-used sections ## Frequently-used sections
{: .-one-column} {: .-one-column}
### Sections
- `## SYNOPSIS` - `## SYNOPSIS`
- `## DESCRIPTION` - `## DESCRIPTION`
- `## OPTIONS` - `## OPTIONS`
@ -121,25 +136,32 @@ Sections: [STANDARDS][], [SEE ALSO][], [DIFFERENT TEXT][#SEE-ALSO]
## Other CLI options ## Other CLI options
``` ### Options
```bash
--pipe # write to stdout --pipe # write to stdout
--server, -S # serve in http://localhost:1207 --server, -S # serve in http://localhost:1207
```
```bash
--html, -5 # default --html, -5 # default
--fragment, -f # html without header/title/footer --fragment, -f # html without header/title/footer
```
```bash
--style=toc,80c # toc (table of contents) --style=toc,80c # toc (table of contents)
# 80c (use 80c instead of 100c) # 80c (use 80c instead of 100c)
# print (include print stylesheet) # print (include print stylesheet)
# dark # dark
```
```bash
--manual="MY MANUAL" # shown on top-center --manual="MY MANUAL" # shown on top-center
--organization="RONN 0.7.0" # shown on bottom-left --organization="RONN 0.7.0" # shown on bottom-left
--date="YYYY-MM-DD" # shown on bottom-center --date="YYYY-MM-DD" # shown on bottom-center
``` ```
## Sections ## Sections
See [Man page sections](http://www.december.com/unix/ref/mansec.html) (december.com).
| Section | Description | | Section | Description |
| --- | --- | | --- | --- |
@ -152,11 +174,16 @@ See [Man page sections](http://www.december.com/unix/ref/mansec.html) (december.
| `7` | Misc | | `7` | Misc |
| `8` | System administration commands and procedures | | `8` | System administration commands and procedures |
## Using ronn with npm See [Man page sections](http://www.december.com/unix/ref/mansec.html) (december.com).
## Using with npm
### npm scripts
Place manual files in `man/xxx.1.md`, then in package.json: Place manual files in `man/xxx.1.md`, then in package.json:
{: .-setup}
```js ```json
"scripts": { "scripts": {
"prepublish": "npm run build-man", "prepublish": "npm run build-man",
"build-man": "if which ronn; then ronn man/*.md --html --roff --style=toc,80c --organization=\"@rstacruz\"; fi" "build-man": "if which ronn; then ronn man/*.md --html --roff --style=toc,80c --organization=\"@rstacruz\"; fi"
@ -166,8 +193,6 @@ Place manual files in `man/xxx.1.md`, then in package.json:
} }
``` ```
## JavaScript version
### marked-man ### marked-man
``` ```
@ -175,18 +200,10 @@ npm install -g marked-man
marked-man foo.1.md > foo.1 marked-man foo.1.md > foo.1
``` ```
See [marked-man](https://github.com/kapouer/marked-man).
#### Differences #### Differences
* No definition lists * No definition lists
* Can't use `<br>` * Can't use `<br>`
### Mantastic See [marked-man](https://github.com/kapouer/marked-man).
```
curl -F page=@mymanpage.md http://mantastic.herokuapp.com
```
[mantastic](http://mantastic.herokuapp.com/) is a hosted service. It's not available at the time of writing, I don't know if it'll be back.