A modern, feature-rich Ghost theme designed for online learning platforms with built-in course and lesson management.
- 🎓 Course Management - Dynamic course and lesson system with AJAX loading
- 📱 Responsive Design - Mobile-first approach with Tailwind CSS
- 🎨 Dark Mode - Built-in dark mode support
- 🔍 SEO Optimized - Structured data and meta tags
- ⚡ Fast Loading - Optimized assets and lazy loading
- 🌐 Multi-language - i18n support with translation files
-
Upload the theme to your Ghost installation:
# Copy theme to Ghost content/themes directory cp -r x-learn-ghost-theme /path/to/ghost/content/themes/ -
Restart Ghost:
ghost restart
-
Activate the theme in Ghost Admin:
- Go to Settings → Design
- Select X-Learn Ghost Theme
- Click Activate
The theme uses Ghost Content API to dynamically load course lessons. You need to create an API key:
-
Copy the example config file to your Ghost root directory:
cp config.example.json ../../../../config.development.json
-
Update Ghost's config file with your settings (database, mail, etc.)
-
Configure the Content API key for dynamic lesson loading (see below)
This theme uses AJAX to dynamically load course lessons. You need to configure the Ghost Content API key via Code Injection.
- Go to http://localhost:2368/ghost/#/settings/integrations
- Click Add custom integration
- Name it:
Theme API(or any name you prefer) - Copy the Content API Key (e.g.,
1f06b81ddee9f42ffca580be1b)
-
Go to Settings → Code Injection (http://localhost:2368/ghost/#/settings/code-injection)
-
In the Site Header section, add:
<script> window.ghostConfig = { apiKey: 'YOUR_CONTENT_API_KEY_HERE' }; </script>
-
Replace
YOUR_CONTENT_API_KEY_HEREwith the key you copied in Step 1 -
Click Save
- The theme's course and lesson pages use AJAX to fetch lesson lists from the Ghost Content API
- The API key is read from
window.ghostConfig.apiKeyin JavaScript - If no key is configured, you'll see "Không thể tải danh sách bài học" (Cannot load lesson list)
- Content API keys are read-only and safe to expose in client-side code
- Never use Admin API keys in Code Injection (they have write access)
- The key is only used to fetch published posts via the Content API
- For production, create a separate integration for better tracking
- Go to http://localhost:2368/ghost
- Navigate to Settings → Labs → Import content
- Select
content/themes/xdev-learn/demo_content/demo-2025-09-29-12-28-24.json
Custom theme: x-learn-ghost-theme located in content/themes/x-learn-ghost-theme/
The theme uses a tagging system for courses and lessons:
For Courses:
- Tag with
hash-course(required) - Tag with
hash-course-id-Xwhere X is a unique number (e.g.,hash-course-id-1,hash-course-id-2)
For Lessons:
- Tag with
hash-lesson(required) - Tag with the same
hash-course-id-Xas the parent course
Example:
Course: PostgreSQL HA Tags: hash-course, hash-course-id-1 Lesson 1: Introduction to PostgreSQL HA Tags: hash-lesson, hash-course-id-1 Lesson 2: Setup Patroni Tags: hash-lesson, hash-course-id-1 The lessons will be automatically loaded via AJAX when viewing the course page.
# Navigate to theme directory cd content/themes/x-learn-ghost-theme # Install dependencies (if any) npm install # Watch for changes (if using build tools) npm run devx-learn-ghost-theme/ ├── assets/ │ ├── css/ # Compiled CSS │ ├── js/ # JavaScript files │ └── images/ # Theme images ├── partials/ # Handlebars partials ├── locales/ # Translation files ├── custom-course-layout.hbs # Course page template ├── custom-lesson-layout.hbs # Lesson page template ├── index.hbs # Home page template ├── package.json # Theme metadata └── README.md # This file - Styling: Modify
assets/css/files or use Tailwind CSS classes - Templates: Edit
.hbsfiles for layout changes - Translations: Update files in
locales/directory - API Key: Update in
custom-course-layout.hbsline ~54
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit your changes:
git commit -am 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
MIT License - See LICENSE file for details
For issues and questions:
- GitHub Issues: https://github.com/xdev-asia-labs/x-learn-ghost-theme/issues
- Documentation: https://xdev.asia/docs