PHPackages                             surgiie/blade - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. surgiie/blade

AbandonedArchivedLibrary

surgiie/blade
=============

A extended version of the laravel blade engine so it can be used on any textual.

v3.0.2(2y ago)01.6k1MITPHPPHP ^8.1|^8.2

Since Oct 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/surgiie/blade)[ Packagist](https://packagist.org/packages/surgiie/blade)[ RSS](/packages/surgiie-blade/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (22)Used By (1)

Blade
=====

[](#blade)

Abandoned
=========

[](#abandoned)

This package is no longer maintained consider using [laravel-blade-cli](https://github.com/surgiie/laravel-blade-cli) for templating needs.

[![tests](https://github.com/surgiie/blade/actions/workflows/tests.yml/badge.svg)](https://github.com/surgiie/blade/actions/workflows/tests.yml/badge.svg)

An extended standalone version of the Laravel Blade engine so that it can be used on any textual file on the fly.

Why?
----

[](#why)

There are several standalone blade packages out there, but there all meant for html template files where spacing is not important. I wanted the ability to use the blade engine for rendering template files such as yaml during my deployment ci pipelines, and wanted it to work basically on any textual file on the fly. The blade engine trims the output and some compiled directives dont preserve nesting of the rendered content, for example, if you have a file like this:

```
# example.yaml
name: {{ $name }}
test:
    @include("partial.yaml")
```

Each line of the contents of the `@include` should also be indented by the number of spaces left of the `@include` directive, but it's not and the rendered result will not match the original file structure in terms of nesting/spacing. This is a problematic when rendering files like yaml where spacing and indentation are semantically important.

Installation
------------

[](#installation)

```
composer require surgiie/blade
```

### Use

[](#use)

```
