Skip to content

Add Markdown formatter + exporters #2154

@josevalim

Description

@josevalim

There has been a lot of changes around this area, both in ExDoc and in AI, and I have been postponing this.

Perhaps more interesting, the following has happened:

  1. We have improved some of ExDoc so there is less duplication across formatters
  2. Other documentation tools are now including "copy markdown" or "view markdown" functionality on their pages, as seen here: https://modelcontextprotocol.io/introduction
  3. Some LLM tools are now including a llms.txt that is basically an index and points to other files, as generating a single llms.txt may blow up the context

Therefore, I propose the following:

  1. Extract the building of extras to happen outside of the formatter and instead pass it as arguments to the formatter, more likely by introducing a ExDoc.ExtraNode construct
  2. Introduce a Markdown formatter which runs by default
  3. Add a "copy markdown" button to the top of all pages if both HTML and Markdown are enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions