Skip to content

Support Accept: text/markdown for package documentation #1466

@Tritlo

Description

@Tritlo

Problem

Hackage serves documentation exclusively as HTML. For automated tools like LLMs, Claude Code, and bots, this means parsing HTML to extract the content, consuming a lot more tokens than required.

To make Haskell more useful for agents, we should implement a Markdown version of the docs. This allows agents (and humans!) to consume the docs directly, without having to parse the HTML. This is already implemented on Vercel

Proposal

Add content negotiation so that requests with Accept: text/markdown (the standard for agents) to return Markdown for key endpoints. Initially, we should focus on package descriptions and module documentation.

This will potentially involve having haddock generate markdown instead of HTML as it does currently. Before embarking on this project though, I would like some community feedback.

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