Skip to content

Conversation

@viral-sangani
Copy link
Collaborator

  • Broken Links Fixed (92 total)
  • Script Improvements
  • Added CICD to check valid docs

@github-actions
Copy link

📚 Documentation Validation Results

Check Status

Check Status
Broken Links ❌ Failed
Structure ❌ Failed
MDX Files ❌ Failed
Syntax ⚠️ Warnings

This check was performed by the Documentation Validation workflow.

@github-actions
Copy link

📚 Documentation Validation Results

Check Status

Check Status
Broken Links ✅ Passed
Structure ✅ Passed
MDX Files ✅ Passed
Syntax ✅ Passed

Broken Links Details

found 3 broken links in 1 files

README.md
 ⎿  ./DOCS_VALIDATION.md
 ⎿  ./DOCS_VALIDATION.md
 ⎿  ./DOCS_VALIDATION.md



This check was performed by the Documentation Validation workflow.

@github-actions
Copy link

📚 Documentation Validation Results

Check Status

Check Status
Broken Links ✅ Passed
Structure ✅ Passed
MDX Files ✅ Passed
Syntax ✅ Passed

Broken Links Details

success no broken links found


This check was performed by the Documentation Validation workflow.

@viral-sangani viral-sangani requested review from a team as code owners October 18, 2025 12:29
@viral-sangani viral-sangani requested review from palango and piersy and removed request for a team October 18, 2025 12:29
- Update Node.js version from 20 to 22 (latest LTS)
- Simplify workflow by using existing validate-docs.sh script
- Remove duplicated validation logic (167 lines reduced to ~10)

Addresses review comments from @palango on PR #2047
- Add set +e/set -e wrapper around mint broken-links command
- Capture exit code to prevent script from exiting early
- Allow script to continue and report all validation errors
- Fixes workflow failure when broken links are detected
- Fix stablecoin links in build-with-defi.mdx (use absolute paths)
- Fix plumo verification link to use relative path
- Replace broken /glossary#epoch-rewards links with actual epoch rewards pages
- Replace broken /glossary#slashing links with actual penalties pages
- All 7 broken links across 6 files now resolved

Verified with: mint broken-links
Comment on lines +92 to +113
echo "3️⃣ Checking for missing MDX files..."
if [ "$JQ_AVAILABLE" = true ]; then
MISSING_FILES=0

# Extract all page references and check if files exist
jq -r '.. | .pages? // empty | .[] | select(type == "string")' docs.json 2>/dev/null | while read -r page; do
file_path="${page}.mdx"

if [ ! -f "$file_path" ] && [ ! -f "${page}.md" ]; then
echo -e "${YELLOW}⚠️ Missing file: $file_path${NC}"
MISSING_FILES=$((MISSING_FILES + 1))
fi
done

if [ $MISSING_FILES -eq 0 ]; then
echo -e "${GREEN}✅ All referenced MDX files exist${NC}"
else
echo -e "${YELLOW}⚠️ Some referenced files are missing${NC}"
fi
else
echo -e "${YELLOW}⚠️ Skipping MDX file check (jq not available)${NC}"
fi
Copy link
Contributor

@piersy piersy Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shellcheck errors for this.

In scripts/validate-docs.sh line 102:
            MISSING_FILES=$((MISSING_FILES + 1))
            ^-----------^ SC2030 (info): Modification of MISSING_FILES is local (to subshell caused by pipeline).


In scripts/validate-docs.sh line 106:
    if [ $MISSING_FILES -eq 0 ]; then
         ^------------^ SC2031 (info): MISSING_FILES was modified in a subshell. That change might be lost.

Basically piping input to the loop results in all variable changes inside the loop being local to the loop, so MISSING_FILES will always be 0 when checked after the loop.

You can fix this by using process substitution to feed input to the loop:

...
done < <(jq -r '.. | .pages? // empty | .[] | select(type == "string")' docs.json 2>/dev/null

- name: Run Mintlify validation
run: |
echo "Running Mintlify validation checks..."
mint install || true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to document why you are allowing errors in mint install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants