Faq

uwiger edited this page Oct 3, 2011 · 3 revisions
Clone this wiki locally

Q: Why does Edown copy stylesheet.css and erlang.png? It doesn't seem to use them.

A: True, it doesn't. The plan was to at least use the image, but Markdown does have its quirks... You can tell edown not to copy them with the help of the following standard Edoc options:

{stylesheet, ""},
{image, ""}

Q: How can I change the extension of the generated files, e.g. to ".markdown"?

A: Edoc has a standard option, which Edown also understands:

{filename_suffix, ".markdown"}

Q: My users don't want to have to deal with edown in the rebar deps. How can I easily use Edown anyway?

A: Basically, only the maintainer needs to build the edown docs, since they are made to be pushed to Github. There is an escript, edown_make, which should simplify the use of Edown from a regular Makefile, or the command-line. For example:

edown_make -config edown.config

The file edown.config will be read using file:script/1, and needs to return {AppName, Dir, Options}. An example edown.config could look like this:

% -*- erlang -*-
{erlsha2, ".", [{doclet, edown_doclet},
                {pretty_printer, erl_pp},
                {src_path, ["src/"]},
                {subpackages, true},
                {stylesheet, ""},
                {image, ""},
                {app_default,"http://www.erlang.org/doc/man"},
                {top_level_readme,
                 {"./README.md",
                  "http://github.com/vinoski/erlsha2"}}]}.