Skip to content

[mdx] remove mention of layout frontmatter property#9474

Merged
sarah11918 merged 5 commits into
mainfrom
sarah11918-patch-1
Sep 24, 2024
Merged

[mdx] remove mention of layout frontmatter property#9474
sarah11918 merged 5 commits into
mainfrom
sarah11918-patch-1

Conversation

@sarah11918
Copy link
Copy Markdown
Member

Description (required)

This removes mention of the frontmatter layout property available to MDX files from the MDX page so we can consolidate all mention of it to the Layouts page itself.

As we are not sure how much we want to promote this, leaving it to the Layouts page still makes the information prominently available without encouraging/assuming its use. Importing and using an Astro component as a layout is a more flexible option than the "magic" special property, so it will be easier to mention any limitations and caveats in just one place.

Related issues & labels (optional)

While this PR itself isn't exactly what the issue asked for, I do think a few recent changes to this, the layouts and the markdown pages all combined will work together to prevent people trying to use named slots in MDX with the special frontmatter property.

@netlify
Copy link
Copy Markdown

netlify Bot commented Sep 24, 2024

Deploy Preview for astro-docs-2 ready!

Name Link
🔨 Latest commit 9689a06
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/66f3166b1f68410008da0bd1
😎 Deploy Preview https://deploy-preview-9474--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.

@astrobot-houston
Copy link
Copy Markdown
Contributor

astrobot-houston commented Sep 24, 2024

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

Locale File Note
en guides/integrations-guide/mdx.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.

@sarah11918 sarah11918 added the improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) label Sep 24, 2024
Comment thread src/content/docs/en/guides/integrations-guide/mdx.mdx
Comment thread src/content/docs/en/guides/integrations-guide/mdx.mdx Outdated
@sarah11918
Copy link
Copy Markdown
Member Author

Alright, I think I got everything worked out!

@sarah11918
Copy link
Copy Markdown
Member Author

!coauthor

@github-actions
Copy link
Copy Markdown

Co-authored-by: Houston (Bot) <108291165+astrobot-houston@users.noreply.github.com>
Co-authored-by: Armand Philippot <59021693+ArmandPhilippot@users.noreply.github.com>

Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

Sorry about earlier, I just replied quickly before logging out!

Rereading the page, I think that maybe I'm being too picky sometimes... Other examples on the page use MDX files in src/pages without a layout, so the path could have remained the same. I probably thought about importing a Layout because we were in "Using Components in MDX".

(Anyway, thanks for the update! I still think it makes more sense for newcomers... Use MDX as a page without adding a layout, you have to like minimalism! 😅)

At least the highlighting is correct now! 😄

@sarah11918
Copy link
Copy Markdown
Member Author

Thanks! I'll go with this for now! Appreciate the help and attention to detail!

@sarah11918
Copy link
Copy Markdown
Member Author

gah, now I want to update the rest of them...

@sarah11918
Copy link
Copy Markdown
Member Author

Alright, are you up for one last check @ArmandPhilippot ???

Copy link
Copy Markdown
Member

@ArmandPhilippot ArmandPhilippot left a comment

Choose a reason for hiding this comment

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

From the source code (and from the built page), looks good to me! 🎉

@sarah11918 sarah11918 merged commit dad0d33 into main Sep 24, 2024
@sarah11918 sarah11918 deleted the sarah11918-patch-1 branch September 24, 2024 19:52
ArmandPhilippot added a commit to ArmandPhilippot/astro-docs that referenced this pull request Sep 24, 2024
yanthomasdev added a commit that referenced this pull request Sep 25, 2024
See #9474

Co-authored-by: Yan <61414485+yanthomasdev@users.noreply.github.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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify that named slots are not supported in md/mdx is layout is expressed in frontmatter

3 participants