Skip to content

Improve documentation #14

Description

@c0d0g3n

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions