seryak/yazar
Composer 安装命令:
composer require seryak/yazar
包简介
Static site generator engine for Laravel: Markdown content imported into Eloquent documents and rendered through Blade.
README 文档
README
Yazar is a static site generator engine for Laravel: Markdown content with front matter is imported into Eloquent documents and rendered through Blade templates, either dynamically over HTTP or as pre-built static HTML.
For Laravel developers who want to:
- Use familiar tools: Eloquent, Blade, Service Container, Facades.
- Extend behaviour through config, not by forking the engine.
- Avoid duplicating Markdown-to-HTML logic across static and dynamic rendering.
- Get static-site speed without a separate templating language.
This repository is the engine only — a Composer package, not a runnable application. It is meant to be installed inside your own Laravel project.
Installation
Until the package is tagged, install it as a local path dependency with a symlink, so changes to the engine are picked up immediately by the consuming application:
{
"repositories": [
{
"type": "path",
"url": "../yazar",
"options": {
"symlink": true
}
}
],
"require": {
"seryak/yazar": "dev-master"
},
"minimum-stability": "dev",
"prefer-stable": true
}
composer require seryak/yazar:dev-master
Once versioned releases exist, this becomes a regular composer require seryak/yazar.
Getting started
php artisan yazar:install # publishes config/yazar.php, default views, and demo content php artisan migrate # creates the documents table php artisan build # generates the static site
php artisan yazar:install never touches the database — running migrations is always a separate, explicit step.
Configuration
All engine configuration lives in the published config/yazar.php:
content_path— root directory for Markdown content.content_types— maps a storage disk (posts/pages/categories) to aDocumentTypeand the Eloquent model class used for it; override themodelvalue to use your own subclass.disks— theStoragedisk definitions registered at runtime for each content type plusstatic_output.deploy_target— optional directory thebuildcommand copies its static output into.front_page_view— the Blade view name used for the front page.
Per-document view selection is not configured here: it comes from the view::extends front matter field on each Markdown file.
Console commands
php artisan build— imports all configured content, renders it to static HTML, and (ifdeploy_targetis set) copies the result there.php artisan yazar:install— publishes config, default views, and demo content; supports--forceto overwrite.
Local development
The engine itself has no runnable Laravel application. bin/harness-init.sh
creates (or reuses) a git-ignored harness/ Laravel application inside this
repository for manually exercising the package — see
docs/harness.md for setup, usage, and reset instructions.
Documentation
| Guide | Description |
|---|---|
| Harness | Local, git-ignored Laravel app for manually exercising the package |
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-03