API and export support for comments and reactions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- git, github
- Ambito
- api, backend-api-design, cli, documentation
Direzione di ricerca
Nell’issue non sono identificati file di implementazione né test. Inizia esaminando i punti di ingresso di API v1, hackmd-cli export e GitHub sync, quindi determina come sono rappresentati i commenti, le risposte, le reazioni e gli intervalli. Il lavoro sarebbe considerato completato con un ambito concordato e un’implementazione che copra l’API proposta e il comportamento di esportazione o sincronizzazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Comments and reactions are first-class collaboration features in HackMD — the new commenting system introduced in 2024 added emoji reactions, a dedicated side panel, and expanded character limits. However, none of this data is accessible through the API, CLI, GitHub sync, or any export format.
Teams that use HackMD as part of a GitHub-centered documentation workflow lose all review context (feedback, questions, decisions captured in comment threads) when syncing notes to their repository. The comments are effectively trapped on the HackMD platform with no way to extract them.
Use Case
Our team recently migrated from Google Docs to a stack of HackMD + GitHub + Obsidian for collaborative documentation. HackMD replaced Google Docs as the real-time collaboration layer, with GitHub as the source of truth.
On Google Docs, comments traveled with the document — they could be exported, and the full discussion history was preserved. On HackMD, comments and reactions are silently dropped the moment a note is synced to GitHub. This is the single biggest gap in our workflow, and the main reason we can't fully move off Google Docs.
Current State
- API v1: No endpoints for retrieving comment or reaction data. The only comment-related field is
commentPermission(who can comment), but actual comment content is inaccessible. - CLI (
hackmd-cli export): Outputsnote.contentonly — raw markdown, no comments. - GitHub sync: Pushes markdown content as commits. Comments and reactions are not included.
- All export formats (PDF, Dropbox, Google Drive, Arweave): Omit comments entirely.
Proposed Solution
Tier 1: API endpoints (highest priority)
New REST endpoints to retrieve comment and reaction data:
GET /v1/notes/:noteId/comments
GET /v1/notes/:noteId/reactions
Suggested comment response schema:
[
{
"id": "comment-id",
"author": {
"id": "user-id",
"name": "Display Name"
},
"body": "Comment text content",
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z",
"resolved": false,
"range": {
"startLine": 42,
"endLine": 44
},
"replies": [
{
"id": "reply-id",
"author": { "id": "user-id", "name": "Display Name" },
"body": "Reply text",
"createdAt": "2025-01-15T11:00:00Z"
}
],
"reactions": [
{
"emoji": "👍",
"users": ["user-id-1", "user-id-2"]
}
]
}
]
Tier 2: CLI export flag
hackmd-cli export --noteId=<id> --include-comments
This would output a sidecar .comments.json file alongside the markdown content, enabling scripted workflows and backups.
Tier 3: GitHub sync enrichment
Option to sync comments alongside note content, either as:
- A sidecar
.comments.jsoncommitted to the repo, or - Mapped to GitHub PR review comments (for notes synced via PR workflow)
Prior Art
- Google Docs: Export includes comments; Google Docs API provides full comment/reply access
- Notion API:
GET /v1/commentsendpoint exposes all comments on a page - GitHub: Issues and PR APIs expose all comments and reactions
Impact
This is a blocker for teams that want to use HackMD's collaboration features while maintaining durable records of discussion. Without it, the collaboration context that makes HackMD valuable over a plain text editor is ephemeral and lost.
Related: #207
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 40
- Fork
- 9
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hackmdio/hackmd-io-issues
-
bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 62/100
hackmdio/hackmd-io-issues#121 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
hackmdio/hackmd-io-issues#448 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
hackmdio/hackmd-io-issues#447 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
hackmdio/hackmd-io-issues#446 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
hackmdio/hackmd-io-issues#445 · 3 commenti ·
Tutte le issue di hackmdio/hackmd-io-issues
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
OpenPrinting/cups#1833 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Task retarget keeps the old host in task scope and adds the new host in a form that matches nothingForse già presa @chaitanya0305 l’ha presa oggi. Apertabug P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BaaRai/ARTEX#652 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort:S P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
nightscout/nocturne#4563 ·
I maintainer di solito rispondono entro 1 giorno