-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
refactor(theme): split BlogPostItem into smaller theme subcomponents #7716
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
Size Change: -469 B (0%) Total Size: 804 kB
ℹ️ View Unchanged
|
WIP: will likely add a |
# Conflicts: # packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx
…to override default bottom margin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some review comments
packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts
Outdated
Show resolved
Hide resolved
packages/docusaurus-theme-classic/src/theme/BlogPostItem/Footer/ReadMoreLink/index.tsx
Show resolved
Hide resolved
packages/docusaurus-theme-classic/src/theme/BlogPostItemList/index.tsx
Outdated
Show resolved
Hide resolved
packages/docusaurus-theme-classic/src/theme/BlogPostPage/Metadata/index.tsx
Show resolved
Hide resolved
packages/docusaurus-plugin-content-blog/src/plugin-content-blog.d.ts
Outdated
Show resolved
Hide resolved
packages/docusaurus-theme-classic/src/theme/BlogPostItem/Header/Metadata/index.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Breaking changes
The blog theme components have been significantly refactored, similarly to docs (#7644)
@theme/BlogPostItem
has been split into much smaller components, easier to swizzleconst {metadata, frontMatter} = useBlogPost()
import {useBlogPost} from '@docusaurus/theme-common/internal';
metadata.truncated
=>metadata.hasTruncateMarker
@theme/BlogPostAuthor
=>@theme/BlogPostItem/Header/Author
@theme/BlogPostAuthors
=>@theme/BlogPostItem/Header/Authors
Pre-flight checklist
Motivation
Continue the process of splitting larger theme components into smaller subcomponents easier to swizzle
Test Plan
ci + preview
These links should be strictly identical to what it looked like before:
Blog list:
Blog post:
Site changelog:
Site changelog entry:
Test links
Deploy preview: https://deploy-preview-7716--docusaurus-2.netlify.app/
Related issues/PRs
#7644