Open matijaSos opened 1 year ago
BlogLayout component is used as a wrapper for both the list of blog posts and the individual blog post. Since we customize the looks of the blog post list, we need to differentiate between these two cases. Currently we are depending on the Docusaurus' internal structure of blog post data: https://github.com/wasp-lang/wasp/blob/216828247362ad5c4792f6a6d0a7569217ee547b/web/src/theme/BlogLayout/index.js#L31
BlogLayout
Seems like this could be the fix: https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx#L19
note: tried using useBlogPost() hook from above, but it throws an error that it needs to be used within BlogPostProvider context. Out of ideas for now.
useBlogPost()
BlogPostProvider
BlogLayout
component is used as a wrapper for both the list of blog posts and the individual blog post. Since we customize the looks of the blog post list, we need to differentiate between these two cases. Currently we are depending on the Docusaurus' internal structure of blog post data: https://github.com/wasp-lang/wasp/blob/216828247362ad5c4792f6a6d0a7569217ee547b/web/src/theme/BlogLayout/index.js#L31Seems like this could be the fix: https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-theme-classic/src/theme/BlogPostItem/index.tsx#L19