A documentation site from Markdown — on PHP and Composer
Write pages in Markdown and settings in JSON. Docara builds a fast static site from them on SIMAI Framework, with a menu, search and a dark theme. You can publish it on any host.
Docara 3 · open source on GitHub · Apache 2.0 license
A first site in three commands
Install the package with Composer, create a starter and build the site. Building needs PHP 8.2+, Composer and Node.js 20+; the finished site needs only a static web server.
# 1. Install Docara
composer require simai/docara:^3.0
# 2. Create a starter site
php vendor/bin/docara init .
# 3. Build the site and open it in the browser
php vendor/bin/docara serve production
Starters, checking the result and publishing are in the full quick start.
Why Docara
- Composer instead of npm.Docara installs and updates like any PHP package: no npm dependencies and no theme of your own to maintain.
- Static output.The build produces plain HTML, CSS and JavaScript. Put them on GitHub Pages or any web server: no PHP or Node.js there.
- SIMAI design system.The interface, the light and dark themes and the components come from SIMAI Framework. The build catches a wrong component call before you publish.
Documentation out of the box
Docara builds the menu, search and a comfortable reading view itself — no theme or plugins of your own.
- Menu and navigation.Sections, breadcrumbs, the page outline and links to neighbouring pages come from the file structure. More in Menu and sections.
- Site search.The index is built at build time and runs in the reader’s browser: the server needs no database and no external service.
- Comfortable reading.Readers choose a light or dark theme, the font size and the text width.
- Several languages.Each language is its own Markdown folder. Linked pages get a language switcher and
hreflang; more in Multilingual site. - A landing page from the same files.This page is Docara too: the
landingpreset drops the documentation menu and keeps the first screen, the blocks and the call to action. How it is built is described on a separate page. - Checked before publishing.
verify-staticchecks the finished site before it goes live: pages, local links, files and the search index. More in Checking the build.
Example pages
- Component catalogueEvery component with a live example, its parameters and code to copy.
- Layout examplesPages with different regions, headers and setting inheritance — with their source files.
- Project componentsA site’s own components, added without changing Docara: an install command builder and a product configurator.
Frequently asked questions
VitePress and Docusaurus are npm projects: the site is built from JavaScript packages, and a theme that the team configures and updates sets its look. Docara installs with Composer, keeps content in Markdown and JSON and takes its interface from SIMAI Framework. It suits teams that work in PHP or want documentation in the same style as SIMAI products.
Building needs PHP 8.2+ with the ctype, dom, intl, json, libxml
and mbstring extensions, Composer and Node.js 20+: the node command on
PATH or a path in the DOCARA_NODE_BINARY variable. The finished site is
static and needs only a web server.
Yes. The landing preset uses the same Markdown, JSON and components but
drops the documentation menu. This page is built that way.
Yes. Try plain Markdown and the ready Docara blocks first. If they are not enough, add a component of your own through the documented contract.
php vendor/bin/docara upgrade prepares the new version separately, builds
and checks the site and only then applies the result. Go back to the previous
version with upgrade --rollback=latest.