feature: add OutdatedBanner component for outdated articles#113
Open
snappygrav wants to merge 2 commits into
Open
feature: add OutdatedBanner component for outdated articles#113snappygrav wants to merge 2 commits into
snappygrav wants to merge 2 commits into
Conversation
- Add `outdated` boolean field to zPost schema - Create OutdatedBanner component with i18n support - Display banner conditionally in blog article page - Add translation keys in fr and en blog.json
|
@Maximiliem is attempting to deploy a commit to the Team Bearstudio Team on Vercel. A member of the Team first needs to authorize it. |
ProtasGregoire
approved these changes
May 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an
OutdatedBannercomponent that can be displayed on top of blog articles to warn readers that the content may no longer be valid.Closes #111
Changes
src/schemas/posts.ts— added optionaloutdatedboolean field tozPostschemasrc/components/outdated-banner.astro— new component with i18n supportsrc/pages/fr/blog/articles/[id]/index.astro— conditionally renders the banner whenoutdated: truesrc/i18n/fr/blog.json— addedblog.article.outdatedtranslation keyssrc/i18n/en/blog.json— addedblog.article.outdatedtranslation keysUsage
First of all, you need to locate into src/content/posts/
Then, look for an article that you want to modify the state to "Outdated", for example: src/content/posts/start-ui/en.md
To mark an article as outdated, add
outdated: trueto its frontmatter:Screenshots
Notes
fr.mdx/en.mdx), theoutdatedflag needs to be set manually in each file independently.