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

feat(content-blog): include front matter in loaded content metadata #6189

Merged
merged 2 commits into from
Dec 26, 2021

Conversation

Josh-Cena
Copy link
Collaborator

Motivation

In the spirit of plugin enhancement (#4492) we should allow users to declare additional server-side metadata through front matter. #4495 added the front matter to doc metadata; we should do the same for blog posts as well.

This has been requested on Discord.

Have you read the Contributing Guidelines on pull requests?

Yes

@Josh-Cena Josh-Cena added the pr: polish This PR adds a very minor behavior improvement that users will enjoy. label Dec 25, 2021
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Dec 25, 2021
@Josh-Cena Josh-Cena changed the title feat(content-blog): include front matter in metadata feat(content-blog): include front matter in loaded content metadata Dec 25, 2021
@netlify
Copy link

netlify bot commented Dec 25, 2021

✔️ [V2]

🔨 Explore the source changes: 0290777

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61c6a700e6cf7600078ea2f6

😎 Browse the preview: https://deploy-preview-6189--docusaurus-2.netlify.app

@github-actions
Copy link

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 68
🟢 Accessibility 98
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-6189--docusaurus-2.netlify.app/

@github-actions
Copy link

Size Change: 0 B

Total Size: 662 kB

ℹ️ View Unchanged
Filename Size
website/.docusaurus/globalData.json 40.1 kB
website/build/assets/css/styles.********.css 102 kB
website/build/assets/js/main.********.js 490 kB
website/build/index.html 29.6 kB

compressed-size-action

@Josh-Cena Josh-Cena added the status: awaiting review This PR is ready for review, will be merged after maintainers' approval label Dec 25, 2021
@KELEN
Copy link

KELEN commented Dec 26, 2021

nice, i also need it. please mr

@Josh-Cena Josh-Cena removed the status: awaiting review This PR is ready for review, will be merged after maintainers' approval label Dec 26, 2021
@Josh-Cena Josh-Cena merged commit 2cc89e5 into main Dec 26, 2021
@Josh-Cena Josh-Cena deleted the jc/blog-frontmatter-in-metadata branch December 26, 2021 03:24
@Josh-Cena
Copy link
Collaborator Author

@KELEN Merged. Please test with canary release

@KELEN
Copy link

KELEN commented Dec 26, 2021

@Josh-Cena canary version has error Can't find docs preferred context, maybe you forgot to use the "DocsPreferredVersionContextProvider"?

@Josh-Cena
Copy link
Collaborator Author

Josh-Cena commented Dec 26, 2021

Seems like a distinct issue. This PR doesn't even change docs-related code. Could you send another issue with your code sample / a minimal repro?

@honlyHuang
Copy link
Contributor

@Josh-Cena canary version has error Can't find docs preferred context, maybe you forgot to use the "DocsPreferredVersionContextProvider"?

I also encountered this problem. How did you solve it in the end?

@slorber
Copy link
Collaborator

slorber commented Feb 16, 2022

@honlyHuang please try to run the docusaurus clear command, and remove/update your swizzled components too

This is likely an issue with your site, unless you are able to provide a small repro

@honlyHuang
Copy link
Contributor

@slorber Thx! I solved it. The reason is that I upgraded from beta.8 to beta.15, and the plugin configuration has not been updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: polish This PR adds a very minor behavior improvement that users will enjoy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants