A super lightweight and simple CMS, built for the modern web and simplicity
Find a file
dependabot[bot] 29ef7ec779
Bump tailwindcss from 3.2.4 to 3.2.6 (#22)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 3.2.4 to 3.2.6.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v3.2.4...v3.2.6)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 17:45:46 -08:00
.github Run unit tests on PHP 8.0, 8.1, and 8.2 2023-01-14 15:50:05 -08:00
configs Created a lighttpd config 2023-02-06 18:34:34 -08:00
src First try to render exceptions using twig 2023-01-28 20:54:53 -08:00
tests Removed the keyword generator 2023-01-19 18:01:03 -08:00
.gitignore Update admin plugin to render with twig 2023-01-10 00:26:05 -08:00
composer.json Removed the keyword generator 2023-01-19 18:01:03 -08:00
composer.lock Bump twig/twig from 3.5.0 to 3.5.1 (#23) 2023-02-08 17:45:04 -08:00
LICENCE.md Create LICENCE.md 2023-01-08 17:41:17 -08:00
package-lock.json Bump tailwindcss from 3.2.4 to 3.2.6 (#22) 2023-02-08 17:45:46 -08:00
package.json Bump tailwindcss from 3.2.4 to 3.2.6 (#22) 2023-02-08 17:45:46 -08:00
phpstan.neon Removed the keyword generator 2023-01-19 18:01:03 -08:00
readme.md Removed the keyword generator 2023-01-19 18:01:03 -08:00
rector.php Code styling /w Rector 2023-01-25 22:08:19 -08:00
tailwind.config.js Improved tailwind theme's layout for desktop 2023-01-10 04:53:49 -08:00

AntCMS

PHPStan Unit Tests

A tiny and fast CMS system for static websites.

What is AntCMS?

AntCMS is a lightweight CMS system designed for simplicity, speed, and small size. It is a flat-file CMS, meaning it lacks advanced features but benefits from improved speed and reduced complexity.

How fast is AntCMS?

AntCMS is designed for speed, with a simple backend and caching capabilities that allow it to quickly render and deliver pages to users in milliseconds. This speed is further enhanced by the use of Tailwind CSS in the default theme, which is only 25KB.

Our unit tests also ensure that rendering markdown content takes less than 0.015 seconds, as demonstrated by the following recent results: Markdown rendering speed with cache: 0.000289 VS without: 0.003414.

How does it work?

Using AntCMS is simple. First, you need an HTML template with special elements for AntCMS. Then, you can write your content using the popular markdown formatting syntax. AntCMS will convert the markdown to HTML, integrate it into the template, and send it to the viewer. This process is already quick, but AntCMS also has caching capabilities that can further improve rendering times.

Theming with AntCMS

AntCMS stores its themes in the /Themes directory. Each theme consists of a simple page layout template. A theme may also have an /Assets folder within its directory, which can be accessed directly from the server. Any files stored outside of this folder will be inaccessible.

Here is an example of the default theme folder structure:

  • /Themes
    • /Default
      • /Templates
        • default_layout.html.twig
        • nav_layout.html.twig
      • /Assets
        • tailwind.css

To change the active theme, simply edit config.yaml and set the activeTheme option to match the folder name of your custom theme.

Configuring AntCMS

AntCMS stores its configuration in the human-readable "yaml" file format. The main configuration files are config.yaml and pages.yaml. These files will be automatically generated by AntCMS if they do not exist.

Options in Config/config.yaml

  • siteInfo:
    • siteTitle: AntCMS - This configuration sets the title of your AntCMS website.
  • forceHTTPS: true - Set to 'true' by default, enables HTTPs redirection.
  • activeTheme: Default - Sets what theme AntCMS should use. should match the folder name of the theme you want to use.
  • enableCache: true - Enables or disables file caching in AntCMS.
  • admin:
    • username: 'Admin' - The username used to access any parts of AntCMS that may require authentication.
    • password: 'dontmakeitpassword123' - The password associated with the admin account. Can be entered as plain text and then will automatically be hashed with the first login. This does need to be manually entered initially.
  • debug: true- Enabled or disables debug mode.
  • baseURL: antcms.example.com/ - Used to set the baseURL for your AntCMS instance, without the protocol. This will be automatically generated for you, but can be changed if needed.

Options in Config/pages.yaml

The pages.yaml file holds a list of your pages. This file is automatically generated if it doesn't exist. At the moment, AntCMS doesn't automatically regenerate this for you, so for new content to appear you will need to delete the pages.yaml file. The order of which files are stored inside of the pages.yaml file dictates what order they will be displayed in the browser window. Here's what the pages.yaml file looks like:

  • pageTitle: 'Hello World' - This defines what the title of the page is in the navbar.
  • fullPagePath: /antcms.example.com/public_html/Content/index.md - This defines the full path to your page, as PHP would use to access it.
  • functionalPagePath: /index.md - This is the actual path you would use to access the page from online. Ex: antcms.example.com/index.php
  • showInNav: true - If you'd like to hide a page from the navbar, set this to false and it will be hidden.

The Admin Plugin

AntCMS has a very simple admin plugin. Once you set your password in your Config/config.yaml, you can access it by visiting antcms.example.com/plugin/admin. It will then require you to authenticate using your AntCMS credentials and from there will give you a few simple actions such as editing your config, a page, or regenerating the page list. The admin plugin also features a live preview of the content you are creating, but it's important to note that the preview doesn't support all of the markdown syntax that AntCMS does, such as emojis.

Note: when editing the config, if you 'save' it and it didn't update, this means you made an error in the config file and AntCMS prevented the file from being saved.