cadmus

Cadmus is an extremely lightweight, flat-file blogging platform powered by Markdown.

Stars
17
Forks
5
Open issues
0
Closed issues
0
Last release
over 5 years ago
Last commit
over 5 years ago
Watchers
17
Total releases
2
Total commits
10
Open PRs
0
Closed PRs
0
Repo URL
Platform
License
Category
Usecase
Blogging
Technology
Offers premium version?
NO
Proprietary?
NO
About

Cadmus

Cadmus is an extremely lightweight, flat-file blogging platform powered by Markdown.

Version 2 is under development and you can follow its progress on its repository. Version 1 will be supported until the stable release of version 2.

Features

  • Responsive design by default
  • Full-Text Search Support (see notes below)
  • Flat-file structure (no need for a database)
  • Custom Metadata Handling
  • Uses a stripped down version of Bootstrap and only includes:
    • Grid System
    • Typography
    • Form Controls
    • Resets

  • Markdown support via Parsedown + ParsedownExtra
  • Can be deployed anywhere where PHP is supported
  • Supports PHP 5.4 and above (including PHP 7.x)
  • Does not use a framework, extremely lightweight
  • Easy content backup (all data in one folder)
  • Disqus comment system integration
  • No fancy admin panels

    • Upload posts via any file manager
    • Update Cadmus by overwriting system files
    • No complicated user management system
    • Customize by editing the files directly: no theme setup required!

Deployment

Just download the latest release and extract it to your public folder. Then in the folder where you extracted the archive, create a content folder. This should be writable by the web server. For most cPanel-based hosts, 0755 is enough, but consult your provider if you are not sure.

Your content folder contains all your posts.

Writing

A post is a file in the content folder. Files here follow a format:

  • Files that end in .1.txt are published and visible in searches and on the index page. Example: filename.1.txt.
  • Files that do not end in .1.txt will not be shown on any page. Useful for drafts.

A post consists of two parts: the metadata and your content. A sample post is as follows:

---
Title: A Sample Post

Author: Liam Demafelix

Lorem ipsum dolor amet and what not.

Your metadata defines the various characteristics of your post. Currently, the system requires two metadata values:

  • Title
  • Author

You can add any other metadata you want, just make sure it follows the format Identifier: Value. You can retrieve the value of a metadata using get_meta($file, $identifier). For instance, to pull the title, it's echo get_meta("./content/test.1.txt", "Title");.

An optional metadata tag, Excerpt is used when displaying contents in post listings when present. Otherwise, Cadmus takes the first 150 characters of your post and adds an ellipsis to it.

The optional Date metadata is a non-formatted string (direct output). If it is not defined, the system takes the latest modification time of the file via filemtime().

Full-Text Search

Currently, the search mechanism scans each file for the presence of a queried term. Of course, this doesn't scale well, but for a few posts it should work out fine. For reference, see partials/home.php and the in_file() function in functions.php.

License

Cadmus (and its components which are in no relation to and do not endorse the project) is licensed under the MIT Open Source License. Please see LICENSE.md for more information.

Alternative Projects

Subscribe to Open Source Businees Newsletter

Twice a month we will interview people behind open source businesses. We will talk about how they are building a business on top of open source projects.

We'll never share your email with anyone else.