-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Add fundament to restructure pages (#179)
* Implement plugin to log get json of all routes in postBuild lifecycle. Add file in sc so it creates diff to help check. * Create new sidebar for release and link from there. * Add redirects for CF and plugin to add them to build. * Refactore sidebar to be more granular * Extract postbuild scripts in separate file. --------- Signed-off-by: Mirjam Aulbach <[email protected]>
- Loading branch information
1 parent
2270915
commit 87cc540
Showing
22 changed files
with
265 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/docs/category/Releases/* /docs/releases/:splat 301 | ||
/docs/category/Releases /docs/releases 301 | ||
|
||
/docs/category/concepts /docs/Concepts/clusters-environments 301 | ||
/docs/category/howto /docs/HowTo/analytics 301 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
[ | ||
"/404.html", | ||
"/__docusaurus/debug", | ||
"/__docusaurus/debug/config", | ||
"/__docusaurus/debug/content", | ||
"/__docusaurus/debug/globalData", | ||
"/__docusaurus/debug/metadata", | ||
"/__docusaurus/debug/registry", | ||
"/__docusaurus/debug/routes", | ||
"/blog", | ||
"/blog/archive", | ||
"/blog/Effortless-Kafka-Governance-making-Life-Easier-for-Developers", | ||
"/blog/high-availability-for-klaw", | ||
"/blog/important-community-update-klaws-latest-actions-to-enhance-transparency", | ||
"/blog/schema-management-disaster-recovery-in-klaw", | ||
"/blog/tags", | ||
"/blog/tags/2-5-2", | ||
"/blog/tags/2-6-1", | ||
"/blog/tags/acls", | ||
"/blog/tags/active", | ||
"/blog/tags/disaster-recovery", | ||
"/blog/tags/evolution", | ||
"/blog/tags/fault-tolerance", | ||
"/blog/tags/governance", | ||
"/blog/tags/high-availability", | ||
"/blog/tags/kafka", | ||
"/blog/tags/klaw", | ||
"/blog/tags/migration", | ||
"/blog/tags/passive", | ||
"/blog/tags/schema-registry", | ||
"/blog/tags/topics", | ||
"/blog/tags/transparency", | ||
"/docs/", | ||
"/docs/Concepts/clusters-environments", | ||
"/docs/Concepts/config", | ||
"/docs/Concepts/high-availability", | ||
"/docs/Concepts/metastore", | ||
"/docs/Concepts/promotion", | ||
"/docs/Concepts/switch-teams", | ||
"/docs/Concepts/synchronize", | ||
"/docs/Concepts/users-teams", | ||
"/docs/Concepts/workflows", | ||
"/docs/faq", | ||
"/docs/features", | ||
"/docs/getstarted", | ||
"/docs/HowTo/analytics", | ||
"/docs/HowTo/authentication/", | ||
"/docs/HowTo/authentication/azure-ad", | ||
"/docs/HowTo/authentication/google-account", | ||
"/docs/HowTo/authentication/third-party-account", | ||
"/docs/HowTo/authentication/userpwd-db", | ||
"/docs/HowTo/authentication/windows-ad", | ||
"/docs/HowTo/authorization", | ||
"/docs/HowTo/clusterconnectivity/", | ||
"/docs/HowTo/clusterconnectivity/aiven-kafka-cluster-sasl-ssl-protocol", | ||
"/docs/HowTo/clusterconnectivity/aiven-kafka-cluster-ssl-protocol", | ||
"/docs/HowTo/clusterconnectivity/aiven-kafka-connect-cluster-ssl-protocol", | ||
"/docs/HowTo/clusterconnectivity/aiven-karapace-cluster-ssl-protocol", | ||
"/docs/HowTo/clusterconnectivity/confluent-cloud-kafka-cluster-ssl-protocol", | ||
"/docs/HowTo/clusterconnectivity/kafka-cluster-sasl-ssl-protocol", | ||
"/docs/HowTo/clusterconnectivity/kafka-cluster-ssl-protocol", | ||
"/docs/HowTo/clusterconnectivity/klaw-core-with-clusterapi", | ||
"/docs/HowTo/clusterconnectivity/klaw-db-connection", | ||
"/docs/HowTo/clusterconnectivity/sr-cluster-ssl-protocol", | ||
"/docs/HowTo/clusters", | ||
"/docs/HowTo/connectors/", | ||
"/docs/HowTo/connectors/Approve-a-connector", | ||
"/docs/HowTo/connectors/manage-connectors", | ||
"/docs/HowTo/connectors/My-connector-requests", | ||
"/docs/HowTo/connectors/Request-a-new-connector", | ||
"/docs/HowTo/dashboard", | ||
"/docs/HowTo/deployklaw", | ||
"/docs/HowTo/environments", | ||
"/docs/HowTo/exportimport/", | ||
"/docs/HowTo/exportimport/exportdata", | ||
"/docs/HowTo/exportimport/importdata", | ||
"/docs/HowTo/installation/", | ||
"/docs/HowTo/installation/configure-klaw-wizard", | ||
"/docs/HowTo/installation/run-docker", | ||
"/docs/HowTo/installation/run-source", | ||
"/docs/HowTo/kafka-cluster-migration/", | ||
"/docs/HowTo/kafka-cluster-migration/sync-acls-from-cluster", | ||
"/docs/HowTo/kafka-cluster-migration/sync-acls-to-cluster", | ||
"/docs/HowTo/kafka-cluster-migration/sync-connectors-from-cluster", | ||
"/docs/HowTo/kafka-cluster-migration/sync-schemas-from-cluster", | ||
"/docs/HowTo/kafka-cluster-migration/sync-schemas-to-cluster", | ||
"/docs/HowTo/kafka-cluster-migration/sync-topics-from-cluster", | ||
"/docs/HowTo/kafka-cluster-migration/sync-topics-to-cluster", | ||
"/docs/HowTo/kafka-cluster-migration/tenant-config", | ||
"/docs/HowTo/notifications/", | ||
"/docs/HowTo/notifications/email-notification", | ||
"/docs/HowTo/notifications/slack-notification", | ||
"/docs/HowTo/operational/", | ||
"/docs/HowTo/operational/Reset-Consumer-Offsets", | ||
"/docs/HowTo/rolespermissions", | ||
"/docs/HowTo/schemas/", | ||
"/docs/HowTo/schemas/manage-schemas", | ||
"/docs/HowTo/schemas/My-schema-requests", | ||
"/docs/HowTo/schemas/Promote-a-schema", | ||
"/docs/HowTo/schemas/Request-a-schema", | ||
"/docs/HowTo/settings", | ||
"/docs/HowTo/subscriptions/", | ||
"/docs/HowTo/subscriptions/Approve-a-subscription", | ||
"/docs/HowTo/subscriptions/Delete-a-subscription", | ||
"/docs/HowTo/subscriptions/My-subscription-requests", | ||
"/docs/HowTo/subscriptions/Request-a-subscription", | ||
"/docs/HowTo/teams/", | ||
"/docs/HowTo/teams/manage-teams", | ||
"/docs/HowTo/teams/switch-teams", | ||
"/docs/HowTo/tenant", | ||
"/docs/HowTo/topics/", | ||
"/docs/HowTo/topics/Approve-a-topic", | ||
"/docs/HowTo/topics/Claim-a-topic", | ||
"/docs/HowTo/topics/Delete-a-topic", | ||
"/docs/HowTo/topics/Edit-topic-request", | ||
"/docs/HowTo/topics/My-topic-requests", | ||
"/docs/HowTo/topics/Promote-a-topic", | ||
"/docs/HowTo/topics/Request-a-new-topic", | ||
"/docs/HowTo/topics/Topic-overview", | ||
"/docs/HowTo/topics/View-consumer-lag", | ||
"/docs/HowTo/topics/View-topic-events", | ||
"/docs/HowTo/users", | ||
"/docs/HowTo/zothers", | ||
"/docs/quickstart", | ||
"/docs/releases", | ||
"/docs/releases/release100", | ||
"/docs/releases/release110", | ||
"/docs/releases/release120", | ||
"/docs/releases/release200", | ||
"/docs/releases/release210", | ||
"/docs/releases/release220", | ||
"/docs/releases/release230", | ||
"/docs/releases/release240", | ||
"/docs/releases/release250", | ||
"/docs/releases/release251", | ||
"/docs/releases/release252", | ||
"/docs/releases/release260", | ||
"/docs/releases/release261", | ||
"/docs/releases/release270", | ||
"/" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"label": "Releases", | ||
"position": 5, | ||
"position": 1, | ||
"link": { | ||
"type": "generated-index" | ||
} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
|
||
/** | ||
* function to add our redirects after build | ||
* @param {object} props - the `props` object returned from postBuild | ||
*/ | ||
function addRedirectsFile(props) { | ||
const redirectFileName = "_redirects"; | ||
const redirectFilePath = path.basename(redirectFileName); | ||
|
||
const destinationDirectory = props.outDir; | ||
|
||
if (!redirectFilePath) { | ||
console.error(`⚠️ Redirect file does not exist!`); | ||
return; | ||
} | ||
|
||
if (!fs.existsSync(destinationDirectory)) { | ||
console.error( | ||
`⚠️ Build directory "${destinationDirectory} does not exist.` | ||
); | ||
return; | ||
} | ||
|
||
// Construct the destination file path | ||
const destinationFilePath = path.join(destinationDirectory, redirectFileName); | ||
|
||
// Copy the file | ||
fs.copyFile(redirectFilePath, destinationFilePath, (err) => { | ||
if (err) { | ||
console.error(`Error copying file: ${err}`); | ||
return; | ||
} | ||
console.log(`_redirects copied to ${destinationDirectory}`); | ||
}); | ||
} | ||
|
||
export { addRedirectsFile }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const { writeFileSync } = require("fs"); | ||
|
||
/** | ||
* function create a file with all links | ||
* this is a temp plugin to help us restructure our page | ||
* without missing any links that need redirects | ||
* @param {object} props - the `props` object returned from postBuild | ||
*/ | ||
function createLinkFile(props) { | ||
const routes = JSON.stringify(props.routesPaths, null, 2); | ||
const filePath = "./current-routes.json"; | ||
|
||
// Write the routes to the file | ||
writeFileSync(filePath, routes, "utf-8"); | ||
|
||
console.log(`Routes paths have been saved to ${filePath}`); | ||
} | ||
|
||
export { createLinkFile }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters