|
| 1 | +# Aether CMS |
| 2 | + |
| 3 | +A lightweight, file-based CMS built with vanilla JavaScript and [LiteNode](https://github.com/LebCit/litenode) that generates blazing-fast static sites. |
| 4 | + |
| 5 | +## ✨ Features |
| 6 | + |
| 7 | +### Content Management |
| 8 | + |
| 9 | +- **File-based storage** - Content stored as Markdown files with YAML frontmatter |
| 10 | +- **Posts & Pages** - Full support for blog posts and static pages |
| 11 | +- **Categories & Tags** - Organize content with taxonomies |
| 12 | +- **Custom Pages** - Create nested page hierarchies with custom templates |
| 13 | +- **Rich Editor** - Built-in Markdown editor with live preview |
| 14 | +- **Media Library** - Upload and manage images and documents |
| 15 | + |
| 16 | +### Theming & Customization |
| 17 | + |
| 18 | +- **Theme System** - Theme system architecture with template hierarchy |
| 19 | +- **Theme Marketplace** - Install themes directly from GitHub repository |
| 20 | +- **Hook System** - Extensible plugin architecture for developers |
| 21 | +- **Custom Templates** - Support for page-specific templates |
| 22 | +- **Menu Management** - Global navigation menu system |
| 23 | + |
| 24 | +### Performance & SEO |
| 25 | + |
| 26 | +- **Static Site Generation** - Generate ultra-fast static sites |
| 27 | +- **SEO Optimized** - Automatic sitemap, RSS feeds, and meta tags |
| 28 | +- **Clean URLs** - Beautiful, SEO-friendly URL structure |
| 29 | +- **Image Optimization** - Automatic image metadata and alt text management |
| 30 | + |
| 31 | +### User Management |
| 32 | + |
| 33 | +- **Role-based Access** - Admin and editor user roles |
| 34 | +- **Secure Authentication** - Argon2 password hashing with rate limiting |
| 35 | +- **Session Management** - Secure session handling |
| 36 | + |
| 37 | +## 🚀 Quick Start |
| 38 | + |
| 39 | +### Prerequisites |
| 40 | + |
| 41 | +- Node.js 18+ |
| 42 | +- npm or yarn |
| 43 | + |
| 44 | +### Installation |
| 45 | + |
| 46 | +1. **Create a new project** |
| 47 | + |
| 48 | + ```bash |
| 49 | + npx create-aether-cms my-cms-site |
| 50 | + cd my-cms-site |
| 51 | + ``` |
| 52 | + |
| 53 | +2. **Install dependencies** |
| 54 | + |
| 55 | + ```bash |
| 56 | + npm install |
| 57 | + ``` |
| 58 | + |
| 59 | +3. **Start the development server** |
| 60 | + |
| 61 | + ```bash |
| 62 | + npm start |
| 63 | + ``` |
| 64 | + |
| 65 | +4. **Access the admin dashboard** |
| 66 | + Open `http://localhost:8080/aether` in your browser |
| 67 | + - Default credentials: `admin` / `admin` |
| 68 | + |
| 69 | +## 📁 Project Structure |
| 70 | + |
| 71 | +``` |
| 72 | +aether/ |
| 73 | +├── content/ # Content storage |
| 74 | +│ ├── data/ # Posts, pages, and settings |
| 75 | +│ │ ├── posts/ # Blog posts (.md files) |
| 76 | +│ │ ├── pages/ # Static pages (.md files) |
| 77 | +│ │ └── custom/ # Custom pages (.md files) |
| 78 | +│ ├── themes/ # Theme files |
| 79 | +│ │ └── default/ # Default theme |
| 80 | +│ └── uploads/ # Media files |
| 81 | +├── core/ # Core CMS functionality |
| 82 | +│ ├── api/ # REST API endpoints |
| 83 | +│ ├── lib/ # Core libraries |
| 84 | +│ ├── routes/ # Frontend routes |
| 85 | +│ └── admin/ # Admin interface |
| 86 | +└── assets/ # Static assets |
| 87 | +``` |
| 88 | +
|
| 89 | +## 🎨 Themes |
| 90 | +
|
| 91 | +Aether uses a flexible theme system with template hierarchy: |
| 92 | +
|
| 93 | +### Template Hierarchy |
| 94 | +
|
| 95 | +1. **Custom templates** - `themes/theme-name/custom/page-name.html` |
| 96 | +2. **Content-specific** - `themes/theme-name/templates/post.html` |
| 97 | +3. **Generic content** - `themes/theme-name/templates/content.html` |
| 98 | +4. **Layout fallback** - `themes/theme-name/templates/layout.html` |
| 99 | +
|
| 100 | +### Theme Structure |
| 101 | +
|
| 102 | +``` |
| 103 | +theme-name/ |
| 104 | +├── theme.json # Theme metadata |
| 105 | +├── assets/ # CSS, JS, images |
| 106 | +│ ├── css/ |
| 107 | +│ └── js/ |
| 108 | +├── templates/ # Core templates |
| 109 | +│ ├── layout.html # Base layout |
| 110 | +│ ├── post.html # Single post |
| 111 | +│ ├── page.html # Single page |
| 112 | +│ └── taxonomy.html # Categories/tags |
| 113 | +├── partials/ # Reusable components |
| 114 | +└── custom/ # Custom page templates |
| 115 | +``` |
| 116 | +
|
| 117 | +## 📝 Content Management |
| 118 | +
|
| 119 | +### Creating Content |
| 120 | +
|
| 121 | +**Posts** are stored in `content/data/posts/` as Markdown files: |
| 122 | +
|
| 123 | +```markdown |
| 124 | +--- |
| 125 | +id: "1234567890" |
| 126 | +title: "My Blog Post" |
| 127 | +slug: "my-blog-post" |
| 128 | +status: "published" |
| 129 | +author: "admin" |
| 130 | +category: "Technology" |
| 131 | +tags: ["javascript", "cms"] |
| 132 | +createdAt: "2024-01-15T10:00:00.000Z" |
| 133 | +--- |
| 134 | +
|
| 135 | +# My Blog Post |
| 136 | +
|
| 137 | +This is the content of my blog post written in Markdown. |
| 138 | +``` |
| 139 | + |
| 140 | +**Custom Pages** support nested hierarchies: |
| 141 | + |
| 142 | +```markdown |
| 143 | +--- |
| 144 | +id: "1234567891" |
| 145 | +title: "API Documentation" |
| 146 | +slug: "api-docs" |
| 147 | +pageType: "custom" |
| 148 | +parentPage: "documentation" |
| 149 | +status: "published" |
| 150 | +--- |
| 151 | + |
| 152 | +# API Documentation |
| 153 | + |
| 154 | +Documentation content here... |
| 155 | +``` |
| 156 | + |
| 157 | +## 🔧 Static Site Generation |
| 158 | + |
| 159 | +Generate a static version of your site: |
| 160 | + |
| 161 | +```bash |
| 162 | +# Generate with default settings |
| 163 | +npm run build |
| 164 | + |
| 165 | +# Custom output directory |
| 166 | +npm run build -- --output dist |
| 167 | + |
| 168 | +# Custom base URL |
| 169 | +npm run build -- --base-url https://yourdomain.com |
| 170 | + |
| 171 | +# Disable clean URLs |
| 172 | +npm run build -- --no-clean-urls |
| 173 | +``` |
| 174 | + |
| 175 | +### Configuration Options |
| 176 | + |
| 177 | +- `--output, -o` - Output directory (default: `_site`) |
| 178 | +- `--base-url, -b` - Base URL for the site |
| 179 | +- `--no-clean-urls` - Use `.html` extensions instead of clean URLs |
| 180 | + |
| 181 | +## 🔌 Hooks & Extensibility |
| 182 | + |
| 183 | +Aether includes a hook system for extensibility: |
| 184 | + |
| 185 | +```javascript |
| 186 | +// Add a filter to modify posts |
| 187 | +hookSystem.addFilter("api_posts", (posts, req) => { |
| 188 | + // Modify posts data |
| 189 | + return posts.filter((post) => post.featured) |
| 190 | +}) |
| 191 | + |
| 192 | +// Add an action after post creation |
| 193 | +hookSystem.addAction("post_created", (post) => { |
| 194 | + console.log(`New post created: ${post.title}`) |
| 195 | +}) |
| 196 | +``` |
| 197 | + |
| 198 | +## 🛠️ Development |
| 199 | + |
| 200 | +### Environment Variables |
| 201 | + |
| 202 | +Create a `.env` file: |
| 203 | + |
| 204 | +```env |
| 205 | +PORT=8080 |
| 206 | +NODE_ENV=development |
| 207 | +``` |
| 208 | + |
| 209 | +### API Endpoints |
| 210 | + |
| 211 | +#### Content API |
| 212 | + |
| 213 | +- `GET /api/posts` - List posts |
| 214 | +- `POST /api/posts` - Create post |
| 215 | +- `PUT /api/posts/:id` - Update post |
| 216 | +- `DELETE /api/posts/:id` - Delete post |
| 217 | + |
| 218 | +#### Media API |
| 219 | + |
| 220 | +- `GET /api/media` - List media files |
| 221 | +- `POST /api/media/upload` - Upload file |
| 222 | +- `DELETE /api/media/:id` - Delete file |
| 223 | + |
| 224 | +#### Theme API |
| 225 | + |
| 226 | +- `GET /api/themes` - List themes |
| 227 | +- `POST /api/themes/switch/:name` - Switch theme |
| 228 | +- `POST /api/themes/upload` - Upload theme |
| 229 | + |
| 230 | +### File Structure Conventions |
| 231 | + |
| 232 | +- **Posts**: Use descriptive slugs (`my-awesome-post.md`) |
| 233 | +- **Pages**: Organize by hierarchy (`about.md`, `contact.md`) |
| 234 | +- **Custom Pages**: Use parent-child relationships for nesting |
| 235 | + |
| 236 | +## 🚦 Deployment |
| 237 | + |
| 238 | +### Static Deployment |
| 239 | + |
| 240 | +1. Generate static site: `npm run build` |
| 241 | +2. Deploy the `_site` folder to any static host — here are a few common choices: |
| 242 | + - [Azure Static Web Apps](https://azure.microsoft.com/en-us/services/app-service/static/) |
| 243 | + - [Cloudflare Pages](https://pages.cloudflare.com/) |
| 244 | + - [GitHub Pages](https://pages.github.com/) |
| 245 | + - [GitLab Pages](https://about.gitlab.com/product/pages/) |
| 246 | + - [Netlify](https://www.netlify.com/) |
| 247 | + - [Render](https://render.com/) |
| 248 | + - [Surge](https://surge.sh/) |
| 249 | + - [Vercel](https://vercel.com/) |
| 250 | + |
| 251 | +### Node.js Deployment |
| 252 | + |
| 253 | +1. Set `NODE_ENV=production` |
| 254 | +2. Configure reverse proxy (nginx/Apache) |
| 255 | +3. Use process manager (PM2, forever) |
| 256 | + |
| 257 | +### Environment Configuration |
| 258 | + |
| 259 | +```env |
| 260 | +NODE_ENV=production |
| 261 | +PORT=3000 |
| 262 | +``` |
| 263 | + |
| 264 | +## 📄 License |
| 265 | + |
| 266 | +This project is licensed under the **[GNU General Public License v3.0 or later (GPL-3.0-or-later)](https://www.gnu.org/licenses/gpl-3.0.html)** - see the [LICENSE](LICENSE) file for details. |
| 267 | +It also uses third-party packages, primarily licensed under the **[MIT License](https://opensource.org/licenses/MIT)** and retrieved via npm. |
| 268 | +Each dependency retains its own license, which can be found in the respective package folders under `node_modules/` after installation. |
| 269 | + |
| 270 | +## 🤝 Contributing |
| 271 | + |
| 272 | +Hi there! 👋 |
| 273 | +Aether CMS is an open-source project maintained by one person (that's me!), and I want it to be a respectful, inclusive space for everyone. |
| 274 | + |
| 275 | +Please be kind and constructive in all interactions — whether you're opening issues, submitting pull requests, or joining discussions. Disrespectful, abusive, or unhelpful behavior won't be tolerated. |
| 276 | + |
| 277 | +If someone behaves inappropriately, I may block them from the project and report them to GitHub if necessary. Let's keep things friendly and welcoming for everyone! |
| 278 | + |
| 279 | +### How to Contribute |
| 280 | + |
| 281 | +1. Fork the repository |
| 282 | +2. Create your feature branch (`git checkout -b feature/amazing-feature`) |
| 283 | +3. Commit your changes (`git commit -m 'Add amazing feature'`) |
| 284 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 285 | +5. Open a Pull Request |
| 286 | + |
| 287 | +### Reporting Issues |
| 288 | + |
| 289 | +If you see something off or just need to reach out, feel free to contact me via the [Q&A category](https://github.com/LebCit/aether-cms/discussions/categories/q-a) or by opening a new discussion in the **[Reports category](https://github.com/LebCit/aether-cms/discussions/categories/reports).** |
| 290 | + |
| 291 | +This helps keep our Issues focused on bugs and features. |
| 292 | + |
| 293 | +Thanks for being a good human 💙 |
| 294 | +— LebCit |
| 295 | + |
| 296 | +## 📞 Support |
| 297 | + |
| 298 | +- **Documentation**: [Visit Aether Docs](https://aether-cms.pages.dev/) |
| 299 | +- **Issues**: [Report bugs](https://github.com/lebcit/aether-cms/issues) |
| 300 | +- **Discussions**: [Community forum](https://github.com/lebcit/aether-cms/discussions) |
| 301 | + |
| 302 | +## 🎯 Roadmap |
| 303 | + |
| 304 | +- Scheduled Publishing |
| 305 | +- Search functionality |
| 306 | +- Advanced user permissions |
| 307 | +- Page caching with duration |
| 308 | +- Plugin system expansion |
| 309 | +- Comment system with moderation |
| 310 | +- Advanced SEO tools |
| 311 | +- Editor enhancements |
| 312 | +- New themes added to the marketplace |
| 313 | +- Simplify update system |
| 314 | +- And that’s just the beginning… |
| 315 | + |
| 316 | +--- |
| 317 | + |
| 318 | +**Aether CMS** - Content in Motion. Powered by simplicity. |
0 commit comments