Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
erikaheidi committed Jun 2, 2023
1 parent 77865da commit 6c09587
Showing 1 changed file with 17 additions and 55 deletions.
72 changes: 17 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,42 @@
# Librarian
Librarian is a stateless CMS based on static files. It uses the same format as DEV.to for markdown files with a front matter and liquid tags for custom functionality.
Librarian is a static site builder and Markdown document indexer inspired by Hugo but written in PHP. It uses the same format as DEV.to for markdown files with a front matter and liquid tags for custom functionality.
The front matter is fluid and doesn't have a fixed spec, meaning you can include any custom fields you want and fetch them from your templates.

```markdown
---
title: This Is My About Page
published: true
created_at: 2023-04-01
description: Hey there! I'm Librarian, a small file-based CMS and static site generator created in PHP, on top of Minicli.
cover_image: https://picsum.photos/780/300?r=8
---

Hey there! I'm Librarian, a small file-based CMS and static site generator created in PHP, on top of Minicli. I don't use a database, I don't have a control panel, or users. Everything is pulled from static content in my content dir.
...
```
![Librarian default index page screenshot](https://librarianphp.dev/img/librarian_default_page.png)

Librarian doesn't use databases, sessions, or users. Administration is made from the command-line.
For multiple authors, author information must be defined as metadata within the front matter.

This is an **experimental** project built to keep content decoupled from the application itself, while keeping a very low footprint and functioning as a middle ground between static sites and dynamic CMSs.

Liquid tags supported at the moment:

| Tag | Example | Description |
|-----|---------|-------------|
| `audio` | `{% audio path_to_mp3.mp3 %}` | embeds mp3 audio |
| `video` | `{% video path_to_mp4.mp4 %}` | embeds mp4 video |
| `twitter` | `{% twitter tweet_id %}` | embeds a Tweet |
| `youtube` | `{% youtube video_ID %}` | embeds a YouTube video |
| `github` | `{% github file_url %}` | embeds File from Github (Gists aren't supported at the moment) |

Librarian **is not** a static site generator, and the idea is to provide a mix of static files and dynamic capabilities that don't require sessions or databases.

## Using the included Docker Compose setup

The latest Librarian version includes a built-in Docker + Docker Compose setup.

Once the files are in place, you can get the environment up and running with:

```shell
docker-compose up -d
```

This will run the containers in background.

To execute commands such as `composer install`, run:

```shell
docker-compose exec app composer install
```

Running NPM:

```shell
docker-compose exec app npm install
```

Compiling css assets:

```shell
docker-compose exec app npm run dev
```

Stopping the environment:

```shell
docker-compose stop
```

Re-starting the environment:

```shell
docker-compose start
```

Destroying the environment:

```shell
docker-compose down
```
Check the [doc page on how to create your own custom liquid tags](https://librarianphp.dev/customizing-librarian/custom-liquid-tags/).

## Documentation

The official documentation is available at https://librarianphp.dev. It is by no means complete, more content will be added as soon as possible.
You can [contribute to Librarian's documentation via GitHub](https://github.com/librarianphp/librarian-docs).
The official documentation is available at https://librarianphp.dev. You can [contribute to Librarian's documentation via GitHub](https://github.com/librarianphp/docs).

## Projects Using Librarian

- [OnLinux Systems](https://onlinux.systems) - A blog about Linux, with tutorials and hardware reviews.
- [sponsoropensource.dev](https://sponsoropensource.dev) - A list of underrepresented open source creators that can be sponsored via GitHub Sponsors.
- [Librarian Documentation](https://librarianphp.dev) - The official Librarian documentation, built with Librarian.
- Your project! Send a PR :)

0 comments on commit 6c09587

Please sign in to comment.