Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: deprecated Astro.props.slugAstro.props.id #2685

Merged

Conversation

julien-deramond
Copy link
Contributor

@julien-deramond julien-deramond commented Dec 14, 2024

Description

While migrating some projects to Astro v5 (+ Starlight), building the website showed warning messages that Astro.props.slug is deprecated (still works right now).

If I'm not wrong, Astro.props.slug can be safely replaced by Astro.props.entry.slug.

This PR applies this change in Starlight documentation in the docs/src/content/docs/guides/overriding-components.mdx override example.

Note: I wasn't sure whether or not I needed to modify also the translated files. Please tell me if I need also to modify the other files.

This PR doesn't contain any changesets as it's a documentation modification only.

Copy link

changeset-bot bot commented Dec 14, 2024

⚠️ No Changeset found

Latest commit: a08dce4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the 📚 docs Documentation website changes label Dec 14, 2024
Copy link

netlify bot commented Dec 14, 2024

Deploy Preview for astro-starlight ready!

Name Link
🔨 Latest commit a08dce4
🔍 Latest deploy log https://app.netlify.com/sites/astro-starlight/deploys/675d7c754d6d500008ba4fc6
😎 Deploy Preview https://deploy-preview-2685--astro-starlight.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@astrobot-houston
Copy link
Collaborator

astrobot-houston commented Dec 14, 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/overriding-components.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.

@julien-deramond julien-deramond marked this pull request as ready for review December 14, 2024 07:52
Copy link
Member

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

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

Thanks for the PR 🙌

I left a suggestion to the code change but great catch.

I wasn't sure whether or not I needed to modify also the translated files. Please tell me if I need also to modify the other files.

This is perfect, we usually avoid when possible to modify the translated files as updating them could mark them as updated even though they're not.

docs/src/content/docs/guides/overriding-components.mdx Outdated Show resolved Hide resolved
Co-authored-by: HiDeoo <494699+HiDeoo@users.noreply.github.com>
Copy link
Member

@HiDeoo HiDeoo left a comment

Choose a reason for hiding this comment

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

Amazing, thanks for the quick update 🌟

@HiDeoo HiDeoo changed the title docs: deprecated Astro.props.slugAstro.props.entry.slug docs: deprecated Astro.props.slugAstro.props.id Dec 14, 2024
@HiDeoo HiDeoo merged commit a7cf57e into withastro:main Dec 14, 2024
15 checks passed
@julien-deramond julien-deramond deleted the main-jd-Astro.props.slug-deprecation branch December 14, 2024 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 docs Documentation website changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants