diff --git a/.github/workflows/content-ci.yml b/.github/workflows/content-ci.yml index 0b810f8..09ea7a2 100644 --- a/.github/workflows/content-ci.yml +++ b/.github/workflows/content-ci.yml @@ -91,6 +91,30 @@ jobs: fi echo "All touched artifacts updated their CHANGELOG.md." + # Validate every lesson MDX body actually compiles as MDX/JSX (mirrors the + # local `mdx-syntax` Lefthook hook). Catches parser-desyncing authoring + # mistakes — most commonly a backslash-escaped double quote inside a plain + # JSX attribute (e.g. note="...\"...") — which JSX doesn't treat as an + # escape. Without this, a malformed lesson lands on main clean and only + # fails later when apps/web runs Velite, which silently drops it from the + # catalog (404 at runtime) instead of failing the build. See PR #9 + # (tailwind-from-scratch lessons 22 + 23). + validate-mdx: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install MDX compiler + run: npm install --no-save @mdx-js/mdx remark-directive + + - name: Validate lesson MDX syntax + run: node scripts/check-mdx-syntax.mjs + # Validate code samples can at least be parsed validate-code: runs-on: ubuntu-latest diff --git a/courses/tailwind-from-scratch/CHANGELOG.md b/courses/tailwind-from-scratch/CHANGELOG.md index 1e3e096..a53ff5c 100644 --- a/courses/tailwind-from-scratch/CHANGELOG.md +++ b/courses/tailwind-from-scratch/CHANGELOG.md @@ -13,6 +13,9 @@ copy are recorded under their own dated heading. ### Changed - Removed `test_only: true` from `course.yaml`. User decision: it's fine to promote the course to production now — visibility will be gated via the admin portal instead of keeping the whole course out of the catalog. `code/m3-resort-brava` and the microlearn units remain outstanding and can be added in a follow-up publish without re-gating. +### Fixed +- Lessons `22-modu-sukuru` and `23-tailwind-cli-v4`: fixed a `` attribute that embedded a backslash-escaped double quote (`\"`), which JSX plain-attribute strings don't support as an escape — it desynced the tag parser and Velite dropped both lessons from the catalog (404 at runtime). Swapped the inner quotes to single quotes; no meaning change. See deznode/skola-content#9. + ## [2026-07-07] — publish ### Added diff --git a/courses/tailwind-from-scratch/lessons/22-modu-sukuru/kea.mdx b/courses/tailwind-from-scratch/lessons/22-modu-sukuru/kea.mdx index 98b8b46..1791abe 100644 --- a/courses/tailwind-from-scratch/lessons/22-modu-sukuru/kea.mdx +++ b/courses/tailwind-from-scratch/lessons/22-modu-sukuru/kea.mdx @@ -31,7 +31,7 @@ Na v3, bu konfigura dark mode na `tailwind.config.js`. Na v4 kel linha sumiu — lang="css" filename="di v3 config pa v4 @custom-variant" title="Dark mode: di v3 pa v4" - note="v3 ta pega `darkMode: 'class'` na JavaScript config; v4 ta uza `@custom-variant` na bu blok `