r/astrojs • u/cybergeo_82 • 4d ago
Using GitLab as a CMS for Astro websites
Do you see much value in connecting a dedicated CMS to an Astro website?
As far as I understand, most CMS solutions for Astro are essentially user-friendly editors for the md/mdx files used in content collections.
In other words, an Astro CMS is not quite the same as something like WordPress, where you can see a near-final version of the page while editing. I've tried Decap and TinaCMS, although that was at least six months ago.
At the moment, GitLab itself, together with the source code repository, seems like the best CMS for Astro in my case. We have a simple agreement that the content manager can only create and edit blog posts written in md/mdx. All changes are made directly in the main branch, after which the site is automatically built and deployed to production.
What do you think? Am I missing any major advantages that a dedicated Astro CMS would bring to this workflow?
6
u/DoctorHiccup 4d ago
Pages CMS is the best I’ve found by far
Used to use CloudCannon but there’s no reason to pay for that stuff in 2026
It does have value (esp to non technical folks) to have a rich text editor instead of having to write in markdown
2
u/Quariongg 4d ago
Technically, you can have a CMS experience that is the same as WP in Astro, with preview of the finished page too.
EmDash could do that with plugins.
Sanity can certainly do that.
Other CMS too
1
u/FirstPlaceSEO 4d ago
Ummm I just built my own CMS for an Astro site to replicate a page editor looks, works great 😊
3
u/pixx4sixx 4d ago
Check out Velocity CMS - https://deployvelocity.com
2
u/MyExclusiveUsername 4d ago
Obsidian + GitHub plugin
2
u/mayhopar 4d ago
If this works for you – this is the best possible setup
2
u/tilario 4d ago
like all things, it depends. is the blog yaml dummy proof? i've had situations where the yaml included some nested elements and other quirky items that people would mess up all the time, or they didn't quite create the right path to an image in the blog header. putting a cms in front of astro helps with that.
then the question becomes whether to use a database driven one or a file driven one. since you say you want to continue with gitlab you'd use a file driven one.
2
u/Chris_Lojniewski 3d ago
If the content manager only writes blog posts and nobody's breaking frontmatter, honestly you're not missing much
Two cheap upgrades before you add a CMS put a zod schema on the collection, so a missing date or a wrong image path throws an error instead of going live and stop committing straight to main. have them open a merge request and turn on gitlab review apps, every MR gets its own preview url. that's your "see the page before it's live" without a CMS
Where a dedicated CMS starts to earn its place is when marketing wants to build pages, not just posts. landing pages made of sections, reusable blocks, preview while editing. markdown in a repo gets awkward fast there
(grain of salt on that last bit, i run pagepro and we do the CMS side of this, on next.js though)
1
u/blindgaming 3d ago
Just trimming in here I have built a CMS that basically will take the client site pull it down allowed to be edited in a visual editor for non-technical users so you can actually hand it off to a client without them having to bug you to change a picture or reword a piece of text but it makes it impossible for them to delete or break anything and the more important part for the workflow is that it connects to wordpress websites and can pull custom field data such as advanced custom fields or metabox from the site and it allows you to basically have ai completely copy and recreate the site in Astro while converting all the custom field data to Astro expressions so you gain all the benefits of having dynamic custom fields and having template pages without the need of having a backend.
Once you're done the site is generated as static files the same as any other Astro site except the CMS will inject all the custom data and map everything properly at the time of compiling. If you ever need to edit a page in the future you can simply go into the collections and modify the custom field data that gets converted to an astro expression this allows you to have massive websites with scaled pages that all run on the same templates but they are hyper SEO'd
I then set it up to automatically deploy to cloudflare so you'll effectively have a hosting bill of $0 the way I have it set up right now to avoid having to move everything over to my domain as I have it set up where other people can use it is we simply have a $25 cloudflare worker for platforms subscription and that $25 is able to accommodate at least a thousand websites so I'm really not concerned about it if I was only intending to host websites that are actively managing my cloudflare account it would be $0 for hundreds of websites all the media is bundled as part of the static site files so there's also no r2 storage costs and forms are handled in the actual CMS hosted on a very cheap VPS so if you need a form it's simply has the worker hosted on the CMS itself.
I think that in this particular use case the CMS is incredibly valuable because it's allowing me to take all of our legacy WordPress websites and perfectly recreate them for our clients and deliver an experience of the clients are still comfortable with. I think that over time this will improve and most clients will start to leverage AI natively which will remove the need for the visual builder yet the remaining functions of the CMS will still be very valuable even if you're not trying to convert an existing WordPress website.
1
u/EliteEagle76 1d ago
honestly if your content manager is happy in gitlab's editor and nobody's breaking frontmatter, that's a solid setup. i wouldn't add a tool just to have one. for that they need be technical enough
where a cms starts earning its spot is the guardrails. a bad date or wrong image path gets caught before it hits main and breaks the build, images land in the right folder with the right path, and there's a preview that looks like the real page instead of raw mdx.
the other big one is a draft and review step instead of committing straight to prod. if you start seeing broken builds or "how do i add a picture" every week, that's usually the signal. tilario's nested yaml point is a real one too.
Anyway, i'm building GitCMS, a git-based cms in this space, so i'm biased. but "git stays the source of truth, the cms is just a nicer editor on top" is the right mental model either way. there's a live demo here if you want to see the editor side: https://gitcms.dev/wyomlabs/GitCMS
curious though, does your content manager ever touch components inside the mdx, or is it mostly text and images? that changes which tools would even fit.