Best way to integrate a blog

I need a blog for my website. I would like to avoid using a subdomain for SEO purposes. Any recommendations for how this should be approached?
4 Replies
kapa.ai
kapa.ai3w ago
Hi @josh. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the discussions in the Wasp community, it seems that the OpenSaas template already comes with a blog integrated into the main stack. However, if you're starting from scratch or using a different template, you might need to add a blog separately. One approach discussed in the community is using Astro, a front-end framework that can be used to build static sites like blogs. However, it's noted that this might add another layer of complexity, especially during deployment. If you decide to go with Astro, you can deploy the blog as a static site on Netlify, as suggested by a community member. Netlify is one of the deployment providers covered in the Wasp documentation. Here are the relevant links for your reference: - OpenSaas template discussion (https://discord.com/channels/686873244791210014/1204153431019753512) - Astro and deployment discussion (https://discord.com/channels/686873244791210014/1204929776272281641) - Wasp deployment documentation (https://wasp-lang.dev/docs/advanced/deployment/manually#netlify) Please note that these are just suggestions and the best approach would depend on your specific requirements and familiarity with the tools involved. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @josh, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
josh
josh3w ago
That's via a subdomain though right
martinsos
martinsos3w ago
Yup. To serve it on the same domain, let's say sometihng like myapp.com/blog, I can think of two appraoches at the moment: 1. Have something like nginx forward all reuqests for myapp.com/blog to e.g. Astro blog, adn the rest to Wasp app. I can't help much more with details here as I haven't done this recently, but this is quite general thing and not so Wasp related so searching the net should help. 2. You could try serving the whole blog through Wasp, e.g. defining API routes in Wasp that serve again e.g. Astro blog, but this will be a bit hacky possibly. This will be all quite easier once Wasp adds server side rendering and a bit better static content support, so it will be easier to have blog directly in Wasp. RIght now, I would actually recommend a subdomain as the simplest way to go about this. @miho any ideas / improvements on what I wrote here maybe?
miho
miho3w ago
What Martin said makes sense to me 👍 There is one extra option to consider if you decide to have your blog in Wasp - I haven't tried it yet - but, you could use some Vite plugin e.g. https://github.com/Rudeus3Greyrat/vite-plugin-prerender that could prerender your blog routes to static HTML and it would be serve like static HTML vs. a SPA app. This is something I'd like to try and see how it works. Your app loads some Markdown and renders it using React. You then use the Vite prerender plugin to ask it to generate static HTML pages on build time. It could be an interesting approach 😄
GitHub
GitHub - Rudeus3Greyrat/vite-plugin-prerender: Flexible, framework-...
Flexible, framework-agnostic static site generation for sites and SPAs built with Vite. - Rudeus3Greyrat/vite-plugin-prerender
Want results from more Discord servers?
Add your server