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

Feature Request: Automate Blog Post Updates on Homepage #183

Open
Abhijay007 opened this issue Feb 2, 2024 · 4 comments
Open

Feature Request: Automate Blog Post Updates on Homepage #183

Abhijay007 opened this issue Feb 2, 2024 · 4 comments

Comments

@Abhijay007
Copy link
Collaborator

Abhijay007 commented Feb 2, 2024

Is your feature request related to a problem? Please describe.

Currently, updating the latest blog posts on the homepage necessitates manual intervention, involving the tedious process of editing a JSON file. This manual update procedure is prone to errors and inefficiencies. To streamline this process and ensure timely updates, we aim to implement an automated workflow. By automating the task of fetching and updating new blog posts, we can enhance productivity and accuracy. This workflow automation will not only simplify the maintenance process but also ensure that our homepage consistently reflects the latest content.

Describe how you would like this problem to be resolved

Both PostgreSQL and Apache APISIX have implemented similar approaches on their sites. We can examine their methods and consider implementing a similar solution for our website.

Here are the resources for their implementations:

Apache APISIX Website Github: HomeEventsSection.tsx
Apache APISIX Website: https://apisix.apache.org/
PostgreSQL AI Website Implementation: blog.js
PostgreSQL AI Website: https://postgres.ai/

@shubhusion
Copy link
Contributor

@Abhijay007 assign this issue to me

@Abhijay007
Copy link
Collaborator Author

@shubhusion go ahead

@shubhusion
Copy link
Contributor

Solution 1: API-Based Approach

Overview:

In this approach, the latest blog posts are fetched from an API endpoint, providing real-time updates and scalability.

Steps to Implement:

  1. Setup API Endpoint: Develop an API endpoint to serve the latest blog posts, returning necessary data fields.
  2. Fetch Data from API in Frontend: Modify the homepage component to fetch blog posts from the API using React or similar technology.
  3. Display the Blog Posts: Design a responsive frontend to dynamically display fetched blog posts.

Solution 2: JSON-Based Approach

Overview:

In this approach, the latest blog posts are stored in a JSON file, updated periodically by a script.

Steps to Implement:

  1. Automate JSON File Update: Create a script to fetch and update the JSON file with the latest blog posts, handling errors gracefully.
  2. Fetch Data from JSON in Frontend: Modify the homepage component to fetch blog posts from the JSON file using React or similar technology.
  3. Display the Blog Posts: Design a responsive frontend to dynamically display fetched blog posts.

I have come up with these two solutions to solve the above issue and would like to know your preference. @Abhijay007

@Abhijay007
Copy link
Collaborator Author

Solution 1: API-Based Approach

Overview:

In this approach, the latest blog posts are fetched from an API endpoint, providing real-time updates and scalability.

Steps to Implement:

  1. Setup API Endpoint: Develop an API endpoint to serve the latest blog posts, returning necessary data fields.
  2. Fetch Data from API in Frontend: Modify the homepage component to fetch blog posts from the API using React or similar technology.
  3. Display the Blog Posts: Design a responsive frontend to dynamically display fetched blog posts.

Solution 2: JSON-Based Approach

Overview:

In this approach, the latest blog posts are stored in a JSON file, updated periodically by a script.

Steps to Implement:

  1. Automate JSON File Update: Create a script to fetch and update the JSON file with the latest blog posts, handling errors gracefully.
  2. Fetch Data from JSON in Frontend: Modify the homepage component to fetch blog posts from the JSON file using React or similar technology.
  3. Display the Blog Posts: Design a responsive frontend to dynamically display fetched blog posts.

I have come up with these two solutions to solve the above issue and would like to know your preference. @Abhijay007

@shubhusion Both approaches seem fine to me, but what is more important is determining what can work for us. In the issue above, I shared a few resources. You can follow those resources to implement this feature. Also, it would be great if you could make a PR and demo the implementation with that PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants