Download the PHP package ubertech-za/asciidoc-renderer without Composer
On this page you can find all versions of the php package ubertech-za/asciidoc-renderer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ubertech-za/asciidoc-renderer
More information about ubertech-za/asciidoc-renderer
Files in ubertech-za/asciidoc-renderer
Package asciidoc-renderer
Short Description Blade-based AsciiDoc renderer for Laravel
License MIT
Homepage https://github.com/ubertech-za/asciidoc-renderer
Informations about the package asciidoc-renderer
AsciiDoc Renderer for Laravel
⚠️ BETA SOFTWARE NOTICE This package is currently in beta and is being prepared for testing in upcoming projects. Please expect possible breaking changes in future releases. We do not recommend using this package in production environments without thorough testing.
A Laravel package that brings Blade templating to AsciiDoc document generation. Generate rich, structured AsciiDoc documents using familiar Blade syntax with specialized directives and escaping for AsciiDoc formatting.
Features
- Blade-powered AsciiDoc templating with custom
.adoc.bladefile extension - Reusable component system with
<x-adoc::*>syntax for modular document building - AsciiDoc-specific escaping to prevent formatting conflicts
- Custom Blade directives for common AsciiDoc constructs
- Built-in layouts for articles and books
- Facade support for easy document generation
- Framework-agnostic core with Laravel service provider integration
Installation
You can install the package via Composer:
The package will automatically register its service provider in Laravel 5.5+.
Publish Configuration (Optional)
Publish Starter Templates (Optional)
Quick Start
Basic Usage
Create an AsciiDoc template at resources/asciidoc/my-document.adoc.blade:
Generate the document:
Custom Template Tags
This package uses non-conflicting Blade tags to avoid issues with AsciiDoc syntax:
<# ... #>- Escaped output (equivalent to{{ ... }})<% ... %>- Raw output (equivalent to{!! ... !!})
Built-in Layouts
Article Layout
Book Layout
Perfect for longer documents with multiple chapters:
Custom Directives
Document Structure
Media and Inclusions
Reusable Components
Create reusable AsciiDoc components using familiar Laravel Blade component patterns.
Anonymous Components
Create .adoc.blade files in resources/asciidoc/components/ to define reusable components:
Use components in your templates with the <x-adoc::*> syntax:
Nested Components
Organize components in subdirectories:
Class-Based Components
For more complex components, create PHP classes in app/Asciidoc/Components/:
Component Features
- Props support with
@props(['name', 'default' => 'value']) - Custom echo syntax preserves AsciiDoc formatting
- All Blade directives work within components (
@if,@foreach, etc.) - Nested component support using dot notation
- AsciiDoc-safe output with built-in escaping
Configuration
The config/asciidoc-renderer.php file contains:
Advanced Usage
Custom Template Renderer
Implement your own renderer by creating a class that implements TemplateRenderer:
Direct Generator Usage
Document Variables
Common document attributes you can pass to templates:
Testing
Code Style
Static Analysis
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Uber Technologies cc
- All Contributors
This package is inspired by and builds upon the architectural patterns from:
- thephpleague/html-to-markdown (MIT License)
- tiptap/html for JSON ↔︎ HTML conversion patterns
License
The MIT License (MIT). Please see License File for more information.
Part of PHP AsciiDoc Tool Chain
This package is part of the PHP AsciiDoc Tool Chain project, which aims to provide comprehensive AsciiDoc generation capabilities for PHP applications. Other packages in the tool chain:
ubertech-za/html-to-asciidoc- Convert HTML to AsciiDocubertech-za/tiptap-to-asciidoc- Convert Tiptap JSON to AsciiDoc
Together, these packages enable rich document authoring workflows in familiar web-based editors with professional AsciiDoc output suitable for technical documentation, books, and publishing workflows.