Before installing cockpit I wonder what exactly I could use it for. I read https://getcockpit.com/ but learned nothing besides its open-source availability and free license. Simple installation, usage of PHP and SQLite and ability to build anything I imagine were little informative either. From user comments there I noticed cockpit may be used for hugo static sites, nuxt.js, but how exactly? On top of static generators, aside to them? From threads in this forum I realized some use it togheter with hugo, but what exactly is the additional profit from this? I searched any examples beyond this site but the product name is exactly like an element of RedHat suite and another business software so have not found much. The getting started docs say it may be used to manage content, which is very basic in case of static sites generators. So I wonder - can cockpit edit markdown files for example? Couldn’t find anything on it among cockpit features so I appreciate any usage examples here…
@kurka Are you familiar with the basic concept of a headless cms? If not, you might get some idea after reading these articles:
There is an addon for hugo, but if I remember correctly, the development stopped and I’m not sure, if it works out of the box.
A user interface with shiny buttons instead of a pure text editor
Out of the box, cockpit can’t edit markdown files, but it has a content field to write in markdown, a js library (marked.js) for html preview and a php library (ParsedownExtra) for server side markdown conversion. The markdown data is stored in a database.
There also is Copilot, which extends Cockpit to use flat files (markdown) parallel to the database content. But it needs a paid license and I personally don’t like it’s custom front matter (nearly similar to yaml, like with jekyll, but not exactly), so the generated markdown files aren’t interchangable.
Cockpit provides you the ability to have a structured method of providing content that can be delivered via an API.
I use Cockpit for a documentation site built with 11ty. Within 11ty, I use axios to query my Cockpit instance to get a specific data object that I then use in 11ty templates.