information architects logo

information architects

antiGravity CMS User's Guide

Version 1.0 | A Flat-File CMS Built with LiveCode Server


Table of Contents

  1. Introduction
  2. Quick Start
  3. Creating Pages
  4. Writing in Markdown
  5. Managing Images
  6. Menu System
  7. Admin Interface
  8. Customizing Templates
  9. Troubleshooting

Introduction

antiGravity is a lightweight, flat-file CMS that stores content in Markdown files instead of a database. It's fast, simple, and easy to maintain.

Key Features:

System Requirements:


Quick Start

File Structure

/your-site/
├── router.lc              # Main CMS engine
├── admin.lc               # Admin interface
├── .htaccess              # URL routing
├── content/               # Your pages
│   ├── 01.home/
│   │   └── page.md
│   ├── 02.about/
│   │   └── page.md
│   └── 03.blog/
│       ├── page.md
│       ├── post1.md
│       └── post2.md
├── themes/                # Templates
│   └── default/
│       └── template.html
└── media/                 # Uploaded images

Accessing Your Site


Creating Pages

Folder Naming

Folders use numeric prefixes to control order:

01.home/     ← Appears first in menu
02.about/    ← Appears second
03.blog/     ← Appears third

The number determines menu order. The text after the dot becomes the URL:

Page Files

Each folder needs at least one .md file:

Single page:

01.home/
└── page.md    ← Accessible at /home

Multiple pages:

02.blog/
├── page.md      ← Main page at /blog
├── post1.md     ← Accessible at /blog/post1
└── post2.md     ← Accessible at /blog/post2

Page Structure

Every page has two parts: frontmatter (metadata) and content:

---
title: My Page Title
author: John Doe
date: 2025-12-29
description: A brief description
menu: true
menu_order: 10
---

# Welcome

This is the page content in Markdown.

Frontmatter Fields:


Writing in Markdown

Headers

# Header 1
## Header 2
### Header 3
#### Header 4

Text Formatting

**bold text**
*italic text*
~~strikethrough~~
`inline code`

Links

[Link text](https://example.com)
[Internal link](/about)

Images

![Alt text](/media/image.jpg)

Or use HTML for sizing/alignment:

<img src="/media/photo.jpg" alt="Description" width="300" style="float:right; margin:10px 0 10px 10px;">

Lists

Unordered:

- Item one
- Item two
- Item three

Ordered:

1. First item
2. Second item
3. Third item

Blockquotes

> This is a quote
> that spans multiple lines

Code Blocks

function example() { return "code here"; }

Horizontal Rules

---

Managing Images

Uploading Images

  1. Log into admin: http://yoursite.com/admin.lc
  2. Click the Media tab
  3. Click Upload Image
  4. Select your image file
  5. Click on uploaded image to copy markdown code

Using Images in Pages

Method 1: Markdown

![My Photo](/media/photo.jpg)

Method 2: HTML (with styling)

<img src="/media/photo.jpg" alt="Description" width="500" style="display:block; margin:0 auto;">

Method 3: Use the Admin Helper

  1. Edit a page in admin
  2. Click Insert Image button
  3. Fill in URL, alt text, width, alignment
  4. Click Insert

Image Alignment

Left align:

<img src="/media/photo.jpg" alt="Photo" width="300" style="float:left; margin:10px 10px 10px 0;">

Right align:

<img src="/media/photo.jpg" alt="Photo" width="300" style="float:right; margin:10px 0 10px 10px;">

Center:

<img src="/media/photo.jpg" alt="Photo" width="500" style="display:block; margin:0 auto;">

Menu System

Automatic Menu Generation

antiGravity automatically builds menus from your content folder structure.

Controlling Menu Display

Hide a page from menu:

---
title: Hidden Page
menu: false
---

Set menu order:

---
title: Contact
menu_order: 100
---

Lower numbers appear first (default is 50).

Dropdown Menus

Pages in the same folder automatically create dropdowns:

02.about/
├── page.md      ← "About" in main menu
├── team.md      ← Appears in "About" dropdown
└── history.md   ← Appears in "About" dropdown

Mobile Menu

The menu automatically converts to a hamburger menu on mobile devices (screens under 768px wide). Dropdowns use +/- buttons to expand.


Admin Interface

Logging In

  1. Go to http://yoursite.com/admin.lc
  2. Enter your password (default: admin123)
  3. Click Login

IMPORTANT: Change the default password in admin.lc:

put "your_secure_password" into gConfig["adminPassword"]

Pages Tab

View all pages:

Create a new page:

  1. Enter folder name (e.g., 04.contact)
  2. Optionally enter filename (e.g., form.md)
  3. Click Create New Page

Edit a page:

  1. Click the page in the sidebar
  2. Edit content in the left pane
  3. See live preview in the right pane
  4. Click Save when done

Delete a page:

  1. Open the page
  2. Click Delete
  3. Confirm deletion

Media Tab

Upload images:

  1. Switch to Media tab
  2. Click Upload Image
  3. Select your file
  4. Wait for "Uploaded!" message

Use an image:

Delete an image:

Insert Image Helper

While editing a page:

  1. Click Insert Image button
  2. Enter image URL (or click image in Media tab first)
  3. Enter alt text
  4. Set width (optional): 300 or 50%
  5. Choose alignment: None, Left, Center, Right
  6. Click Insert

Customizing Templates

Template Location

Templates are stored in:

themes/default/template.html

Template Variables

Use these in your template:

Example Template

<!DOCTYPE html>
<html>
<head>
    <title>antiGravity User Guide | My Site</title>
</head>
<body>
    <nav>
        <ul>


</ul>
    </nav>
    
    <main>
        <h1>antiGravity User Guide</h1>
        <p>By {{author}} on {{date}}</p>
        {{content}}
    </main>
</body>
</html>

Responsive Requirements

Modern templates should:


Troubleshooting

Page Shows 404 Error

Check:

  1. Does the folder exist in /content/?
  2. Does the folder have a .md file?
  3. Is the URL correct? (01.home/home, not /01.home)

Menu Not Showing Pages

Check:

  1. Does the page have menu: false in frontmatter?
  2. Is the folder in /content/?
  3. Does the .md file have valid frontmatter?

Images Not Displaying

Check:

  1. Is the image in the /media/ folder?
  2. Is the path correct? Must start with /media/
  3. Check browser console (F12) for 404 errors

Admin Won't Login

Check:

  1. Are you using the correct password?
  2. Is there a .admin_token file? Try deleting it.
  3. Check if cookies are enabled in your browser

Changes Not Appearing

Try:

  1. Hard refresh your browser: Ctrl+F5 (Windows) or Cmd+Shift+R (Mac)
  2. Clear your browser cache
  3. Check if you saved the page in admin

Template Not Loading

Check:

  1. File exists at: /themes/default/template.html
  2. File permissions are readable by web server
  3. Template contains {{content}} and

Version Checking

To verify you have the latest code:


Tips & Best Practices

Content Organization

Writing Content

Menu Management

Images

Security

Backup Strategy

Your entire site is in text files, making backups easy:

  1. Copy the /content/ folder (all your pages)
  2. Copy the /media/ folder (all your images)
  3. Copy the /themes/ folder (your templates)
  4. Consider using Git for version control

Getting Help

Common Questions

Q: Can I use HTML in my pages? A: Yes! Markdown passes HTML through, so you can mix both.

Q: How do I create a blog? A: Create a folder (e.g., 03.blog/) and add multiple .md files. Each file becomes a post.

Q: Can I have multiple templates? A: Yes, create additional folders in /themes/ and change the theme setting in router.lc.

Q: Is antiGravity suitable for large sites? A: antiGravity works best for small to medium sites (up to a few hundred pages).

Q: Can I add custom functionality? A: Yes! antiGravity is built with LiveCode Server - you can extend it as needed.


Quick Reference

File Types

Important Files

Key Directories

Admin URL

Default Password


antiGravity CMS - Simple. Fast. Flat-file.

Version 1.0 | Built with LiveCode Server