diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c288129..fa96e40 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,6 +30,18 @@ jobs: repository: fairpm/tsc path: docs/external/tsc/ + # - name: Checkout FAIR Protocol + # uses: actions/checkout@v4 + # with: + # repository: fairpm/fair-protocol + # path: docs/external/fair-protocol/ + + - name: Checkout Fair Beacon + uses: actions/checkout@v4 + with: + repository: fairpm/fair-beacon + path: docs/external/fair-beacon/ + - uses: actions/setup-node@v4 with: node-version: 20 @@ -42,7 +54,8 @@ jobs: - name: Build website run: npm run build env: - DOCS_EXTERNAL: tsc + # DOCS_EXTERNAL: tsc,fair-protocol,fair-beacon + DOCS_EXTERNAL: tsc,fair-beacon - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v4 diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml index a1c2ea2..da24bc7 100644 --- a/.github/workflows/test-deploy.yml +++ b/.github/workflows/test-deploy.yml @@ -34,6 +34,18 @@ jobs: repository: fairpm/tsc path: docs/external/tsc/ + # - name: Checkout FAIR Protocol + # uses: actions/checkout@v4 + # with: + # repository: fairpm/fair-protocol + # path: docs/external/fair-protocol/ + + - name: Checkout Fair Beacon + uses: actions/checkout@v4 + with: + repository: fairpm/fair-beacon + path: docs/external/fair-beacon/ + - name: Debug checked out files run: | echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" @@ -47,6 +59,9 @@ jobs: find "$GITHUB_WORKSPACE/docs/external" -maxdepth 5 -type d -print || true echo "Expected folder:" ls -la "$GITHUB_WORKSPACE/docs/external/tsc/faqs" || true + ls -la "$GITHUB_WORKSPACE/docs/external/fair-protocol/" || true + ls -la "$GITHUB_WORKSPACE/docs/external/fair-beacon/" || true + ls -la "$GITHUB_WORKSPACE/docs/external/" || true working-directory: . - uses: actions/setup-node@v4 @@ -61,4 +76,5 @@ jobs: - name: Build website run: npm run build env: - DOCS_EXTERNAL: tsc + DOCS_EXTERNAL: tsc,fair-beacon + # DOCS_EXTERNAL: tsc,fair-protocol,fair-beacon diff --git a/docs/externalDocs.js b/docs/externalDocs.js index 3724e9e..c264b27 100644 --- a/docs/externalDocs.js +++ b/docs/externalDocs.js @@ -17,6 +17,27 @@ const externalDocs = [ sidebarPath: './sidebars-tsc.js', editUrl: 'https://github.com/fairpm/tsc/blob/main/faqs/', }, + { + id: 'fair-protocol', + label: 'FAIR Protocol', + path: 'external/fair-protocol/', + routeBasePath: 'fair-protocol', + navbarPosition: 'left', + sidebarId: 'fairProtocolSidebar', + sidebarPath: './sidebars-fair-protocol.js', + exclude: ['CLAUDE.md'], + editUrl: 'https://github.com/fairpm/fair-protocol/', + }, + { + id: 'fair-beacon', + label: 'Fair Beacon', + path: 'external/fair-beacon/', + routeBasePath: 'fair-beacon', + navbarPosition: 'left', + sidebarId: 'fairBeaconSidebar', + sidebarPath: './sidebars-fair-beacon.js', + editUrl: 'https://github.com/fairpm/fair-beacon/', + }, ]; const enabledDocs = externalDocs.filter((docs) => diff --git a/docs/scripts/fair-build b/docs/scripts/fair-build index 1f58b78..83dae00 100755 --- a/docs/scripts/fair-build +++ b/docs/scripts/fair-build @@ -17,6 +17,8 @@ mkdir -p "$EXTERNAL_DIR" # id must match the id used in docusaurus.config.js / DOCS_EXTERNAL REPOS=( "tsc|TSC|fairpm/tsc|external/tsc" + "fair-protocol|FAIR Protocol|fairpm/fair-protocol|external/fair-protocol" + "fair-beacon|Fair Beacon|fairpm/fair-beacon|external/fair-beacon" ) USE_ALL=false diff --git a/docs/sidebars-fair-beacon.js b/docs/sidebars-fair-beacon.js new file mode 100644 index 0000000..4984322 --- /dev/null +++ b/docs/sidebars-fair-beacon.js @@ -0,0 +1,34 @@ +// @ts-check + +// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) + +/** + * Creating a sidebar enables you to: + - create an ordered group of docs + - render a sidebar for each doc of that group + - provide next/previous navigation + + The sidebars can be generated from the filesystem, or explicitly defined here. + + Create as many sidebars as you want. + + @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} + */ +const sidebarsFairBeacon = { + // By default, Docusaurus generates a sidebar from the docs folder structure + fairBeaconSidebar: [{type: 'autogenerated', dirName: '.'}], + + // But you can create a sidebar manually + +// tscSidebar: [ +// 'intro', +// 'hello', +// { +// type: 'category', +// label: 'Tutorial', +// items: ['tutorial-basics/create-a-document'], +// }, +// ], +}; + +export default sidebarsFairBeacon; diff --git a/docs/sidebars-fair-protocol.js b/docs/sidebars-fair-protocol.js new file mode 100644 index 0000000..a23df6b --- /dev/null +++ b/docs/sidebars-fair-protocol.js @@ -0,0 +1,134 @@ +// @ts-check + +// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) + +/** + * Creating a sidebar enables you to: + - create an ordered group of docs + - render a sidebar for each doc of that group + - provide next/previous navigation + + The sidebars can be generated from the filesystem, or explicitly defined here. + + Create as many sidebars as you want. + + @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} + */ +const sidebarsFairProtocol = { + // By default, Docusaurus generates a sidebar from the docs folder structure + // fairProtocolSidebar: [{type: 'autogenerated', dirName: '.'}], + + // But you can create a sidebar manually + + fairProtocolSidebar: [ + // 'README', + { + type: 'category', + label: 'About FAIR Protocol', + collapsed: true, + items: [ + // 'docs/README', + 'docs/start-here', + 'docs/initial-design', + 'docs/philosophy', + { + type: 'category', + label: 'How it works', + items: [ + 'docs/how-it-works', + 'docs/security', + 'docs/moderation/ozone-labeling-system', + 'docs/flowcharts/did-workflows', + ], + }, + ], + }, + { + type: 'category', + label: 'Specification', + items: [ + 'specification', + 'spec-labeling', + 'registry', + { + type: 'category', + label: 'Extensions', + collapsed: false, + items: [ + 'ext-typo3', + 'ext-wp', + ], + } + ], + }, + { + type: 'category', + label: 'Implementing', + items: [ + 'docs/implementing/README', + 'docs/implementing/protocol', + 'docs/implementing/repository', + 'docs/implementing/restricted', + { + type: 'category', + label: 'WordPress packages', + collapsed: false, + items: [ + 'docs/publishing', + 'docs/restricted', + ], + } + ], + }, + { + type: 'category', + label: 'Moderation', + items: [ + 'docs/moderation/README', + 'docs/moderation/discovery', + 'docs/moderation/service-hierarchy', + { + type: 'category', + label: 'Submissions', + collapsed: true, + items: [ + 'docs/moderation/submissions/README', + 'docs/moderation/guidelines', + 'docs/moderation/submissions/packages', + 'docs/moderation/submissions/repositories', + 'docs/moderation/submissions/aggregators', + ], + }, + { + type: 'category', + label: 'Governance', + collapsed: true, + items: [ + 'docs/moderation/governance/README', + 'docs/moderation/governance/contact-and-privacy', + 'docs/moderation/governance/integrity', + 'docs/moderation/governance/vetting-and-reporting', + 'docs/moderation/governance/defederation', + 'docs/moderation/governance/risk-management', + 'docs/moderation/governance/appeals', + 'docs/moderation/governance/moderation-labels', + 'docs/moderation/governance/moderation-services', + ], + }, + 'docs/moderation/faq', + 'docs/moderation/FAIR-APPROVAL-POLICIES', + { + type: 'category', + label: 'Tools', + collapsed: false, + items: [ + 'docs/moderation/tools/setup-ozone', + 'docs/moderation/tools/wordpress-plugin', + ], + }, + ], + }, + ], +}; + +export default sidebarsFairProtocol;