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

[WIP] Blog Submission - No-code Blog Feature #318

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

itzamanjain
Copy link
Contributor

@itzamanjain itzamanjain commented Oct 8, 2024

Description

This PR implements the blog submission no-code blog feature.

need to create a blog table first in prod with these cols

CREATE TABLE blog (
  id SERIAL PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  url VARCHAR(255) NOT NULL,
  excerpt TEXT,
  date DATE NOT NULL,
  author VARCHAR(255) NOT NULL,
  tag VARCHAR(255),
  content TEXT NOT NULL,
  readingTime INT,
  status VARCHAR(50) DEFAULT 'pending'
);

Related Issue

Issue #305

Changes Made

Summary:

This PR introduces a blog submission form that allows users to submit blogs by providing details such as the blog title, content, tags, and author information. The next step is to integrate the form with the backend for storing blog data and to implement an approval system for moderators.

Changes:

  • Added /submit-blog route with a submission form.
  • Form fields include title, content (Markdown), author, email, tags, and more.

Next Steps:

  • Integrate the form with the backend to store blogs in the database.
  • Implement an admin/moderator approval system.

Screenshots

Checklist

  • I have tagged the issue in this PR.
  • I have attached necessary screenshots.
  • I have provided a short description of the PR.
  • I ran yarn build and the build is successful.
  • My code follows the style guidelines of this project.
  • I have added necessary documentation (if applicable).

Copy link

vercel bot commented Oct 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pear-landing-page ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 19, 2024 2:53pm

Copy link

vercel bot commented Oct 8, 2024

@itzamanjain is attempting to deploy a commit to the PearAI Team on Vercel.

A member of the Team first needs to authorize it.

@Fryingpannn
Copy link
Contributor

👀

@itzamanjain itzamanjain changed the title [WIP] Blog Submission Form - No-code Blog Feature [WIP] Blog Submission - No-code Blog Feature Oct 19, 2024
@itzamanjain
Copy link
Contributor Author

itzamanjain commented Oct 19, 2024

@Fryingpannn
I’ve added some more changes to make blog submission no code .
Now, users can submit a post by going to /blog/submit-blog using the blog form.

  • The blog will be added to the blog table in Supabase with the status set to "pending".
  • Admins can go to /secret-admin-page to see all blogs in the pending state and can approve or reject them, which will update the status in the database.

Things to be done:

  • Restrict access to the admin page so that only admins can approve or reject blogs.
  • Set up a flow to display approved blogs on the blog page.

What do you think of this approach? Any suggestions or feedback?

@itzamanjain itzamanjain marked this pull request as ready for review October 24, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants