README.md in kramdown-man-1.0.0 vs README.md in kramdown-man-1.0.1

- old
+ new

@@ -4,15 +4,16 @@ [![Code Climate](https://codeclimate.com/github/postmodern/kramdown-man.svg)](https://codeclimate.com/github/postmodern/kramdown-man) [![Gem Version](https://badge.fury.io/rb/kramdown-man.svg)](https://badge.fury.io/rb/kramdown-man) * [Homepage](https://github.com/postmodern/kramdown-man#readme) * [Issues](https://github.com/postmodern/kramdown-man/issues) -* [Documentation](http://rubydoc.info/gems/kramdown-man/frames) +* [Documentation](https://rubydoc.info/gems/kramdown-man) ## Description -A [Kramdown][kramdown] convert for converting Markdown files into man pages. +Allows you to write man pages for commands in pure Markdown and convert them to +roff using [Kramdown][kramdown]. ## Features * Converts markdown to [roff]: * Supports codespans, emphasis, and strong fonts. @@ -20,11 +21,13 @@ * Supports codeblocks and blockquotes. * Supports bullet, numbered, and definition lists. * Supports multi-paragraph list items and blockquotes. * Supports converting `[foo-bar](foo-bar.1.md)` and `[bash](man:bash(1))` links into `SEE ALSO` man page references. -* Provides Rake task for converting `man/*.md` into man pages. +* Provides a handy `kramdown-man` command for converting or previewing + markdown man pages. +* Provides a rake task for converting `man/*.md` into man pages. * Uses the pure-Ruby [Kramdown][kramdown] markdown parser. * Supports [Ruby] 3.x, [JRuby], and [TruffleRuby]. ## Synopsis @@ -63,18 +66,26 @@ File.write('man/kramdown-man.1',doc.to_man) system 'man', 'man/kramdown-man.1' ``` +### Rake Task + Define a `man` and file tasks which render all `*.md` files within the `man/` directory: ```ruby require 'kramdown/man/task' Kramdown::Man::Task.new ``` +Then you can generate man pages for all `*.md` in the `man/` directory: + +```shell +$ rake man +``` + ## Syntax ### Code ```markdown @@ -224,32 +235,37 @@ > --Antoine de Saint-Exupéry ### Code Blocks ```markdown -Source code: - #include <stdio.h> int main() { printf("hello world\n"); return 0; } - ``` -Source code: - #include <stdio.h> int main() { printf("hello world\n"); return 0; } +#### Code Fences + + ``` + puts "hello world" + ``` + +``` +puts "hello world" +``` + ## Requirements * [kramdown] ~> 2.0 ## Install @@ -258,21 +274,21 @@ gem install kramdown-man ``` ## Alternatives -* [Redcarpet::Render::ManPage](http://rubydoc.info/gems/redcarpet/Redcarpet/Render/ManPage) +* [Redcarpet::Render::ManPage](https://rubydoc.info/gems/redcarpet/Redcarpet/Render/ManPage) * [ronn](https://github.com/rtomayko/ronn#readme) * [md2man](https://github.com/sunaku/md2man#readme) ## Copyright Copyright (c) 2013-2023 Hal Brodigan See {file:LICENSE.txt} for details. -[kramdown]: http://kramdown.gettalong.org/ -[roff]: http://en.wikipedia.org/wiki/Roff +[kramdown]: https://kramdown.gettalong.org/ +[roff]: https://en.wikipedia.org/wiki/Roff_(software) -[Ruby]: http://www.ruby-lang.org/ -[JRuby]: http://jruby.org/ +[Ruby]: https://www.ruby-lang.org/ +[JRuby]: https://jruby.org/ [TruffleRuby]: https://github.com/oracle/truffleruby#readme