Skip to content

[RazorDocs] Consider adding syntax highlighting for code blocks #39

Closed

Description

@akrock

Context

The ColorCode.Core package was initially added to the RazorDocs project but is not currently being used. It was removed in commit [TBD] to reduce dependencies.

Proposal

Consider adding syntax highlighting for code blocks in documentation:

  • Use ColorCode.Core or similar library (e.g., Markdig.SyntaxHighlighting)
  • Apply syntax highlighting to code blocks in Markdown and XML documentation
  • Support common languages: C#, XML, JSON, etc.

Benefits

  • Improved readability of code examples
  • Better developer experience when browsing documentation
  • Consistent with modern documentation standards

Considerations

  • Performance impact of syntax highlighting
  • Bundle size increase
  • Alternative: Client-side highlighting with Prism.js or Highlight.js

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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