diff --git a/.github/workflows/rebuild-and-deploy-docs.yml b/.github/workflows/rebuild-and-deploy-docs.yml index 40c0dca07e..9d0aaefba3 100644 --- a/.github/workflows/rebuild-and-deploy-docs.yml +++ b/.github/workflows/rebuild-and-deploy-docs.yml @@ -70,6 +70,7 @@ jobs: run: | rm -rf ./docs cp -r main-repo/docs . + cp -r main-repo/docs/sidebars.js . rm -rf main-repo - name: Install deps if: inputs.original_event == 'push_on_main' || inputs.force || steps.evaluate_versions.outputs.versions-compare == 'true' diff --git a/scripts/sidebar-watcher.js b/scripts/sidebar-watcher.js new file mode 100644 index 0000000000..4bd10aceb5 --- /dev/null +++ b/scripts/sidebar-watcher.js @@ -0,0 +1,27 @@ +'use strict' + +const fs = require('fs'); +const path = require('path'); + + +const platformaticDocsPath = path.resolve(__dirname, '..', '..', 'platformatic', 'docs', 'sidebars.js'); + +const ossSidebarPath = path.resolve(__dirname, '..', 'sidebars.js'); + +function copySidebarFile() { + try { + fs.copyFileSync(platformaticDocsPath, ossSidebarPath); + console.log('sidebars.js has been copied from platformatic/docs to oss'); + } catch (err) { + console.error('Failed to copy sidebars.js:', err); + } +} + +fs.watch(platformaticDocsPath, (eventType, filename) => { + if (eventType === 'change') { + console.log(`${filename} has been changed, updating the oss/sidebar.js`); + copySidebarFile(); + } +}); + +console.log(`Watching for changes in ${platformaticDocsPath}`); diff --git a/sidebars.js b/sidebars.js index b80fd24d6b..18ca8203dc 100644 --- a/sidebars.js +++ b/sidebars.js @@ -11,7 +11,7 @@ // @ts-check -/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ +// /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { docs: [ 'Overview', @@ -26,6 +26,7 @@ const sidebars = { 'composer/configuration', 'composer/programmatic', 'composer/api-modification', + 'composer/plugin.md', ], }, { diff --git a/versioned_docs/version-1.35.2/guides/migrating-fastify-app-to-platformatic-service.md b/versioned_docs/version-1.35.2/guides/migrating-fastify-app-to-platformatic-service.md index 9e6f5410f2..32d44ac9e8 100644 --- a/versioned_docs/version-1.35.2/guides/migrating-fastify-app-to-platformatic-service.md +++ b/versioned_docs/version-1.35.2/guides/migrating-fastify-app-to-platformatic-service.md @@ -422,7 +422,7 @@ All Platformatic Service features are fully configurable via `platformatic.servi - Write your plugins in JavaScript or TypeScript — TypeScript support is provided out-of-the-box and supports hot reloading. - Pretty printed logs — Making it easier to understand and debug your application during development. -> See the [Platformatic Service Configuration](/docs/reference/service/configuration/) documentation for all of the features which can be configured. +> See the [Platformatic Service Configuration](../) documentation for all of the features which can be configured. ## Next steps