Skip to content

feat: Implement clean URL routing for docs site#22

Merged
JoshuaWink merged 8 commits intomainfrom
clean-url-router
Sep 7, 2025
Merged

feat: Implement clean URL routing for docs site#22
JoshuaWink merged 8 commits intomainfrom
clean-url-router

Conversation

@JoshuaWink
Copy link
Contributor

🎯 Clean URL Routing Implementation

What Changed:

  • Removed all index.html references from footer and navigation links
  • Updated footer.html with conditional logic for clean directory paths
  • Updated language-navigation.html with proper URL conditionals
  • Generated all HTML pages with clean URLs for all 10 language pages + main index
  • Maintained proper routing for both homepage and language-specific pages

Key Improvements:

  • Clean URLs: pseudo/, python/, go/, etc. (instead of pseudo/index.html)
  • Consistent Navigation: All footer and navigation links use directory paths
  • Conditional Logic: Proper URL generation for homepage vs language pages
  • No Breaking Changes: All existing functionality preserved

Files Changed:

  • 14 files modified with clean URL routing implementation
  • 209 insertions, 209 deletions - balanced changes
  • All generated HTML pages updated with clean URLs
  • Component templates updated with conditional logic

Testing:

  • ✅ All 11 pages build successfully
  • ✅ Template variables properly resolved
  • ✅ Navigation links work correctly
  • ✅ Clean URL routing functional

Resolves: Clean URL routing for documentation site navigation

- Add 404.html router that handles clean URLs without index.html
- Update navigation links to use clean URLs (e.g., /docs/go instead of /docs/go/index.html)
- Support all language routes with aliases (c#, c++, js, etc.)
- Handle section anchors and sub-routes
- Preserve query parameters and hash fragments
- Add comprehensive router test suite
- Update main index.html and go/index.html with clean URLs
- Fix async/await handling in build.js for proper template processing
- Update json-reader.js to async RuntimeJSONReader with caching
- Add 'is_homepage': false to all language data files for proper conditional logic
- Fix language-navigation.html template variables (relative paths, highlighting, conditionals)
- Ensure all template variables are properly replaced in generated HTML pages
- Verify build process works correctly for all 11 pages (main + 10 languages)
- Remove all 'index.html' references from footer and navigation links
- Update footer.html with conditional logic for clean directory paths
- Update language-navigation.html with proper URL conditionals
- Generate all HTML pages with clean URLs (pseudo/, python/, etc.)
- All navigation links now use directory paths without index.html suffix
- Maintains proper routing for both homepage and language-specific pages
@JoshuaWink JoshuaWink merged commit ca7ae1d into main Sep 7, 2025
@JoshuaWink JoshuaWink deleted the clean-url-router branch September 7, 2025 18:17
JoshuaWink added a commit that referenced this pull request Jan 19, 2026
* codeuchain site + buf-json demo

* rm buf-json and sent to github,com/orchestrate-solutions/buf-json

* feat: Add clean URL router for docs site

- Add 404.html router that handles clean URLs without index.html
- Update navigation links to use clean URLs (e.g., /docs/go instead of /docs/go/index.html)
- Support all language routes with aliases (c#, c++, js, etc.)
- Handle section anchors and sub-routes
- Preserve query parameters and hash fragments
- Add comprehensive router test suite
- Update main index.html and go/index.html with clean URLs

* fix: Add missing json-reader.js and rebuild HTML pages

* Fix logo links for clean URL routing - update base.json to use '../' instead of '../index.html'

* fix: Resolve codeuchain.com routing build issues with template variables

- Fix async/await handling in build.js for proper template processing
- Update json-reader.js to async RuntimeJSONReader with caching
- Add 'is_homepage': false to all language data files for proper conditional logic
- Fix language-navigation.html template variables (relative paths, highlighting, conditionals)
- Ensure all template variables are properly replaced in generated HTML pages
- Verify build process works correctly for all 11 pages (main + 10 languages)

* feat: Implement clean URL routing for docs site

- Remove all 'index.html' references from footer and navigation links
- Update footer.html with conditional logic for clean directory paths
- Update language-navigation.html with proper URL conditionals
- Generate all HTML pages with clean URLs (pseudo/, python/, etc.)
- All navigation links now use directory paths without index.html suffix
- Maintains proper routing for both homepage and language-specific pages
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