-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add Recent Blogs to Home Page #35
Add Recent Blogs to Home Page #35
Conversation
f35ce06
to
a28f3bb
Compare
plugins/blog-plugin.js
Outdated
const fd = fs.openSync(`${dir}/recent-posts.json`, 'w'); | ||
fs.writeSync(fd, JSON.stringify(recentPosts)); |
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.
I don't like this writing directly to the file system. Did you have a look at this example?
I also asked if there's a better way to do that in the most recent version of Docusaurus.
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.
Understood, will look into this.
- Deleted the default `src/pages/index.jsx` file. - Added custom homepage component in `src/components/Home/index.js`. - Updated routing to render the new custom homepage component. - Added a custom blog plugin required for rendering the homepage component. Signed-off-by: Shivank Anchal <[email protected]>
a28f3bb
to
bc462be
Compare
blogTitle: 'Replica_IO Blog', | ||
blogDescription: 'Blog of the Replica_IO project - an open-source framework for building practical distributed replication mechanisms.', | ||
showReadingTime: true, | ||
showLastUpdateTime: true, | ||
showLastUpdateAuthor: true, | ||
// Remove this to remove the "edit this page" links. | ||
editUrl: `${siteGitHubUrl}/edit/main/`, |
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.
Please preserve these properties.
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.
Ok
@@ -175,4 +177,4 @@ const config = { | |||
}), | |||
}; | |||
|
|||
export default config; | |||
export default config; |
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.
Your formatter seems to be very aggressive: why you remove newlines at the end of files?
index.jsx
).recent-posts.json
in the.docusaurus
directory.