Js.cms
CMS - generate html pages using Javascript. host on CDN (GithubPages etc.)
Install / Use
/learn @arielberg/Js.cmsREADME
CMS Builder - Modular Static Site CMS
A clean, modular CMS framework for building static websites with GitHub as a backend.
Structure
cms-core/
├── admin/ # Admin panel interface
├── core/ # Core CMS engine
│ ├── moduleLoader.mjs # Module loading system
│ └── hooks/ # Hook system for extensions
├── modules/ # Pluggable modules
│ └── blog/ # Example blog module
├── config/ # Configuration files
└── README.md # This file
Module System
Creating a Module
-
Create a directory in
cms-core/modules/(e.g.,my-module/) -
Create
module.json:
{
"name": "my-module",
"version": "1.0.0",
"description": "My custom module",
"dependencies": [],
"provides": {
"contentTypes": ["my-content-type"],
"hooks": ["beforeRender", "afterSave"]
}
}
- Add
contentTypes.json(optional):
[
{
"name": "my-content-type",
"label": "My Content",
"labelPlural": "My Contents",
"urlPrefix": "my-content/",
"fields": [
{"name": "title", "type": "textfield", "label": "Title"},
{"name": "body", "type": "wysiwyg", "label": "Content"}
]
}
]
- Add
hooks.mjs(optional):
export const hooks = {
beforeRender: async (contentItem, context) => {
// Modify contentItem before rendering
return contentItem;
},
afterSave: async (contentItem) => {
// Do something after saving
return contentItem;
}
};
- Enable in
config/modules.json:
{
"active": ["my-module"]
}
Available Hooks
beforeRender(contentItem, context)- Called before rendering a content itemafterSave(contentItem)- Called after saving a content itemrenderField(field, value, contentType)- Custom field rendering
Field Types
textfield- Single line text inputwysiwyg- Rich text editordate- Date pickerimage- Image uploadfile- File uploadurl- URL inputselect- Dropdown select
Configuration
appSettings.json
Main CMS configuration:
GIT_Account- GitHub usernameGIT_Repository- Repository nameLanugages- Supported languagesDefault_Language- Default language code
modules.json
Module registry - lists active and disabled modules.
contentTypes.json
Legacy content types (modules are preferred).
Quick Start
Option 1: Setup Wizard (Recommended)
-
Run Setup Wizard
- Open
/cms-core/init/index.htmlin your browser - Follow the step-by-step wizard to configure your CMS
- The wizard will test your GitHub token and save configuration
- Open
-
Access Admin Panel
- After setup, go to
/cms-core/index.html - Start creating content!
- After setup, go to
Option 2: Manual Configuration
- Configure
config/appSettings.jsonwith your GitHub repository- See
CONFIGURATION.mdfor detailed setup instructions - You'll need a GitHub Personal Access Token with
reposcope
- See
- Enable modules in
config/modules.json - Access admin panel at
/cms-core/index.html - Login with your GitHub username and Personal Access Token
- Create content using the admin interface
- Content is stored in GitHub and rendered as static HTML
For detailed configuration steps, see CONFIGURATION.md.
Development
Modules are loaded automatically from cms-core/modules/. Each module is self-contained and can be upgraded independently.
Example: Blog Module
See modules/blog/ for a complete example module that provides:
- Blog post content type
- Reading time calculation hook
- Post save notifications
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
