Hugo

Hugo blog inside larger React app

I have deployed Hugo blog & I have deployed react app. Both are working fine independently. I just want to deploy both on single domain. e.g. example.com (has both react + Hugo). I don’t want two different domains e.g. blog.example.com(Hugo) & example.com (react). How do I connect Hugo generated paths to React Router to give all of the paths? Can it be automated? I am also willing to connect them manually.

Hi!

It is possible to remove a landing/home page completely:

disableKinds:
  - home

So just remove your _index.md from /content/ and leave your folder /content/blog/ folder.

Maybe its ok to (automatically) copy the contents of your public folder into your React project?! If you need to combine RSS files etc. it’s more complicated, I guess.

This is not a real ‘inner’ connection. But you can link to example.com/blog/ from your app.

I was looking for little easy solution.

https://sequiturs.com/blog/post/using-static-site-generator-for-single-page-application-blog/

They have done in almost 3 years ago & combined react + Hugo. Both Hugo and react have changed a lot in 3 years. Hoping for something production ready solution.

:rofl:
:rofl:
:rofl:

I don’t know what that means, but I bet someone in React forums would. Hugo just outputs text files, so I suggest trying in a React community. :slight_smile:

Although I would always suggest Hugo: Wouldn’t it be easier to use a static website generator build upon React in your case?

I am looking for someone who has tried to do this in their project otherwise I will use easier solution of deploy Hugo on subdomain & react on main domain.
Because you think you are helping with small little suggestions but it’s not enough to take it to finish line.