定制 rkn/cms 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rkn/cms

Composer 安装命令:

composer create-project rkn/cms

包简介

Flat-file CMS for shared hosting — Markdown, Twig, Yoyo reactive components, PSR-7/11/15/16, no database required.

README 文档

README

The flat-file PHP CMS that deploys to shared hosting in minutes.

RakunCMS is a blazing fast, flat-file CMS built for shared hosting environments — powered by Markdown, Twig, Yoyo reactive components, and PSR standards. Content can live in flat Markdown files or a database — no heavyweight stack required.

Latest Stable Version Total Downloads License

Why RakunCMS?

We built RakunCMS as an alternative to CMSs like WordPress, Grav, Statamic, and Kirby. Our core philosophy is simplicity, performance, and accessibility.

  • Flat-file or database: content lives in Markdown files (folder = site structure) by default, or in MySQL via the opt-in content store — same Query API either way.
  • Runs on $3/mo shared hosting (cPanel/Plesk): Deploy effortlessly via FTP/cPanel. No persistent processes, no VPS required.
  • No Node.js or Docker required: Everything runs in a pure PHP ecosystem.
  • Composer-installable: Manage your site easily with Composer.
  • Reactive components without writing JavaScript: Build interactive UIs with PHP components that update seamlessly without full page reloads, powered by Yoyo (htmx).
  • PSR-7/11/15/16 compliant: Built on a custom micro-framework with under 5MB of total dependencies.

Installation & Quick Start

Getting started with RakunCMS is incredibly fast:

# 1. Create a new site via Composer
composer create-project rkn/cms my-website
cd my-website

# 2. Initialize the site structure
php rakun init

# 3. Start the built-in development server
php rakun serve

Open http://localhost:8080 in your browser to see your site running!

Core Features

  • Flat-File Architecture (default): By default, everything is stored in Markdown and YAML — no MySQL configuration, no database backups. Opt in to a MySQL content store by setting content.driver: mysql in config, powered by ContentStorageFactory selecting between FileContentStorage and MysqlContentStorage via the ContentStorage interface. A SQLite-backed content index (set index.driver: sqlite) is also available for large collections where a PHP-array index would be memory-intensive.
  • Reactive Yoyo Components: Build interactive, stateful PHP components (similar to Livewire) using HTMX under the hood.
  • Built-in SEO Engine: Automatically generates Open Graph tags, JSON-LD markup, handles consent management, and integrates with WebMCP.
  • Full-Text Search: Features an integrated inverted index for blazing fast search capabilities without needing external services like Algolia or Elasticsearch.
  • Native i18n: Out-of-the-box support for multi-locale routing and content localization.
  • Multi-Level Caching: Achieve 1-3ms response times in production using static HTML full-page caching coupled with OPcache.
  • CLI Tools: Integrated rakun command-line tool to easily clear the cache, make components, or run background queue workers.
  • Static Export: bin/rakun build renders every published entry to dist/<url>/index.html and generates sitemap.xml/rss.xml/robots.txt — source-agnostic and fully compatible with both file and mysql content stores. Deploy to any cheap or static host.
  • Optional Admin Panel: rakuncms-admin is a separate, optional Laravel + Filament application that manages one or more RakunCMS sites over the HTTP content API. Flat-file sites can still be edited by hand or via Git with no admin panel required.

Developer Experience (DX)

  • Laravel Herd Integration: Includes a custom Valet driver (RakunCmsValetDriver) and the php rakun herd:install command for automatic site discovery and blazingly fast local development on macOS.
  • Clean Architecture: Built on a highly optimized, custom PSR-compliant micro-framework. Total production dependencies are kept strictly under 5MB, ensuring a lightweight footprint for any hosting environment.

How It Works

  1. Write Content: Create or edit .md files directly in the content/ directory.
  2. Customize Design: Edit the .twig templates located in templates/ to match your brand.
  3. Add Interactivity: Build stateful Yoyo components in src/Components/ with matching views in templates/yoyo/.

Deployment — Plesk via Git + GitHub webhook

RakunCMS sites deploy cleanly on Plesk using Plesk's built-in Git integration pulling from GitHub, with a GitHub webhook that triggers a deploy on every push. This is the canonical reference for the RakunCMS ecosystem (the sites built on top of rkn/cms follow the same flow).

Flow: GitHub push → webhook → Plesk pulls the branch → Plesk runs the deployment actions (composer install + cache/sitemap warmup) → the new code is live under the domain's document root.

1. Prepare the domain in Plesk

  • Create or choose the subscription/domain that hosts the site.
  • Hosting Settings → PHP: select PHP 8.2+ (8.3 recommended) with mbstring enabled.
  • Ensure the Git component is installed (Plesk → Tools & Settings → Updates → Add Components → Git).

2. Connect the GitHub repository — Websites & Domains → Git → Add Repository

  • Repository URL:
    • Public repo: https://github.com/<org>/<repo>.git
    • Private repo: use SSH git@github.com:<org>/<repo>.git and add the deploy key Plesk shows to GitHub → repo → Settings → Deploy keys (read-only access is enough).
  • Branch: main.
  • Deployment path: the folder Plesk publishes to (e.g. the domain's httpdocs).

3. Point the document root at public/

RakunCMS serves from the public/ front controller. Set Hosting Settings → Document root to <deployment-path>/public (e.g. httpdocs/public).

4. Enable automatic deployment + actions

In the repository's settings in Plesk:

  • Deployment mode: Automatic (deploy when the repository is updated) — this is what the webhook drives.
  • Additional deployment actions (run after each pull, from the repo root):
    /opt/plesk/php/8.3/bin/php /usr/lib/plesk-9.0/composer.phar install --no-dev --optimize-autoloader --no-interaction
    /opt/plesk/php/8.3/bin/php vendor/bin/rakun cache:clear
    /opt/plesk/php/8.3/bin/php vendor/bin/rakun cache:warmup
    /opt/plesk/php/8.3/bin/php vendor/bin/rakun sitemap:generate
    # If the site uses the SQLite/MySQL content index, also run:
    # /opt/plesk/php/8.3/bin/php vendor/bin/rakun index:rebuild

    Use the explicit Plesk PHP 8.3 binary (/opt/plesk/php/8.3/bin/php) — the default php in deployment actions can be an older version. Adjust the composer.phar path to your Plesk install (or use a composer available on PATH).

5. Add the GitHub webhook

Plesk shows a Webhook URL for the repository once Automatic deployment is on. Copy it, then in GitHub → repo → Settings → Webhooks → Add webhook:

  • Payload URL: the Plesk webhook URL.
  • Content type: application/json.
  • Which events: Just the push event.
  • Save. Pushing to main now calls Plesk and deploys automatically.

6. Writable paths & config

  • Ensure cache/ and storage/ are writable by the subscription's web user.
  • Site config lives in config/rakun.yaml; keep secrets (API keys, mail, payment keys) in environment variables / .env on the server — never commit them.
  • First deploy of a brand-new site only: scaffold the structure with php bin/rakun init.

RakunCMS also ships its own deploy:* commands (atomic FTP/SSH deploys for shared hosting without Git). The Plesk + GitHub webhook flow above is the recommended path when the host runs Plesk.

Documentation

Full documentation, guides, deployment instructions, and API reference can be found at:
https://rakuncms.com/docs

Contributing

We welcome all contributions from the community! If you're looking to help out, report bugs, or understand how RakunCMS works under the hood, please read our Contributing Guide which includes an in-depth Architecture Overview.

License

GPL-3.0-or-later

rkn/cms 适用场景与选型建议

rkn/cms 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 123 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 03 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「twig」 「cms」 「markdown」 「plesk」 「cpanel」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 rkn/cms 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 rkn/cms 我们能提供哪些服务?
定制开发 / 二次开发

基于 rkn/cms 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 123
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 42
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-03-03