# What is cockpit for?

**URL:** <https://discourse.getcockpit.com/t/what-is-cockpit-for/1589>\
**Category:** General\
**Created:** [August 18, 2020, 4:05pm UTC](https://discourse.getcockpit.com/t/what-is-cockpit-for/1589 "2020-08-18T16:05:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kurka](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@kurka](https://discourse.getcockpit.com/u/kurka)\
**Post date:** [August 18, 2020, 4:05pm UTC](https://discourse.getcockpit.com/t/what-is-cockpit-for/1589/1 "2020-08-18T16:05:26Z")

</div>

Before installing cockpit I wonder what exactly I could use it for. I read [https://getcockpit.com/](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…

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [August 20, 2020, 10:49am UTC](https://discourse.getcockpit.com/t/what-is-cockpit-for/1589/2 "2020-08-20T10:49:55Z")

</div>

@kurka Are you familiar with the basic concept of a headless cms? If not, you might get some idea after reading these articles:

> **[Headless content management system](https://en.wikipedia.org/wiki/Headless_content_management_system)**
>
> A headless content management system, or headless CMS, is a back end-only web content management system that acts primarily as a content repository. A headless CMS makes content accessible via an API for display on any device, without a built-in front end or presentation layer.  
> Whereas a traditional CMS typically combines a website's content and presentation layers, a headless CMS comprises the content component and focuses on the administrative interface for content creators, the facilitation...

> **[REST](https://en.wikipedia.org/wiki/Representational_state_transfer)**
>
> REST (Representational state transfer) is a software architectural style that was created to guide the design and development of the architecture for the World Wide Web. REST defines a set of constraints for how the architecture of a distributed, Internet-scale hypermedia system, such as the Web, should behave. The REST architectural style emphasises uniform interfaces, independent deployment of components, the scalability of interactions between them, and creating a layered architecture to promo...

> [@kurka](#):
>
> cockpit may be used for hugo static sites

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.

> [@kurka](#):
>
> On top of static generators, aside to them?

aside

> [@kurka](#):
>
> some use it togheter with hugo, but what exactly is the additional profit from this?

A user interface with shiny buttons instead of a pure text editor 😉

> [@kurka](#):
>
> can cockpit edit markdown files for example?

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](https://github.com/agentejo/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.

---

<div class="post-metadata">

**Author:** ![oboogy](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/oboogy/32/680_2.png) [@oboogy](https://discourse.getcockpit.com/u/oboogy)\
**Post date:** [September 22, 2020, 2:38am UTC](https://discourse.getcockpit.com/t/what-is-cockpit-for/1589/3 "2020-09-22T02:38:34Z")

</div>

Its a place to store all data content in json. Then you use the language of your choice react, php, javascript to pull the data onto your website, app, .etc. Instead of hardcoding your content in your website or app. So essentially you completely separate content from your web architecture. Whoever works content can just go into cockpits admin area to update it while as a software engineer you pull the data and place it wherever it goes without worrying about what’s in the content itself.

---

<div class="post-metadata">

**Author:** ![jasonday](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jasonday](https://discourse.getcockpit.com/u/jasonday)\
**Post date:** [September 22, 2020, 7:17pm UTC](https://discourse.getcockpit.com/t/what-is-cockpit-for/1589/4 "2020-09-22T19:17:49Z")

</div>

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.
