The Tailwind CDN typography plugin configuration wasn't applying correctly
in the browser. Reverted to using custom CSS with !important flags to ensure
dark code block backgrounds are properly applied.
- Code blocks: #14151f (slightly darker than main background)
- Inline code: #1a1b26 (matches main background)
- Text: #c0caf5 (light text for readability)
This is a pragmatic fix that ensures the documentation remains readable while
we investigate the Tailwind CDN typography plugin issue.
Replaced custom <style> blocks with Tailwind Typography plugin configuration
to set dark theme colors for code blocks. This complies with the project
guideline of no custom CSS - all styling now uses Tailwind utilities.
Changes:
- Removed <style> tags from docs templates
- Added typography.extend.invert.css configuration to tailwind.config
- Code blocks now use #14151f background (slightly darker than main #1a1b26)
- Inline code uses theme colors from Tailwind config
- Copy buttons still work with same functionality
Applied the color change (#14151f instead of #1a1b26 for code blocks)
to the DocsLayout function, making code blocks slightly darker than the
main background for better visual distinction.
Changed code block backgrounds to be slightly darker than the main background:
- Main background: #1a1b26
- Code blocks (pre): #14151f (slightly darker to stand out)
- Inline code: #1a1b26 (matches main background for subtlety)
This creates a subtle distinction that makes code blocks visually
distinct while maintaining the dark theme aesthetic.
- Fixed white background in code blocks by adding custom CSS
- Code blocks now use dark background (#1a1b26 for pre, #16161e for code)
- Inline code matches theme colors
- Added copy buttons to all code blocks
- Button appears on hover (top-right corner)
- Shows 'Copy' → 'Copied!' feedback
- Uses Clipboard API for copying code
- Copy buttons styled to match documentation theme
This improves the dark mode documentation experience with better
code block visibility and usability.
Added ?plugins=typography to Tailwind CDN script to enable prose classes.
This fixes the 'wall of text' issue in documentation by properly styling:
- Headings, paragraphs, lists with proper spacing
- Line-height and typography improvements
- Code blocks, blockquotes, tables, and links
The prose classes now work correctly with the CDN version of Tailwind.
Remove <style> tags with sidebar transitions, scrollbars, and mobile
responsive styles from docs template. Convert to TailwindCSS utility
classes for transitions and transforms.
Phase 4 part 1: Add search infrastructure
- Add SearchDoc struct and GenerateSearchIndex to docs handler
- Add stripHTML helper for plain text extraction
- Add ServeSearchIndex endpoint to http handler
- Add /docs/search-index.json route in main.go
- Search index includes all documentation files with ID, title, content, URL
Phase 3 complete: Add API explorer to endpoint documentation
- Add DocsLayoutWithExplorer template function
- Update HTTPHandler.ShowAPIEndpoint to check authentication
- Add GetAPIEndpointData method to docs handler
- Include API explorer for all endpoint documentation
- Explorer shows mock data to non-authenticated users
- Explorer enables real API execution for logged-in users
- Add legacy fallback for endpoints without explorer data
Phase 3 part 1: Add interactive API explorer
- Create templates/api_explorer.templ with mock and real modes
- Add EndpointInfo and APIExplorerData types to templates/types.go
- Fix markdown rendering with UnsafeHTML.ToComponent()
- Add templ import for Component support
- API explorer supports:
- Mock data mode for non-authenticated users
- Real execution mode for logged-in users
- Request/response display
- cURL generation
- Copy to clipboard
- Add rawHTML helper function using template.HTML()
- Update docs template to use { template.HTML(doc.Content) }
- Docs now render HTML headings and content properly
- Markdown is converted to HTML by goldmark (with Unsafe()) and output directly
- Add internal/docs package with markdown renderer (goldmark)
- Create docs layout template with sidebar navigation
- Implement hierarchical navigation auto-generated from docs folder
- Add table of contents generator (extract ## headings)
- Add syntax highlighting for code blocks (highlight.js)
- Add mobile responsive design
- Add /docs routes to main.go
The documentation system features:
- Dark theme matching app design
- Collapsible sidebar sections (Getting Started, User Guide, Device Setup, API Reference, Contributing)
- Table of contents for each page
- Breadcrumb navigation
- Full-text search (client-side JavaScript, API endpoint ready)
- Syntax highlighting for code blocks
- Mobile-friendly with hamburger menu
All documentation is served from /docs route, no authentication required.
Markdown files are rendered using goldmark with GFM extensions and syntax highlighting.