Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation #14

Open
c0d0g3n opened this issue Jan 1, 2017 · 0 comments
Open

Improve documentation #14

c0d0g3n opened this issue Jan 1, 2017 · 0 comments

Comments

@c0d0g3n
Copy link

c0d0g3n commented Jan 1, 2017

After inspecting the code, it seems there is an undocumented feature: markedRenderer. See this gist for more info. It would be nice to add that to README.md so people can know about this shortcut :).

Also, at first it wasn't clear to me that I had to put markedOptions in docpadConfig.plugins.marked. (I tried things like docpadConfig.plugins.markedOptions and docpadConfig.plugins.marked.[marked setting here]. This was probably due to me not interpreting correctly, but some extra clarity never hurts.

I suggest something like this snippet:

You can customise the Marked options by using the `markedOptions` object. Custom marked renderers can be added via `markedRenderer`, like so:
docpadConfig =
    plugins:
        marked:
            markedOptions:
                # customize Marked here... (see https://github.com/chjj/marked#options-1)
            markedRenderer:
                # custom renderer methods here...
                # same as passing a custom renderer instance to `docpadConfig.plugins.marked.markedOptions.renderer` (https://github.com/chjj/marked#renderer)
                # for accepted keys, refer: https://github.com/chjj/marked#block-level-renderer-methods and https://github.com/chjj/marked#inline-level-renderer-methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants