Main App Integration Guide for TrackCodex Docs
This guide explains how to integrate the main TrackCodex platform with the documentation service.
Redirects to Documentation
To redirect users to the correct documentation page, use a simple window.location.href assignment.
Example Redirect Flow
// Help link click handler
function handleHelpClick(topic) {
const docsBaseUrl = "https://docs.trackcodex.com";
const routes = {
"getting-started": "/getting-started",
"ide": "/ide",
"git": "/repositories",
"api": "/api",
"terms": "/policies/terms",
"privacy": "/policies/privacy"
};
const path = routes[topic] || "/";
window.location.href = `${docsBaseUrl}${path}`;
}Search Integration
Redirect internal platform searches to the documentation search page.
function searchDocs(query) {
const formattedQuery = query.toLowerCase().replace(/\s+/g, '-');
window.location.href = `https://docs.trackcodex.com/search?q=${formattedQuery}`;
}[!NOTE] Nextra’s built-in search uses local indexing. To support direct query parameters, you may need to add a custom search page or script to the docs site to parse the
qparameter and trigger the search modal.