Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@seesharprun
Copy link

@seesharprun seesharprun commented Oct 2, 2025

Documentation engine build

This is a rework to host the MongoDB Query Language documentation in a structured manner. This rework also shows how to host the articles as Markdown and landing page(s) as YAML. This makes it easier for others to contribute to your documentation without requiring knowledge of Next.js internals.

This prototype also heavily uses static rendering, so the HTML files are generated at compilation, and HTML is served client side. This allows the site to have SEO metadata set on a per-page basis, titles set on a per-page basis, and deep linking to specific articles.

Preview

Here's a preview of the site auto-published to GitHub Pages:

Changes in this PoC

  • Latest version of Next.js
    • Switched to Turbopack
    • Stripped out unused files
    • Configured Next.js for fast refresh in local dev
    • Configured static HTML file export for caching/SEO performance
  • Updated blog posts list to data-driven
    • Created YAML file for community blog posts
    • Created validation schema file
    • Read YAML file to generate blog posts
  • Switched documentation to static content
    • Use Markdown for documentation to make contribution easier
    • Transform Markdown to HTML
    • Allow custom layouts like the "coming-soon" page for architecture
  • Added structured language reference files
    • Add 2 sample YAML files
    • Transform and serve YAML
  • Universal reference and documentation enhancements
    • Anchor tags for H2 and H3 elements
    • Served as vanilla HTML for caching
    • Serve unique titles and metadata descriptions for SEO optimization
    • Serve unique URIs for bookmarks
  • Rework CD workflow
    • Use minimal permissions
    • Rename
  • Create CI workflow
    • Check reference YAML against schema
    • Check blog YAML against schema
  • SEO/GEO
    • Add meta tags for various pages
    • Add social media cards via meta tags
    • Influence search result cards via meta tags

Contribution endpoints

Description
/reference/**/*.yml Reference files for commands and operators
/articles/**/*.md Documentation content
/articles/**/*.yml Documentation navigation files
/articles/content.yml Documentation landing page
/blogs/content.yml Blog posts list

How you can use this

Feel free to pick this PR apart, re-use ideas, and close it when you're done.

Looking forward

This PR opens up the possibility of using the structured operator/command files as part of a CI/CD workflow. You could easily host DocumentDB's container as a sidecar in a GitHub action and actually run each example command to verify it works on a scheduled and per-PR basis. We can also use AI and other tools to review the examples and perform operations like streamlining the samples to be similar across all documentation.

@seesharprun seesharprun changed the title Proof of concept on static documentation in the Next.js site [DO NOT MERGE] Proof of concept on static documentation in the Next.js site Oct 2, 2025
@seesharprun seesharprun marked this pull request as ready for review October 2, 2025 16:30
@seesharprun seesharprun changed the title Proof of concept on static documentation in the Next.js site Revamped engine for static documentation in the Next.js site Oct 16, 2025
Updated the development container configuration to use a different base image and removed some features.
@seesharprun
Copy link
Author

@abinav2307 This is ready for review.

Here's the changes I made:

  • Added SEO/GEO metadata and images for social media cards:
  • Fixed devcontainer image for contributions
  • Updated readme with dev instructions for both local dev and devcontainer
  • Update schema and reduced this PR down to two sample reference articles

@seesharprun
Copy link
Author

Ping @abinav2307

This PR was updated to incorporate your latest changes (packages download page)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant