antiGravity CMS User's Guide
Version 1.0 | A Flat-File CMS Built with LiveCode Server
Table of Contents
- Introduction
- Quick Start
- Creating Pages
- Writing in Markdown
- Managing Images
- Menu System
- Admin Interface
- Customizing Templates
- 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:
- Flat-file architecture (no database needed)
- Markdown-based content editing
- Dynamic menu generation
- Built-in admin interface
- Media/image management
- Responsive templates
- Version control friendly
System Requirements:
- Web server with LiveCode Server support
- Apache with mod_rewrite enabled
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
- Public site:
http://yoursite.com - Admin panel:
http://yoursite.com/admin.lc - Default password:
admin123(change this in admin.lc!)
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:
01.home/→/home02.about/→/about
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:
title- Page title (required)author- Author name (optional)date- Publication date (optional)description- Meta description for SEO (optional)menu- Show in menu?trueorfalse(default:true)menu_order- Menu position (lower numbers first, default:50)
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

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
- Log into admin:
http://yoursite.com/admin.lc - Click the Media tab
- Click Upload Image
- Select your image file
- Click on uploaded image to copy markdown code
Using Images in Pages
Method 1: Markdown

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
- Edit a page in admin
- Click Insert Image button
- Fill in URL, alt text, width, alignment
- 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
- Go to
http://yoursite.com/admin.lc - Enter your password (default:
admin123) - Click Login
IMPORTANT: Change the default password in admin.lc:
put "your_secure_password" into gConfig["adminPassword"]
Pages Tab
View all pages:
- Shows all pages in your site
- Click any page to edit it
Create a new page:
- Enter folder name (e.g.,
04.contact) - Optionally enter filename (e.g.,
form.md) - Click Create New Page
Edit a page:
- Click the page in the sidebar
- Edit content in the left pane
- See live preview in the right pane
- Click Save when done
Delete a page:
- Open the page
- Click Delete
- Confirm deletion
Media Tab
Upload images:
- Switch to Media tab
- Click Upload Image
- Select your file
- Wait for "Uploaded!" message
Use an image:
- Click any image to copy markdown code to clipboard
- Switch to Pages tab and paste in your content
Delete an image:
- Click the X button on any image
- Confirm deletion
Insert Image Helper
While editing a page:
- Click Insert Image button
- Enter image URL (or click image in Media tab first)
- Enter alt text
- Set width (optional):
300or50% - Choose alignment: None, Left, Center, Right
- Click Insert
Customizing Templates
Template Location
Templates are stored in:
themes/default/template.html
Template Variables
Use these in your template:
{{content}}- Page content (required)- Dynamic navigation menu (required)- Welcome to My Site
- antiGravity CMS
- Event Booking
antiGravity User Guide- Page title{{author}}- Page author{{date}}- Page date{{description}}- Page description
Example Template
<!DOCTYPE html>
<html>
<head>
<title>antiGravity User Guide | My Site</title>
</head>
<body>
<nav>
<ul>
Welcome to My Site
antiGravity CMS
Event Booking
</ul>
</nav>
<main>
<h1>antiGravity User Guide</h1>
<p>By {{author}} on {{date}}</p>
{{content}}
</main>
</body>
</html>
Responsive Requirements
Modern templates should:
- Include
- Use responsive CSS (media queries)
- Convert navigation to hamburger menu on mobile
- Ensure images are responsive:
img { max-width: 100%; height: auto; }
Troubleshooting
Page Shows 404 Error
Check:
- Does the folder exist in
/content/? - Does the folder have a
.mdfile? - Is the URL correct? (
01.home→/home, not/01.home)
Menu Not Showing Pages
Check:
- Does the page have
menu: falsein frontmatter? - Is the folder in
/content/? - Does the
.mdfile have valid frontmatter?
Images Not Displaying
Check:
- Is the image in the
/media/folder? - Is the path correct? Must start with
/media/ - Check browser console (F12) for 404 errors
Admin Won't Login
Check:
- Are you using the correct password?
- Is there a
.admin_tokenfile? Try deleting it. - Check if cookies are enabled in your browser
Changes Not Appearing
Try:
- Hard refresh your browser:
Ctrl+F5(Windows) orCmd+Shift+R(Mac) - Clear your browser cache
- Check if you saved the page in admin
Template Not Loading
Check:
- File exists at:
/themes/default/template.html - File permissions are readable by web server
- Template contains
{{content}}and- Welcome to My Site
- antiGravity CMS
- Event Booking
Version Checking
To verify you have the latest code:
- Check version in file headers:
- Admin interface shows version at bottom of sidebar
- router.lc - Current: 1.0.2 - admin.lc - Current: 1.2.1
Tips & Best Practices
Content Organization
- Use clear, descriptive folder names
- Keep URLs short and readable
- Use consistent naming (all lowercase, hyphens for spaces)
- Group related content in folders
Writing Content
- Write clear, concise page titles
- Always include alt text for images
- Use headings to structure content
- Break up long paragraphs
- Preview before publishing
Menu Management
- Keep main menu items to 5-7 for best UX
- Use dropdowns for related sub-pages
- Set appropriate
menu_ordervalues - Hide admin/utility pages with
menu: false
Images
- Optimize images before uploading (compress, resize)
- Use descriptive filenames
- Always include alt text for accessibility
- Use appropriate image formats (JPG for photos, PNG for graphics)
Security
- Change default admin password immediately
- Use HTTPS if handling sensitive content
- Keep backup copies of your content
- Regularly update antiGravity files
Backup Strategy
Your entire site is in text files, making backups easy:
- Copy the
/content/folder (all your pages) - Copy the
/media/folder (all your images) - Copy the
/themes/folder (your templates) - 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
.lc- LiveCode Server scripts.md- Markdown content files.html- Template files
Important Files
router.lc- Main CMS engineadmin.lc- Admin interface.htaccess- URL routing rules
Key Directories
/content/- Your pages/media/- Uploaded images/themes/- Site templates
Admin URL
http://yoursite.com/admin.lc
Default Password
admin123(change immediately!)
antiGravity CMS - Simple. Fast. Flat-file.
Version 1.0 | Built with LiveCode Server