Fixed usage of subpages, added random content

This commit is contained in:
Belle Aerni 2023-01-06 12:27:36 -08:00
parent a7414c3d99
commit 7474aaaab6
4 changed files with 65 additions and 1 deletions

15
readme.md Normal file
View file

@ -0,0 +1,15 @@
# AntCMS
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 extremely fast, thanks to its simple backend and caching. It can render and deliver pages to end users in milliseconds.
### How does it work?
AntCMS is very straightforward to use. First, you need a template in HTML with special elements for AntCMS. Then, you write your content using [markdown](https://www.markdownguide.org/getting-started/), a popular way to format plain text documents. AntCMS converts the markdown to HTML, integrates it into the template, and sends it to the viewer. Even without caching, this process is quick, but AntCMS also has caching capabilities to further improve rendering times.

View file

@ -36,7 +36,8 @@ class AntCMS
public function renderException($exceptionCode)
{
$content = "# Error";
$content .= "That request caused an $exceptionCode";
$content .= '<br>';
$content .= "That request caused an exception code ($exceptionCode)";
echo AntMarkdown::renderMarkdown($content);
}
@ -44,6 +45,8 @@ class AntCMS
{
$page = strtolower($page);
$pagePath = AntDir . "/Content/$page.md";
$pagePath = str_replace('//', '/', $pagePath);
die($pagePath);
$AntKeywords = new AntKeywords();
if (file_exists($pagePath)) {
try {

View file

@ -0,0 +1,25 @@
--AntCMS--
Title: A Random Story
Author: ChatGPT
Description: A random story, written by ChatGPT
--AntCMS--
# The Lost City
It was a dark and stormy night when adventurer Sarah set out to find the lost city of gold. She had spent years studying ancient maps and artifacts, and she was convinced that the city was real.
Sarah packed her backpack with all the supplies she would need for the journey: a compass, a map, a flashlight, and some granola bars. She put on her waterproof coat and set off into the storm.
As she trudged through the muddy jungle, Sarah couldn't help but wonder what she would find in the lost city. Would it be filled with treasure beyond her wildest dreams? Or would it be a trap, filled with danger at every turn?
Despite the doubts that crept into her mind, Sarah was determined to find the lost city. She followed her compass through the dense jungle, and after several days of hiking, she finally saw something that made her heart skip a beat.
There, in the distance, was a glint of gold.
Sarah's heart raced as she approached the golden city. She couldn't believe her eyes. It was even more beautiful and opulent than she had imagined.
As she explored the city, Sarah found all sorts of treasure - gold coins, diamonds, and ancient artifacts. She couldn't believe her luck.
But as the sun began to set, Sarah knew it was time to return home. She had found the lost city of gold, and now it was time to share her discovery with the world.
As Sarah made her way back to civilization, she couldn't help but feel grateful for the adventure of a lifetime. She would never forget the lost city of gold, and the memories of her journey would stay with her forever.

View file

@ -0,0 +1,21 @@
--AntCMS--
Title: AntCMS Readme
Author: Belle Nottelling
Description: The ReadMe file for AntCMS, rendered quickly and simply using AntCMS.
--AntCMS--
# AntCMS
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 extremely fast, thanks to its simple backend and caching. It can render and deliver pages to end users in milliseconds.
### How does it work?
AntCMS is very straightforward to use. First, you need a template in HTML with special elements for AntCMS. Then, you write your content using [markdown](https://www.markdownguide.org/getting-started/), a popular way to format plain text documents. AntCMS converts the markdown to HTML, integrates it into the template, and sends it to the viewer. Even without caching, this process is quick, but AntCMS also has caching capabilities to further improve rendering times.