How to update data on a static site?

I have a site that is mostly static. I feel like astro would be fairly well suited for it. My problem is something about static sites just doesn't click with me. I see all these examples of Blogs for example. How are they adding new posts if a blog is static? Are they redeploying the entire app every time a new post is added? I have for example a few posts (not many. If things go well, there may be a few thousand) and a few users who manage those posts (again, not many. Maybe a few dozen or a couple hundred way down the line). I need to be able to go into a portal and submit a new post and have that show up without having to redeploy every time (unless there is some trick to make that happen really really fast that I don't know about. And I do have some minimal javascript required such as filtering and sorting and searching as well as analyzing metrics (how many posts there are, how many posts per user, etc.). Is there something I'm just not getting? I'm just feeling more and more like the t3 stack is overkill for what I'm doing but maybe that's just what is required for something like this?
13 Replies
Neto
Netoā€¢2y ago
If there is constant change in data You either have to redeploy Or use a CMS (with next isr) So you can create new static pages on demand
Jakesdoc
Jakesdocā€¢2y ago
Ok. That's a bit disappointing, but oh well
Neto
Netoā€¢2y ago
I mean Astro is easy and fast to deploy Less than a minute Deploying on vercel is even easier
Jakesdoc
Jakesdocā€¢2y ago
So if I have someone log in and upload a new post. They would submit that post and trigger a redeploy of the website and that would be done in under a minute?
Neto
Netoā€¢2y ago
Using astro as example You can write markdown directly on the repository and it will render fine If you have to manage accounts for posts A CMS will be easier
Jakesdoc
Jakesdocā€¢2y ago
I already have a database setup with all the content stored in it and its displayed from that, not markdown
Neto
Netoā€¢2y ago
Oh You can check next isr You can create static pages on build And with changes later You can build only the new pages to be static So you don't need to redeploy
Jakesdoc
Jakesdocā€¢2y ago
That's what I've been using so far and it works, just was hoping to use something other than next. Unfortunately nothing else seems to have anything like isr
Neto
Netoā€¢2y ago
You can look into nuxt 3 They can have something But it's Vue based
Jakesdoc
Jakesdocā€¢2y ago
I've never used vue but I can take a look. Could be interesting to give it a shot. Does it have good typescript support? and tailwind
Neto
Netoā€¢2y ago
Yes
Jakesdoc
Jakesdocā€¢2y ago
Cool, I'll look into that then. Thank you šŸ™‚
Reality Designers
Reality Designersā€¢2y ago
Use Astro & Sanity https://youtu.be/NM0FPzVdeUw
Little Sticks
YouTube
Integrate Astro and Sanity with our new Astro Integration! šŸš€
I demo our new Astro + Sanity integration package that helps you use Sanity as a Headless CMS seamlessly in an Astro project. ā–¬ā–¬ā–¬ā–¬ā–¬ā–¬ā–¬ā–¬ā–¬ā–¬ Links NPM Package: https://www.npmjs.com/package/astro-sanity Source code: https://github.com/littlesticks/astro-sanity-demo ā–¬ā–¬ā–¬ā–¬ā–¬ā–¬ā–¬ā–¬ā–¬ā–¬ Let's Connect https://littlesticks.dev/discord https://twitter.com/jay...
Want results from more Discord servers?
Add your server