Download the PHP package ubertech-za/asciidoctor-wrapper without Composer

On this page you can find all versions of the php package ubertech-za/asciidoctor-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package asciidoctor-wrapper

AsciiDoctor Wrapper

⚠️ 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 provides a PHP wrapper around AsciiDoctor and AsciiDoctor-PDF with advanced theming, styling, and configuration management.

Latest Version Tests

Overview

This package bridges the gap between PHP applications and the powerful AsciiDoctor ecosystem, providing:

Installation

Install the package via Composer:

Prerequisites

You need to have AsciiDoctor installed on your system:

Alternatively, use Docker:

Laravel Integration

Configuration

Publish the configuration file:

Configure your executables in config/asciidoctor.php:

Environment Variables

Add to your .env file:

Usage

Basic Usage

Using the Wrapper Class Directly

Theme System

Creating Themes with the Theme Builder

Loading Themes from JSON

Create a theme file at resources/asciidoctor/themes/my-theme.json:

Load and use the theme:

Theme Inheritance

Themes can extend other themes:

Built-in themes can also be extended:

Font Management

Custom Fonts Configuration

The package supports custom fonts for PDF generation. Fonts are automatically loaded from the configured fonts directory and made available to asciidoctor-pdf themes.

Setting Up Custom Fonts

  1. Configure the fonts directory in config/asciidoctor.php:

  2. Add font files to your fonts directory:

  3. Use fonts in themes - the package automatically generates the font catalog:

Font Catalog Generation

When using custom fonts, the package automatically:

Example generated theme YAML:

Font Environment Variable

Set the fonts directory via environment variable:

Supported Font Formats

Font Naming Convention

For automatic detection of font variants, use this naming pattern:

Supported Output Formats

Advanced Configuration

Custom Attributes

Safe Mode

Style Objects

Color Styles

Font Styles

Element Styles

Testing and Validation

Check Executable Availability

Theme Validation

Artisan Commands

The package doesn't include Artisan commands by default, but you can create your own:

Error Handling

The wrapper returns structured results:

Performance and Caching

Theme Caching

Enable theme caching in your configuration:

Best Practices

  1. Reuse Theme Objects: Create themes once and reuse them for multiple conversions
  2. Validate Early: Use validateTheme() during development to catch issues
  3. Cache Compiled Themes: Enable caching for production environments
  4. Monitor Resources: AsciiDoctor can be memory-intensive for large documents

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Run tests: composer test
  4. Commit changes: git commit -am 'Add amazing feature'
  5. Push to branch: git push origin feature/amazing-feature
  6. Create a Pull Request

Development Setup

Testing

Run the test suite:

License

This package is open-sourced software licensed under the MIT license.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

This package is inspired by the excellent work of:

Support


Made by Uber Technologies cc


All versions of asciidoctor-wrapper with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ubertech-za/asciidoctor-wrapper contains the following files

Loading the files please wait ...