haskell / haskell/hackage-server

Support `Accept: text/markdown` for package documentation

Open
#1,466 9 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
467
Forks
225
PR merge metrics
No merged PRs in 30d

Description

# 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](https://vercel.com/blog/making-agent-friendly-pages-with-content-negotiation)

# 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.