-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77865da
commit 6c09587
Showing
1 changed file
with
17 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 :) |