10 ms·
Introduction to Flat-File CMS
- rob-olmos 6y agoSomewhat related, I've been fond of flat-file or file-based configs as well. Such as Nagios/Icinga has configuration files, but now seem to suggest a database & UI/API. File-based config made scripting the generation of the configs pretty easy and updating for changes by just overwriting the files and reloading the daemon. IIRC, similarly TWiki also uses individual files for the pages and configs with RCS (Revision Control System) per-file to track changes.
- xorcist 6y agoEspecially since Puppet/Salt/Ansible does that part for you. Apply the "web server" class to a node and there is nothing to forget as the relevant config templates are applied both to the monitoring system, the backup runner, and anything else. Configurations that live in a database somewhere is much harder to manage as they have to be set by a config running which needs to be written and maintained.
- techntoke 6y agoHugo is a great flat-file CMS, although it doesn't come with an admin interface or editor built in. Would love to see something as fast as Hugo that I can just point at a directory of Markdown files with front-matter/data that can edit/commit files from a UI using Git that runs locally.
- earthboundkid 6y agoNetlifyCMS works with Hugo to create a decent GUI, but it works over the REST API to Github rather than working locally.
- mickael-kerjean 6y agoI did build a tool for this: https://github.com/mickael-kerjean/filestash https://github.com/mickael-kerjean/filestash. The idea is to link your github repo and let people use it (for example: https://demo.filestash.app/login?next=/files/_posts#type=git&url=https://github.com/mickael-kerjean/filestash-website https://demo.filestash.app/login?next=/files/_posts#type=git...) or create a shared links to make it really easy for anyone to manage the repository without requiring any knowledge of GIT https://demo.filestash.app/s/jekyll https://demo.filestash.app/s/jekyll
- netsharc 6y agoI've been using Hugo, but the template syntax is a pain to learn/get right...
- gnabgib 6y agoThe template syntax is actually from go[0] which you can find some guides[1] for. While the Hugo website now mentions this, I'm not sure it always made it clear the syntax is not its own (it just seems to be frustratingly light on some use-cases). Once you understand the syntax though, it applies to more than just Hugo. [0]: https://golang.org/pkg/text/template/ https://golang.org/pkg/text/template/ [1]: https://gowebexamples.com/templates/ https://gowebexamples.com/templates/
- subpixel 6y agoI’ve been an API-based CMS fan for a while but at the end of the day it’s a huge bet on the viability of the vendor, because good luck migrating away from an API-based CMS. No way all of the myriad vendors in the headless-CMS world survive this downturn. I think that needs to inform any CMS decision. Ultimately I suspect there will be vertical integration at play with the companies raising money to be the Wordpress of the 21st century. Wordpress is a CMS after all.
- akie 6y agoI company I worked at had 20 or so sites on a headless API based CMS. Basically you’d enter structured data in their proprietary backend, and the site would request that data as JSON via the API. The marketing department hated it with a passion, because there was no way to do “one-off” things without involving IT, and IT hated it because marketing needed permanent handholding for the simplest of things. After about a year of paying €8000 a month for hosting they replaced it with one really good 100% custom WordPress theme.
- mymmaster 6y agoHow did this remove the need of using IT to do one-off things?
- bigbassroller 6y agoWordPress has a publish button, post scheduling and revision history all out of the box with no plugins. That right there eliminates most of the need of IT in day to day publishing.
- andrewingram 6y agoI don’t follow. Everything you’ve listed is a feature of most headless CMSs I’ve investigated.
- bigbassroller 6y ago
- tootie 6y agoMy company does a lot of CMS work for clients. Everything from static site generators up to giant enterprise tools. One thing I've determined is that the giant enterprise tools are nearly worthless even for the enterprises they're designed to serve. They add giant layers of complexity to service features that look great in a demo and serve no business purpose. Then they become a technical ghetto full of proprietary plugin code that require product expertise and are inaccessible to the rest of the dev team. That and they cost $100K-$1MM and more for licenses. It's possible to implement them well, but only by applying the same kind of design principles you would to simpler systems. Even when I'm working with a client that doesn't blink at the price tag, I'm 100% onboard with headless or flat files.
- gunn 6y agoHey, since you know about this space, could I contact you to to learn some more about it? I'm developing a product that can act as a CMS but is more general and I think more powerful. If you can email me, I'm arthur@everdb.net
- Joe8Bit 6y agoCouldn't agree more. It's really interesting to see a new generation of vertical specific, large scale CMSs emerge (like from publishing with Chorus from Vox[0] or Arc from the Washington Post[1]). My problem with 'Enterprise CMSs' was always that they tried to sell one hammer for every single type of nail, and actually, use cases for content management are so varied (and often specific to verticals) that you buy a big generalist CMS and end up having to customise and mess about with it so much you're always left in the situation you described. [0]: https://getchorus.voxmedia.com https://getchorus.voxmedia.com [1]: https://www.arcpublishing.com https://www.arcpublishing.com
- tootie 6y agoI think the maturity model for CMS is something like flat file to headless to homemade. If you ever reach the point that you have enough scale of content to require a dedicated editorial team, it's probably worth investing in something very domain-specific and tailored to your organization. Could be based on an existing headless or flat file system.
- blondin 6y agovery interesting how these things come and go. one day we talk about flat-file frameworks and, for a long period of time, we forget about them. i remember when joomla, wordpress, and the other bazillion php frameworks were all coming about and we debated flat-files vs database-backed frameworks. one that stood out at the time among flat-filers was textpattern -- not sure if the very yellowish branding was the reason. databases won over flat-files though. primarily because the web needed to scale. it is also worth mentioning sqlite which at the time was, and still is, a perfect middle ground.
- omnimus 6y agoI am not so sure the scale is main reason. Most wordpress sites are static content and run db+site on same server. They are scaled using caching which sort of makes it like static website. The same approach is used with big flat file sites. Editing on dynamic portion and viewers see cashed site. Many big sites actualy use cmses as static site generators. But cashing is not that different.
- docandrew 6y agoUsing a flat-file based system appeals to me, but one question I've never had a good answer for is at what sort of scale does a certain database make sense? Aside from questions of ACID, I get the idea that a lot of people jump to databases because they're uncomfortable with file operations, frankly. But obviously they make sense for other use cases - what is the decision matrix? Just a gut feeling?
- klodolph 6y agoIf you’re strictly asking about scale and not features, the breakpoint is just a question of whether the data fits comfortably in RAM and whether the front-end fits on the same machine. Once the dataset is too big for RAM or once you need multiple front-ends, you’re reimplementing ordinary database features in whatever home-grown system you have.
- docandrew 6y agoThat's helpful, thank you.
- omnimus 6y agoFlexibility - most flatfe CMSes ive tried (i am heavy user) model the data in files as yaml documents so it becomes very similar to nosql dbs. So advantages and disadvantages. So it easy to have custom data structures for every page. But its harder to query, sort etc. I wouldnt build ecommerce site with flat-file because there is lot of tabular repeated data like orders, customers, products. But for content sites its perfect. Simpler and flexible. Its awesome for site builders with different blocks of structured content. Worth noting that with flatfile you can use sqlite for those repeated records and other way around many sql dbs support json columns that you could use similarly to flatfile/nosql.
- neya 6y agoI started out re-writing the core of Wordpress to Elixir around last year. Once of the decisions I had to make was with databases. I started out with flat files as well and realized they can quickly grow complex when you have more than a handful articles. Eg. If you want to add some new attributes to the flat files, they can't be backported to the older articles if the number of articles is quite large. Guess what? That's the problem that the SQL databases already solve. So, to circumvent this, I searched for a database that can be version controlled but doesn't require a separate database server. And I found one - SQLITE. It's been amazing so far. It can be inside my GitHub repo, while giving me access to normal SQL queries via my ORM. With a static file solution built on just flat files, complex querying is definitely not possible. With now over 30,000 posts in the SQLITE database, my static file generator is still absolutely fast. I now use my solution for a high traffic client with 3-4 million visitors a month and it works really well for them. One downside of SQLITE is multiple concurrent writes, but so far it hasn't been much of a problem yet.
- nednar 6y agoJust don't copy the wordpress plugin system.
- seanwilson 6y ago> With now over 30,000 posts in the SQLITE database, my static file generator is still absolutely fast. Don't you then miss out on human readable Git diffs when posts are changed? And now you can't edit posts with a standard editor or e.g. the GitHub web UI? Also, what language are you using? Shouldn't reading in 30,000 posts and building some stats/relationships/lookups on them be pretty fast?
- PudgePacket 6y ago> Don't you then miss out on human readable Git diffs when posts are changed? And now you can't edit posts with a standard editor or e.g. the GitHub web UI? You never got those with wordpress either. Seems like they're going for some kind of hybrid. Trading some of the simplicity of standard static file generators for some of the power of a tool like wordpress. I quite like the idea. Nothing to stop them from storing historical versions in the DB, then it wouldn't be much more logic for the site generator to spit out the site at X point in time, or a diff. Whether that's a feature you'd want is another thing. > what language are you using? "re-writing the core of Wordpress to Elixir"
- ollerac 6y agoI'd like to see someone create a CMS that uses HTML files to store data and let's you query and copy data between the files using CSS selectors. This, to me, would be the simplest CMS. You could just do: <div data-copy-content-from="#about-page .profiles"></div> And that would go into your about page, copy the content from there, and insert it into the current page. If you built it out well enough, you could do everything using just static HTML and CSS files and just syncing the content whenever it changes. I've been thinking about this idea for a while. I even started my own framework to try to make something like this work. I'd love to know what other people think.
- yohannparis 6y agoI mean, you kind of describe web-component. Or if you are old-school, PHP templating, you can do a simple: `<div><?php include('about.html'); ?></div>` This is how I did most of my static files website 10+ years ago. I had an `index.php` file that based on URL will load the content of an article. This is what PHP was created for.
- ollerac 6y agoI guess I'm looking for web-components with really powerful APIs. I could see it happening within the next couple years: building a full web app using only 4-5 new concepts on the front-end, all powered by web components. Any good resources you'd recommend on that? I've been looking around and it seems like a lot of projects are still in the early phases. Also, yes, PHP is awesome. Just not built for the modern web. Still is a really impressive language, however. I just wish there was a PHP equivalent built specifically for building dynamic, real-time web applications.
- johnchristopher 6y agoWouldn't it be like reinventing XSL in the end ?
- ollerac 6y agoYes! I'd never heard of XSL until today, thank you for pointing me to it! This looks exactly like what I'm trying to do. Could you point me to any resources on XSL that would make a good starting point? Or any XSL libraries that help you produce dynamic web applications?
- Grumbledour 6y agoThe thing with flat-file cms is, they are often represented as a category of cms, but they are actually not all the same. There is the type that just saves its data in file form, just like you would in a db. And I never get why this would be desirable. You loose all the benefits of a db system without gaining much. The other type, the interesting one, is the one where you can work directly on those flat files, not needing some kind of admin interface. Now this can be great! But it often seems more flat-file cms belong to the former category. I do not know why one would prefer these if you still need a server with a dynamic language and a web interface to edit content. Just use a db! I never heard of headless API CMS Systems before, but it honestly sound really silly. If you write a front end that consumes JSON, you could just as well write a front end that made db calls. And if you must have JSON, write a wrapper around your db. Having that stuff hosted by someone else is just peak cloud nonsense.
- nsomaru 6y agoIs there a pattern that securely allows JS clients to make arbitrary SQL queries? Or is this a feature of REST? Maybe this is why people invented GraphQL? But then that comes with its own issues... Either way, is it as simple as you’re making it out to be?
- Grumbledour 6y agoI would argue if your frontend is just a js client with no server component you are already doing it wrong. Of course, that then becomes a much bigger discussion about websites vs apps and the current state of the web which we have on here quite regularly.
- z3t4 6y agoEverything becomes more simple if the content is static/immutable as long as it's small... The advance in networking and device storage has made this feasible. Rather then requesting what you need, you get the whole database sent to you and stored locally.
- wolfhumble 6y ago> The other type, the interesting one, is the one where you can work directly on those flat files, not needing some kind of admin interface. Now this can be great! I am not sure I understand; could you please explain? That sounds like working directly on flat html files; or are you talking about working directly with a DB that then writes to flat files? Thanks!
- severak_cz 6y agoI used few "hybrid" CMSs from this point of view: - dynamic wiki backed by a folder of markdown files - dynamic CMS backed by single SQlite file - classic dynamic CMS which dumps pages as files while editing, effectively making them static on reading
- uxamanda 6y agoI’ve been looking for a folder based wiki - was this a custom tool you made?
- omnimus 6y agoDokuwiki is working well but its pretty oldschool. Meaning not fun to develop for.
- uxamanda 6y agoAh, was hoping for something where I could simply add markdown files to folders and it would do all the routing for me. I have a setup that works like this with Flask flatpages[0], but it seems like there has to be a simpler solution out there somewhere. I've been unable to find it though. :-) [0] https://flask-flatpages.readthedocs.io/en/latest/ https://flask-flatpages.readthedocs.io/en/latest/
- omnimus 6y agoWell by "wiki" it means to me that it saves history of changes and manage user access etc. That probably requires more complicated file setup than just markdown files. If you want just markdown > website with some administration to edit you can use pretty much any flat file CMS. Kirby CMS is highend but you need buy license. Grav is ok open-source option but i don't like the admin part too much but its atleast active. You can find many more https://github.com/ahadb/flat-file-cms https://github.com/ahadb/flat-file-cms but flatfile cms often becomes pet project that people stop maintain so watch out for activity.
- adim86 6y agoWhat are good headless CMS engines? There are so many flavors and no real community or indication of which ones will survive, is there an open-source equivalent to Wordpress for headless CMS?
- searchableguy 6y agoStrapi, hasura, fauna etc comes to mind.
- tomduncalf 6y agoI've been pretty happy with https://getcockpit.com/ https://getcockpit.com/ for smaller sites. It's flexible and reasonably robust. Not perfect but if you know some PHP and JS the code is fairly easy to follow if you do need to tweak stuff.
- mymmaster 6y agoDepends what you're trying to build. Customers have good things to say about https://buttercms.com/ https://buttercms.com/
- patchtopic 6y agoit's not perfect, but I had a positive experience recently creating a small web site with Publii: https://getpublii.com/ https://getpublii.com/
- tomcooks 6y agoI've made a PHP flat-file CMS to manage my own website and for a while it was the very first result when searching for "fuck wordpress"
- ChrisArchitect 6y agoadd (2019) outdated article/spammy