simai/docara
Composer 安装命令:
composer require simai/docara
包简介
Simple static sites with Laravel's Blade. based on tightenco/jigsaw
README 文档
README
- moduleCache (bool, default: false): включает кеш модульных css/js. При true core.css встраивается в hash.css, core.css из шаблона не грузится отдельно; управляется через DOCARA_MODULE_CACHE или config.php.
Quick start to install Docara via Composer and initialize a project.
Install the framework
composer require simai/docara
Configure .env
Create .env in your project root (example):
AZURE_KEY=<AZURE_KEY>
AZURE_REGION=<AZURE_REGION>
AZURE_ENDPOINT=https://api.cognitive.microsofttranslator.com
DOCS_DIR=docs
Initialize a new project
From an empty project directory:
php vendor/bin/docara init
This will:
- copy the base template (stubs),
- copy bundled
source/_core, - copy template configs from
_core, - run frontend dependency install (
npm/yarn installin the project root). - If you changed files in
source/_core, init/update will detect your edits (whitespace-insensitive) and leave those files untouched.
Run
- Development/watch (if defined in your template):
yarn run watchornpm run watch - Build:
yarn run prod/npm run prod(or your template’s build script) - Translate test:
php vendor/bin/docara translate --test - Update existing project in-place (no delete/archive, keeps
source/_core):php vendor/bin/docara init --update - If you already have your own docs in
source/docs, they won’t be overwritten; otherwise stubs/docs are copied. - If you already have
config.phpin the project root, it will be preserved during init/update.
CLI commands
php vendor/bin/docara init [--update] [--force-core-configs] [--force-core-files] [preset]
Initializes or updates the project.--force-core-configsoverwrites template configs from_coreeven if you changed them (by default changed files are skipped).--force-core-filesoverwrites the entire_coretree from stubs (ignoring your edits), but files that are already tracked in your git repo are never overwritten, even with this flag.php vendor/bin/docara build [env]— build the site for the given environment.php vendor/bin/docara translate [--test]— translate docs (requires AZURE_*),--testfor a dry run.
Structure
source/— your site source.source/_core/— Docara/Jigsaw core (bundled and copied on init).stubs/— template stubs used duringdocara init.build_*— build outputs.
Lint
- PHP:
vendor/bin/pint --test - Markdown:
npx markdownlint-cli2 "**/*.md" "!vendor" "!node_modules" "!build_*" "!dist" "!public"
Customize the logo
- Replace the SVG at
source/_core/_assets/img/logo.svg(and, if you use the wide mark,source/_core/_assets/img/icon_and_text_logo.svg) with your own asset. - If you prefer a different markup (e.g., PNG, text), edit
source/_core/_components/header/logo.blade.php; it is now a regular file in your repo, not a submodule. - Rebuild assets (
yarn prod/npm run prodor your preset’s build) so the new logo is emitted toassets/build. - Commit/push as usual—
source/_coreis just files, so the logo change lives in your repository.
License
MIT
simai/docara 适用场景与选型建议
simai/docara 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 424 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 11 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「generator」 「static」 「site」 「laravel」 「blade」 「simai」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 simai/docara 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 simai/docara 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 simai/docara 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting
404 'not found' and 403 'forbidden' error handlers. The 404 handler shows custom content for missing pages but not resources like CSS or JS. The 403 handler redirects to a login URL on unauthorized access.
TwigStan is a static analyzer for Twig templates powered by PHPStan
Arc5 provides a set of static classes for the Mvc5 Framework
Zend Expressive adapter for rwoverdijk/assetmanager
统计信息
- 总下载量: 424
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-28