定制 linkorb/blazon 二次开发

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

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

linkorb/blazon

Composer 安装命令:

composer require linkorb/blazon

包简介

Blazon: publish fast and beautiful websites, campaign sites, documentation, guides etc from data (e.g. Xillion Resources)

README 文档

README

blazon

Blazon is a data-driven, plugin-powered, multi-target content publishing framework.

Use-cases:

  • Documentation, guides, manuals
  • Contracts (with variables)
  • Legal documents
  • "Conditional text" content
  • Wiki content rendering
  • Marketing sites
  • Policies, Procedures, Forms
  • Knowledge graphs
  • Digital gardens
  • Code repository project documentation
  • Complex data graph visualization (i.e. organizational structures)

Definitions:

  • Publication: Collection of "documents"
  • Document: unique identifier (path), and a controller for rendering output
  • Plugin: allows to modify every phase of the loading and publishing process
  • Target: one of many outputs, produced by a Publisher (i.e. static html, pdf, etc).

Features:

  • Load content from local or remote sources
  • Markdown, with frontmatter
  • Xillion Resources
  • Twig templating
  • Supports both static site generation and dynamic rendering

Examples

Installation

git clone git@github.com:linkorb/blazon.git
cd blazon
composer install # install php dependencies into blazon's vendor/ directory
./bin/blazon -v # get version and help output

Usage

Your Blazon project (i.e. your site, book, report, etc) should be stored in it's own directory, preferably a Git repository.

From there, use the blazon cli tool to generate a static HTML site into the build/ directory of your project:

Publishing

cd path/to/my/blazon-project
path/to/blazon publish -vvv

This command:

  1. Builds your Publication in-memory, using your custom PublicationFactory, or the default factory.
  2. Loops over all registered Document instances
  3. Renders the output of each Document using it's handler callback, and writes it to the Document's path into build/
  4. Recursively copies any public assets (images, css, js, pdfs, etc) from public/ into build/

You can now serve the generated build/ directory as a static (html) site on your favorite service:

  • A simple nginx container
  • Github pages
  • Netlify
  • ...etc

Auto-Publishing with "watch-mode"

Pass the -w flag to the blazon publish command to tell blazon to keep watching your project's source directory for changes. After any detected change, it will automatically (re)publish to build/

Preview server

Blazon includes a minimal preview server that you can use while authoring content and styling your publication.

Simply point your favorite PHP-enabled webserver (i.e. apache with mod-php, nginx with php-fpm, etc) to blazon's public/ directory.

Make sure to setup SOURCE_PATH=/path/to/your/blazon-project in Blazon's .env file.

Features:

  • Builds the publication on every HTTP request
  • In-memory, no writes to build/
  • Verbose error messages when setting DEBUG=true in your .env file.
  • Supports serving static assets from your publication's public/ directory.

It is not recommended to use the preview server in production. Use the blazon publish command instead for maximum security and performance.

Inspiration

  • Gatsby
  • Hugo
  • Sage
  • Xillion
  • Schemata

Contributing

We welcome contributions to make this repository even better. Whether it's fixing a bug, adding a feature, or improving documentation, your help is highly appreciated. To get started, fork this repository then clone your fork.

Be sure to familiarize yourself with LinkORB's Contribution Guidelines for our standards around commits, branches, and pull requests, as well as our code of conduct before submitting any changes.

If you are unable to implement changes you like yourself, don't hesitate to open a new issue report so that we or others may take care of it.

Brought to you by the LinkORB Engineering team


Check out our other projects at linkorb.com/engineering. By the way, we're hiring!

linkorb/blazon 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-29