Skip to content

fix(structure): tag bare code fences, fix heading skips, add pt-br meta_tags - #2629

Open
bruno-andrade-azion wants to merge 2 commits into
mainfrom
fix/mm-16262-structure-headings-meta-fences
Open

bruno-andrade-azion wants to merge 2 commits into
mainfrom
fix/mm-16262-structure-headings-meta-fences

Conversation

@bruno-andrade-azion

@bruno-andrade-azion bruno-andrade-azion commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

What & why

Related issue: MM-16262, in the epic MM-16212
Pages affected: 49 pages in en and pt-br:

  • the dated Terms of Service and the Savings Plan (27), plus the pt-br Terms of Service of May 12, 2026 and the pt-br index;
  • the OpenNext guide and the pt-br v3 Main Settings reference;
  • the Functions quickstart, the browserless, serverless functions, test origin and WebAssembly guides, the Edge Node reference and the pt-br WebAssembly language guide;
  • the style guide's bilingual pages and procedures pages.

The ticket's counts come from the October 29 review. I measured them again on main, parsing frontmatter with gray-matter and skipping code blocks, and most of them don't hold up:

Ticket item In the ticket On main Fixed here Left to
H1 in the body 41 pages 0 — —
Skipped heading level 30 pages 32 30 #2624 (Edge Services), #2598 (MongoDB template)
Missing meta_tags 15 pt-br pages 15 14 the pt-br April 26, 2023 terms, after #2625
namespace written as >- 2 namespaces 4 files 0 #2625
Code block with no language 1,247 31 23 #2558 (6), #2597 (1), #2593 (1)
  • H1 in the body. The 41 pages are exactly the ones with a # ... comment inside a code block or a <Code code={...}> template literal. No page has a real H1 in its body.
  • Release notes and changelog. They look like they jump from the title to H3, but they don't: DocUpdate renders each entry's date as an <h2>. I left them as they are.

Code blocks. A fence with no language reaches CodeBlock with no lang, because astro-code-blocks.ts passes node.lang ?? undefined. The webkit highlighter then falls back to JavaScript, so output such as Hello World! was tokenized as JavaScript.

Heading levels. No legal text changes.

  • In the agreements, #### Previous versions of this document: becomes ## Previous versions of this document. That's how the current Terms of Service already write it. The anchor doesn't change, and the section now shows in the page's table of contents, as it does on the current terms.
  • The OpenNext guide started at ###, so every heading moves up one level.
  • In the pt-br v3 Main Settings reference, "Lista de portas disponíveis" becomes an H3, as in English.

meta_tags. Fourteen pt-br Terms of Service pages get 'Termos de serviço, Termos de serviço Azion', with the same value and position as the other pt-br terms. The April 26, 2023 page keeps its heading fix but doesn't get the meta_tags line yet. #2625 rewrites the namespace line right below it, so adding it now would conflict. It's a one-line change once #2625 merges.

How I checked it:

Type of change

  • 🆕 New content (feat)
  • 🩹 Fix (fix) — typo, broken link, wrong information
  • ♻️ Content update (docs) — rewrite, expansion, upkeep
  • 🌐 Translation sync (i18n)
  • 🏗️ Platform / structure (refactor / chore) — reviewed by UXE, no content mixed in

Author checklist

  • PR title follows type(scope): summary (see GOVERNANCE.md §4)
  • Frontmatter complete: title, description, meta_tags, namespace, permalink, last_reviewed — no page in the repository carries last_reviewed, and the pt-br April 26, 2023 terms get meta_tags only after i18n(pt-br): pair three pages with their English versions by namespace #2625 merges
  • No legacy "edge-" product names in the copy — this PR adds no copy; the touched pages keep their wording
  • How-to/tutorial content includes at least one runnable, copy-paste-tested code block — no code block is added; existing blocks only get a language tag
  • Screenshots (if any) have alt text and follow image standards — no screenshot is added or changed
  • Internal links are relative and resolve locally — no link is added or changed, but the touched pages already have 5 broken links and the agreements use absolute URLs; the agreements links belong to MM-16265
  • If any permalink changed or page moved: redirect added in this PR — no permalink changed and no page moved
  • i18n: pt-br updated in this PR or follow-up i18n issue created: both languages are in this PR; the WebAssembly language guide changes only in pt-br, because docs(nav): triage the pages outside the navigation (MM-16244) #2593 deletes the English page
  • I ran pnpm build:local (build + frontmatter check) without errors

…sing pt-br meta_tags

- Tag 23 bare code fences in 17 pages (text for output, mdx for page
  source). A fence without a language reached CodeBlock with no lang, and
  the highlighter fell back to JavaScript.
- Fix heading skips on 30 pages: the agreements "Previous versions"
  heading becomes an H2, as on the current Terms of Service; the OpenNext
  guide moves up one level; a pt-br v3 reference H4 becomes H3, as in en.
- Add meta_tags to the 15 pt-br Terms of Service pages that lacked it.
…2625

#2625 rewrites the namespace line next to it; adding meta_tags there now
would conflict.

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants