API and export support for comments and reactions
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- git, github
- Domaine
- api, backend-api-design, cli, documentation
Piste de recherche
Aucun fichier d’implémentation ni test n’est identifié dans l’issue. Commencez par examiner les points d’entrée de API v1, hackmd-cli export et GitHub sync, puis déterminez comment sont représentés les commentaires, les réponses, les réactions et les plages. Le travail serait considéré comme terminé lorsqu’un périmètre convenu et une implémentation couvrant l’API proposée ainsi que le comportement d’exportation ou de synchronisation seraient définis.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Aucune donnée de langage
- Étoiles
- 40
- Forks
- 9
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de hackmdio/hackmd-io-issues
-
bug
Difficulté 1/5 1-3 heures Accessibilité débutants 62/100
hackmdio/hackmd-io-issues#121 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
hackmdio/hackmd-io-issues#448 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 15/100
hackmdio/hackmd-io-issues#447 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
hackmdio/hackmd-io-issues#446 ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 22/100
hackmdio/hackmd-io-issues#445 · 3 commentaires ·
Toutes les issues de hackmdio/hackmd-io-issues
Issues similaires
-
backend bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
nikhilb2/simple_invoicing#1180 ·
-
good first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
erkamyaman/rust-anything#938 ·
Les mainteneurs répondent en général sous 1 jour
-
integration: victron_gx
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
home-assistant/core#195216 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bug(worker): detector run is marked failed and never retried when span download failsPeut-être pris @jagrutgarg l’a pris aujourd’hui. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
traceroot-ai/traceroot#3434 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100