DEV Community

Cover image for Librarian - a minimalist file-based, headless CMS in PHP
Erika Heidi
Erika Heidi

Posted on • Updated on

Librarian - a minimalist file-based, headless CMS in PHP

Update: Librarian now has its own documentation website, built with Librarian :) check it out: https://librarianphp.dev

Disclaimer: as a DigitalOcean employee, I am not entitled to win any prizes in this hackaton, but I was encouraged to participate as an exercise and to provide a sample PHP application that can help others get inspired :)

What I built

A headless CMS that can be used as a personal portfolio of your DEV content.

Category Submission:

Personal Site/Portfolio

App Link

https://librarian-iz6yi.ondigitalocean.app/

Screenshots

Screenshot: Librarian as headless CMS pulling content from dev.to

Description

Librarian is a minimalist file-based, headless CMS written in PHP, on top of minicli.

Link to Source Code

https://github.com/minicli/librarian

Permissive License

MIT

Background

Last year, I wanted a simple website to show all my DEV posts in a more "branded", personal way. So I started working on this application, but I never really finished it.

As the year started, I decided to finally get this application finished and submit it to the DigitalOcean + DEV hackaton as an exercise.

The great thing about this project is that it is very small, it uses only a small $5 instance and doesn't require databases or other components. You can quickly spin up a sample app using the Deploy to DO button below, but for a more serious usage you should fork the project on GitHub so you're able to customize the templates to your own liking.

Deploy to DO button

How I built it

This project uses PHP to parse markdown files based on pre-defined directory structure conventions. It is built on top of a dependency-free CLI library I built called Minicli.

Although I have created a good starting point last year, there were a lot of things missing, so this time around I included an RSS feed, fixed dozens of bugs, improved the layout, and made sure it is deployable to App Platform.

I learned a lot about BulmaCSS while working in the updated front end, and also learned more about the App Spec format and the "Deploy to DO" button. My favorite thing is that I can now quickly spin up small project documentation sites and content-focused, segmented sites for only $5 a month using this app.

Additional Resources/Info

I will be updating the project repository with more docs soon.

The following video shows the whole process of deploying the sample app using the DO button and importing DEV posts to the new blog.

Top comments (5)

Collapse
 
spiritupbro profile image
spiritupbro

this is really great as this is really reflect your job as a technical writer so you build a blog to showcase your technical writing skill this is beautiful

Collapse
 
diana_kerr profile image
Diana kerr

A minimalist, file-based, headless PHP CMS is a fantastic addition to the dev community, especially for those looking to showcase their DEV content in a personalized way.

Collapse
 
zamfir80 profile image
Razvan Zamfir

Great stuff. May I add a link to Brave CMS?

Some comments may only be visible to logged-in visitors. Sign in to view all comments.