DEV Community

Discussion on: How to add blogs to react website?

Collapse
 
tris909 profile image
Tran Minh Tri

It really depends on what websites she uses to create blogs. Let's say I have created my blogs on these websites. This websites has an API where I can call and fetch blogs under JSON type. But If she wants you to build a custom one. You have to connect it to a server / databases where you can store the blog and at the same time build a page where she can add a blog manually.

The best solutions should be tell here to create blogs on a platform that allow you to fetch her blogs under JSON types and render it rather than create that whole new features because believe me. It's really hard to do it properly from end to end.

Collapse
 
atharvredij profile image
Atharv Redij

Earlier she used write on Facebook (I know it is not a blogging platform). She requested if there was a way that she can write blogs directly on this website I created.

Collapse
 
tris909 profile image
Tran Minh Tri • Edited

If you used the word "directly". Then there are things you need :

  • Server / Databases use to call API related to blogs section and store your blogs as well as images. This server needs to store a list of images for each blog so I suggest you thinking before hand the architecture of your blogs in your databases.

  • Adding ckeditor.com/ (text editor) to allow her to create different kind of text (bold/size/...) in a single blog

  • Giving her ability to add images to a blog by storing each image she add into the blogs (data-type) and save the image into a folder stored in your server

  • Render blogs / Edit Blogs using the same text-editor above and delete blogs.

  • When you delete blogs, remember to delete all the images related to it in the images folder if you have one.

Thread Thread
 
atharvredij profile image
Atharv Redij

Yeah. I know there will be a lot of work to directly integrate blogging into the website, that is why I was asking if there is a easy way to do this. But thanks anyway