Skip to content

Lychee improvements and a script to fix anchors in translated content#2154

Open
mdlinville wants to merge 5 commits intomainfrom
lychee_improvements
Open

Lychee improvements and a script to fix anchors in translated content#2154
mdlinville wants to merge 5 commits intomainfrom
lychee_improvements

Conversation

@mdlinville
Copy link
Contributor

@mdlinville mdlinville commented Feb 17, 2026

Description

  • Improve Lychee config

    • Remove include since it turns off how exclude regex matcing (!).The 'scheme' key is sufficient.
    • Improve regex to match W&B prod URLs.
    • Exclude mintlify.app preview URLs since those links are checked by mint validate and cause mint dev to fail
  • Fix broken Weave link discovered in the process

  • Fix newly-broken anchors in localized content after recent Translation refresh.

    Mintlify composes heading slugs algorithmically from the heading title, in both Markdown and HTML headings. There is no support for setting the heading slug manually, even by setting id on a HTML heading. This means that translated content will have different slugs than the English content, which will break anchor-level links in translated content.

    This script syncs deep links in translated content with the translated headings. A translator would run it toward the end of the translation refresh, perhaps just before creating the PR.
    - Full docs are in the README
    - Extracting and rewriting are handled separately
    - Supports dry-run and verbose modes
    - Supports operating on a specific translationor a specific file or all translations

  • Run the script to validate the functionality. I first ran it in dry-run mode, then ran it for real and committed the result.

    python3 scripts/localized-fragment-links/rewrite_fragment_links.py --verbose

Testing

  • Locally, the equivalent Lychee command to the Github Action works as intended against the site at localhost:3000.
  • Local build succeeds without errors (mint dev) (validates the Weave fix)
  • Local link check succeeds without errors (mint broken-links)
  • PR tests succeed

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2026

📚 Mintlify Preview Links

🔗 View Full Preview

✨ Added (1 total)

📄 Pages (1)

File Preview
scripts/localized-fragment-links/README.md README

📝 Changed (167 total)

📄 Pages (167)

File Preview
ja/inference/lora.mdx Lora
ja/inference/ui-guide.mdx Ui Guide
ja/launch/launch-faq/best_practices_launch_effectively.mdx Best Practices Launch Effectively
ja/launch/launch-terminology.mdx Launch Terminology
ja/launch/sweeps-on-launch.mdx Sweeps On Launch
ja/launch/walkthrough.mdx Walkthrough
ja/models/app/features/cascade-settings.mdx Cascade Settings
ja/models/app/features/panels.mdx Panels
ja/models/app/features/panels/line-plot/sampling.mdx Sampling
ja/models/app/features/panels/line-plot/smoothing.mdx Smoothing
... and 157 more files

🤖 Generated automatically when Mintlify deployment succeeds
📍 Deployment: ad87cfe at 2026-02-18 22:46:44 UTC

@github-actions
Copy link
Contributor

github-actions bot commented Feb 17, 2026

🔗 Link Checker Results

All links are valid!

No broken links were detected.

Checked against: https://wb-21fd5541-lychee-improvements.mintlify.app

You can also [compare](/weave/guides/tools/comparison) and visualize the monitor's trace data in the Weave UI, or download it in various formats (such as CSV and JSON) using the download button (<Icon icon="download" iconType="regular" />) in the Traces tab.

Weave automatically stores all scorer results in the [Call](/weave/concepts/fundamental-components#calls) object's `feedback` field.
Weave automatically stores all scorer results in the [Call](/weave/guides/tracking/tracing#calls) object's `feedback` field.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@mdlinville mdlinville marked this pull request as draft February 17, 2026 21:52
@mdlinville mdlinville changed the title Lychee improvements Lychee improvements and a script to fix anchors in translated content Feb 18, 2026
- Remove 'include' since it changes how 'exclude'
  behaves. The 'scheme' key is sufficient.
- Improve regex to match W&B prod URLs
- Add regex to exclude 'mintlify.app' preview
  URLs since those links are checked by
  'mint validate'
Mintlify composes heading slugs algorithmically
from the heading title, in both Markdown and HTML
headings. There is no support for setting the
heading slug manually, even by setting id on
a HTML heading. This means that translated
content will have different slugs than the
English content, which will break anchor-level
links in translated content.

This script syncs deep links in translated
content with the translated headings. A translator
would run it toward the end of the translation
refresh, perhaps just before creating the PR.
- Full docs are in the README
- Extracting and rewriting are handled separately
- Supports dry-run and verbose modes
- Supports operating on a specific translation
  or a specific file or all translations
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.

2 participants

Comments