Skip to content

feat(docussaurus): upgrade Docussaurus and document development procedures #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
dd9b2d4
chore(docusaurus): rename siteConfig.js file to docusaurus.config.js
lucaaamaral Apr 17, 2025
60acf12
chore(docusaurus): prepare configfile for new docusaurus version
lucaaamaral Apr 18, 2025
160fd39
docs(docusaurus): updated docusaurus
see7e Mar 22, 2025
ea2d7de
chore: clean up Docusaurus project by removing unused blog files and …
see7e Mar 22, 2025
47550a7
chore: remove unused images and HomepageFeatures component, update ho…
see7e Mar 22, 2025
3b5d7c8
chore: Add last commit updates on CHANGELOG
see7e Mar 22, 2025
1be9a6f
chore: Attend to PR review
see7e Mar 24, 2025
08306fa
feat: Implement CI (testing workflow runs) (#1)
see7e Apr 3, 2025
7a505fe
feat: Add markdown lint configuration and enhance translation check s…
see7e Apr 7, 2025
c99ef73
chore: Update eol style
see7e Apr 7, 2025
60bf25a
fix: Update documentation links and add markdown link check configura…
see7e Apr 12, 2025
07a5f41
fix: Adjust the path and improve ignored regex
see7e Apr 12, 2025
3685537
feat: Update test script to run Jest locally and CI commands conditio…
see7e Apr 12, 2025
b5ebf21
fix: Enhance Docusaurus build process with output verification and im…
see7e Apr 12, 2025
ae8c9dc
fix: Update build:test script to enable development mode for testing
see7e Apr 12, 2025
6c4961d
chore: Fix documentation links to ensure correct file extensions and …
see7e Apr 17, 2025
dd07374
fix: Update @docusaurus/theme-mermaid dependency to use caret versioning
see7e Apr 18, 2025
8ce266a
feat(docusaurus): update Dockerfile & docker compose
lucaaamaral Apr 23, 2025
30fbca4
chore(docusaurus): deprecate docker.package.json
lucaaamaral Apr 23, 2025
c87cdba
fix(docs): broken reference to images
lucaaamaral Apr 23, 2025
817e7c1
fix(docs): bad character in docs lint
lucaaamaral Apr 23, 2025
69a4226
fix(docs): docusautus compilation error on html tag
lucaaamaral May 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
77 changes: 0 additions & 77 deletions .github/scripts/check_doc_references.py

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/config/markdown.links.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "^https?://(localhost|127\\.0\\.0\\.1)(:\\d+)?(/.*)?$"
},
{
"pattern": "^https?://controller\\.url\\.sample(:\\d+)?(/.*)?$"
}
]
}
58 changes: 58 additions & 0 deletions .github/workflows/config/markdown_lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"ignorePatterns": [
{
"pattern": "^(?!http).*"
},
{
"pattern": ".*%2F*"
},
{
"pattern": ".*127.0.0.1.*"
},
{
"pattern" : ".*localhost.*"
},
{
"pattern": "^https://controller.url.sample:9443"
},
{
"pattern": "^https://nms.yourdomain.com"
},
{
"pattern" : "^https://your-org.nms.yourdomain.com"
},
{
"pattern" : "https://magma.github.io/magma/docs/orc8r/rds_upgrade#logs-and-validation"
},
{
"pattern" : "https://github.com/fbcinternal/ens_magma/tree/master/spirent_automation"
},
{
"pattern" : "https://github.com/magma/ci-infra/blob/master/bazel/remote_caching/Readme.md"
},
{
"pattern" : "https://github.com/magma/security/issues"
},
{
"pattern" : "https://github.com/dysinger/basebox"
},
{
"pattern" : "https://docs.virtlet.cloud/user-guide/real-cluster/"
},
{
"pattern" : "^https://www.etsi.org.*pdf"
},
{
"pattern" : "https://core.ac.uk/download/pdf/322886318.pdf"
},
{
"pattern" : "http://automation.fbmagma.ninja/"
},
{
"pattern" : "http://ens-spirent-test-summary.com.s3-us-west-1.amazonaws.com/sanity/hilsanitypass.svg"
},
{
"pattern" : "https://fb.quip.com/4tmUAtlox4Oy"
}
]
}
60 changes: 60 additions & 0 deletions .github/workflows/docs-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright 2022 The Magma Authors.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# owner: @magma/approvers-infra
# purpose: Fixes the documentation if any issue is found during tests
# remediation:

name: Docs Fix (Triggered on Check Failure)

on:
workflow_run:
workflows: ["Docs Check"]
types:
- completed

jobs:
only_if_failed:
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Setup Python (if needed)
uses: actions/setup-python@v5
with:
python-version: '3.8'

- name: Install deps
run: yarn install --frozen-lockfile

- name: Run precommit fix
run: make -C readmes precommit_fix

- name: Show diff after fix
run: git diff --color

- name: Upload patch
run: |
git diff > docs_fixes.patch
continue-on-error: true

- name: Upload auto-fix patch
uses: actions/upload-artifact@v4
with:
name: auto-fix-patch
path: docs_fixes.patch
113 changes: 113 additions & 0 deletions .github/workflows/docs-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# Copyright 2022 The Magma Authors.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# owner: @magma/approvers-infra
# purpose: Check the documentation changes for issues and formatting errors
# remediation:
---
name: Docs Check

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
docusaurus-test:
name: Docusaurus Build & Log
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install dependencies
run: |
cd docusaurus/
yarn install --frozen-lockfile

- name: Build and test Docusaurus
run: |
cd docusaurus/
yarn test

- name: Verify build output
run: |
cd docusaurus/
test -d build && echo "✅ Build successful"

markdown-lint:
name: Markdown Format Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install markdownlint-cli
run: npm install -g markdownlint-cli
- name: Run markdownlint
run: markdownlint "docs/**/*.md" "readmes/**/*.md"

translation-consistency:
name: Translation Consistency Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Grant execute permissions and convert script file
run: |
chmod +x ./.github/workflows/scripts/check_translations.sh
- name: Check Translation Consistency
run: |
./.github/workflows/scripts/check_translations.sh --debug
shell: bash

id-filename-sync:
name: Docusaurus ID & Filename Sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Grant execute permissions to scripts and convert script file
run: |
chmod +x ./.github/workflows/scripts/check_id_matches_filename.sh
- name: Check ID matches filename
run: |
./.github/workflows/scripts/check_id_matches_filename.sh --debug

check-symlinks:
name: Broken Symlinks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for broken symlinks in docusaurus/
working-directory: ${{ github.workspace }}/docusaurus
run: |
BROKEN=$(find . -xtype l)
if [ -n "$BROKEN" ]; then
echo "❌ Broken symlinks found:"
echo "$BROKEN"
exit 1
else
echo "✅ No broken symlinks found in ./docusaurus."
fi

markdown-link-check:
name: Markdown URL Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.github/workflows/config/markdown.links.config.json'
folder-path: './docusaurus/docs'
Loading
Loading