Skip to content

fix(tutorial): prevent character encoding issue in unit 4#11159

Merged
ArmandPhilippot merged 2 commits into
withastro:mainfrom
ArmandPhilippot:fix/tutorial
Mar 5, 2025
Merged

fix(tutorial): prevent character encoding issue in unit 4#11159
ArmandPhilippot merged 2 commits into
withastro:mainfrom
ArmandPhilippot:fix/tutorial

Conversation

@ArmandPhilippot
Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot commented Mar 5, 2025

Description (required)

Since the change introduced by withastro/astro#12231 in Astro 5, <meta charset="utf-8" /> is no longer automatically added for Markdown files that use the layout frontmatter property. So users was facing a character encoding issue in unit 4 while checking the rendering of MarkdownPostLayout before nesting it in BaseLayout.

Before After
tutorial-before tutorial-after

This PR:

  • adds <meta charset="utf-8" /> in unit 4-2
  • adds a new step in unit 4-3 to remove the <meta charset="utf-8" /> (I thought maybe it was easier for beginners to understand rather than removing it in step 1)

Related issues & labels (optional)

@astrobot-houston
Copy link
Copy Markdown
Contributor

astrobot-houston commented Mar 5, 2025

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/tutorial/4-layouts/2.mdx Source changed, localizations will be marked as outdated.
en/tutorial/4-layouts/3.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 5, 2025

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3ad1c63
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/67c8c03fa58da20008fdf9b2
😎 Deploy Preview https://deploy-preview-11159--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ArmandPhilippot ArmandPhilippot added improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) tutorial Content/UI for the Build a Blog Tutorial labels Mar 5, 2025
Copy link
Copy Markdown
Member

@sarah11918 sarah11918 left a comment

Choose a reason for hiding this comment

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

I hate that we need this 😅

@ArmandPhilippot
Copy link
Copy Markdown
Member Author

Yeah, I know... at least it's one line, we don't need the whole page shell. 😅

@ArmandPhilippot ArmandPhilippot merged commit 81d786e into withastro:main Mar 5, 2025
@ArmandPhilippot ArmandPhilippot deleted the fix/tutorial branch March 5, 2025 21:29
ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request Mar 6, 2025
thomasbnt added a commit that referenced this pull request Mar 6, 2025
See #11159

Co-authored-by: Thomas Bonnet <thomasbnt@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) tutorial Content/UI for the Build a Blog Tutorial

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/tutorial/4-layouts/2: chinese are garbled characters in the posts/post-* while using MarkdownPostLayout

3 participants