#16 Feature: Markdown rendering support

Zamknięty
otworzone 9 miesięcy temu przez claude · 3 komentarzy

Description

Add support for Gogs Markdown rendering APIs to the MCP server.

Why This Feature?

Markdown rendering APIs allow preview and conversion of markdown text to HTML without committing files. This is useful for documentation tools, preview features, and content management systems that need to display formatted markdown.

Requirements

  • Implement render_markdown tool - Render markdown text to HTML
  • Implement render_markdown_raw tool - Render raw markdown document to HTML
  • Add proper TypeScript types for rendering requests and responses
  • Support GitHub Flavored Markdown (GFM) features
  • Support context parameter for repository-aware rendering
  • Update documentation with usage examples

API Endpoints to Implement

  • POST /markdown - Render markdown text with options
  • POST /markdown/raw - Render raw markdown (simpler, text-only input)

Use Cases

  • Preview README.md before committing
  • Render issue/comment markdown for display
  • Generate documentation from markdown sources
  • Build custom markdown editors with live preview

Related

Requested by @fszontagh in #4

API Reference

See Gogs API documentation for miscellaneous/markdown endpoints.

## Description Add support for Gogs Markdown rendering APIs to the MCP server. ## Why This Feature? Markdown rendering APIs allow preview and conversion of markdown text to HTML without committing files. This is useful for documentation tools, preview features, and content management systems that need to display formatted markdown. ## Requirements - Implement `render_markdown` tool - Render markdown text to HTML - Implement `render_markdown_raw` tool - Render raw markdown document to HTML - Add proper TypeScript types for rendering requests and responses - Support GitHub Flavored Markdown (GFM) features - Support context parameter for repository-aware rendering - Update documentation with usage examples ## API Endpoints to Implement - `POST /markdown` - Render markdown text with options - `POST /markdown/raw` - Render raw markdown (simpler, text-only input) ## Use Cases - Preview README.md before committing - Render issue/comment markdown for display - Generate documentation from markdown sources - Build custom markdown editors with live preview ## Related Requested by @fszontagh in #4 ## API Reference See Gogs API documentation for miscellaneous/markdown endpoints.
Claude Coding Agent skomentował 9 miesięcy temu
Właściciel

@fszontagh I'm starting work on this issue now! I'll implement the Markdown rendering support by:

  1. Adding the two new API endpoints to the Gogs client (POST /markdown and POST /markdown/raw)
  2. Creating proper TypeScript types for the rendering requests and responses
  3. Implementing the two MCP tools: render_markdown and render_markdown_raw
  4. Updating the documentation (README.md and CLAUDE.md) with the new tools and usage examples

I'll follow the existing code patterns in the repository and ensure proper error handling.

@fszontagh I'm starting work on this issue now! I'll implement the Markdown rendering support by: 1. Adding the two new API endpoints to the Gogs client (POST /markdown and POST /markdown/raw) 2. Creating proper TypeScript types for the rendering requests and responses 3. Implementing the two MCP tools: render_markdown and render_markdown_raw 4. Updating the documentation (README.md and CLAUDE.md) with the new tools and usage examples I'll follow the existing code patterns in the repository and ensure proper error handling.
Claude Coding Agent skomentował 9 miesięcy temu
Właściciel

Implementation Complete!

I've successfully implemented Markdown rendering support for the Gogs MCP server. Here's what was added:

Changes Made

1. TypeScript Types (src/types.ts)

  • Added GogsMarkdownMode type: 'gfm' | 'markdown'
  • Added GogsMarkdownRequest interface with text, mode, and context fields
  • Added GogsMarkdownResponse interface

2. Gogs Client Methods (src/gogs-client.ts)

  • renderMarkdown(data: GogsMarkdownRequest) - Full-featured markdown rendering with GFM and repository context support
  • renderMarkdownRaw(text: string) - Simple text-to-HTML conversion

3. MCP Tools (src/server.ts)

  • render_markdown - Renders markdown with GitHub Flavored Markdown support and repository context
    • Parameters: text (required), mode (optional: 'gfm' or 'markdown'), context (optional: 'owner/repo')
  • render_markdown_raw - Simple markdown rendering
    • Parameters: text (required)

4. Documentation Updates

  • Updated README.md with comprehensive tool documentation, examples, and use cases
  • Updated CLAUDE.md with new Markdown Rendering tool category
  • Added feature to the main features list

Features Implemented

✅ Support for GitHub Flavored Markdown (GFM) ✅ Support for standard Markdown mode ✅ Repository context parameter for issue/PR reference resolution ✅ Two endpoints: full-featured and raw/simple ✅ Comprehensive documentation with examples ✅ TypeScript type safety throughout ✅ Proper error handling

Usage Example

{
  "text": "# Hello World\n\nThis is **bold** text. See issue #42.",
  "mode": "gfm",
  "context": "claude/gogs-mcp"
}

Testing

✅ TypeScript compilation successful (no errors) ✅ All changes committed and pushed to main branch ✅ Commit reference: #16

API Endpoints Used

  • POST /markdown - Full markdown rendering with options
  • POST /markdown/raw - Raw markdown rendering (text/plain input)

The implementation follows all existing code patterns and includes proper type safety, error handling, and comprehensive documentation.

✅ **Implementation Complete!** I've successfully implemented Markdown rendering support for the Gogs MCP server. Here's what was added: ## Changes Made ### 1. TypeScript Types (src/types.ts) - Added `GogsMarkdownMode` type: 'gfm' | 'markdown' - Added `GogsMarkdownRequest` interface with text, mode, and context fields - Added `GogsMarkdownResponse` interface ### 2. Gogs Client Methods (src/gogs-client.ts) - **`renderMarkdown(data: GogsMarkdownRequest)`** - Full-featured markdown rendering with GFM and repository context support - **`renderMarkdownRaw(text: string)`** - Simple text-to-HTML conversion ### 3. MCP Tools (src/server.ts) - **`render_markdown`** - Renders markdown with GitHub Flavored Markdown support and repository context - Parameters: text (required), mode (optional: 'gfm' or 'markdown'), context (optional: 'owner/repo') - **`render_markdown_raw`** - Simple markdown rendering - Parameters: text (required) ### 4. Documentation Updates - Updated **README.md** with comprehensive tool documentation, examples, and use cases - Updated **CLAUDE.md** with new Markdown Rendering tool category - Added feature to the main features list ## Features Implemented ✅ Support for GitHub Flavored Markdown (GFM) ✅ Support for standard Markdown mode ✅ Repository context parameter for issue/PR reference resolution ✅ Two endpoints: full-featured and raw/simple ✅ Comprehensive documentation with examples ✅ TypeScript type safety throughout ✅ Proper error handling ## Usage Example ```json { "text": "# Hello World\n\nThis is **bold** text. See issue #42.", "mode": "gfm", "context": "claude/gogs-mcp" } ``` ## Testing ✅ TypeScript compilation successful (no errors) ✅ All changes committed and pushed to main branch ✅ Commit reference: #16 ## API Endpoints Used - `POST /markdown` - Full markdown rendering with options - `POST /markdown/raw` - Raw markdown rendering (text/plain input) The implementation follows all existing code patterns and includes proper type safety, error handling, and comprehensive documentation.
Claude Coding Agent skomentował 9 miesięcy temu
Właściciel

@fszontagh The markdown rendering feature is now fully implemented and deployed! 🎉

Commit: 536c8c9 - feat: add markdown rendering support #16

What's Available:

  1. render_markdown - Full-featured markdown rendering

    • GitHub Flavored Markdown (GFM) or standard Markdown
    • Repository context for issue/PR references
    • Perfect for preview features
  2. render_markdown_raw - Simple text-to-HTML conversion

    • Lightweight and straightforward
    • Great for quick previews

Try It Out:

You can now use these tools through the MCP server to:

  • Preview README.md files before committing
  • Render issue/comment markdown for display
  • Generate documentation from markdown sources
  • Build custom markdown editors with live preview

All changes have been pushed to the main branch and the documentation is up to date. Ready for use!

@fszontagh The markdown rendering feature is now fully implemented and deployed! 🎉 **Commit:** `536c8c9` - feat: add markdown rendering support #16 **What's Available:** 1. **render_markdown** - Full-featured markdown rendering - GitHub Flavored Markdown (GFM) or standard Markdown - Repository context for issue/PR references - Perfect for preview features 2. **render_markdown_raw** - Simple text-to-HTML conversion - Lightweight and straightforward - Great for quick previews **Try It Out:** You can now use these tools through the MCP server to: - Preview README.md files before committing - Render issue/comment markdown for display - Generate documentation from markdown sources - Build custom markdown editors with live preview All changes have been pushed to the main branch and the documentation is up to date. Ready for use!
Zaloguj się, aby dołączyć do tej rozmowy.
Brak kamienia milowego
Brak przypisania
1 uczestników
Ładowanie...
Anuluj
Zapisz
Nie ma jeszcze treści.