Skip to content

Conversation

@stephanegigandet
Copy link
Collaborator

Shiki complains because the transpiler changes in .md file to title="[nearest title}", but without specifying a language like plaintext, and the build fails:

https://github.com/openfoodfacts/documentation/actions/runs/18837392079/job/53741475573?pr=53

./content/docs/Product-Opener/(docs)/dev/explain-dynamic-test-grouping.mdx?collection=docs&hash=1761560089081
ShikiError: explain-dynamic-test-grouping.mdx:ShikiError: Language title="Algorithm is not included in this bundle. You may want to load it from external source.

This add a post-processing step to remove titles without a language.

Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

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

LGTM but I have a proposal to avoid losing title.

Comment on lines 186 to 192
- name: Fix malformed code blocks
run: |
echo "Fixing malformed code block titles..."
# The Fumadoc .md to .mdx transpiler add titles but without adding a language
# which then makes Shiki fail, so we remove the title when there isn't a language
find content/docs -name "*.mdx" -exec sed -i 's/^``` title=\".*$/```/g' {} \;
echo "Code block titles fixed"
Copy link
Member

Choose a reason for hiding this comment

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

maybe we can open a bug in the transpiler also, so that it's fix upstream.

cc: @JagjeevanAK

@stephanegigandet stephanegigandet merged commit 78c8f62 into main Nov 7, 2025
5 checks passed
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.

3 participants