PHPackages                             gaunt/gaunt - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. gaunt/gaunt

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gaunt/gaunt
===========

1.0.2(12y ago)325MIT

Since May 10Compare

[ Source](https://github.com/tkjaergaard/gaunt)[ Packagist](https://packagist.org/packages/gaunt/gaunt)[ RSS](/packages/gaunt-gaunt/feed)WikiDiscussions Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

### What is Gaunt?

[](#what-is-gaunt)

Gaunt is the simplest template engine written for Wordpress. The engine is heavily inspired and based upon Laravel 4 Blade. Gaunt is not nearly as heavy and feature-rich as dedicated template engines such as Smarty and Twig. But it helps you simplify your theme pages quite a lot.

### Installation

[](#installation)

Gaunt is installable through [Composer](https://packagist.org/packages/gaunt/gaunt).

```
"require" : {
     "gaunt/gaunt":"1.0.*"
}

```

Require "vendor/autoload.php" in your functions.php or plugin.php

```
require("vendor/autoload.php");

```

### Docs

[](#docs)

#### The loop

[](#the-loop)

```
@startloop
    ``the_title();``
    ``the_content();``
@endloop

@startloop
    ``the_title();``
    ``the_content();``
@noposts
    No posts yet, sorry..
@endloop

```

#### Code blocks

[](#code-blocks)

Code blocks is equal to

```
    ``
         $foo = "bar";
         $bar = ["a","b","c"];
    ``

```

#### Echoing data

[](#echoing-data)

```
Hello, {{ $user }}.

Hello, {{ $user.name }} // $user['name'];

Hello, {{ $user->name }}

The current UNIX timestamp is {{ time() }}.

```

#### If statements

[](#if-statements)

```
@if (count($posts) === 1)
    I have one post!
@elseif (count($posts) > 1)
    I have multiple posts!
@else
    I don't have any posts!
@endif

```

#### Loops

[](#loops)

```
@for ($i = 0; $i < 10; $i++)
    The current value is {{ $i }}
@endfor

@foreach ($posts as $post)
    The title of this post is: {{ $post->post_title }}
@endforeach

@while (true)
    I'm looping forever.
@endwhile

```

#### Including sub-views

[](#including-sub-views)

```
@include('view.php')

```

#### Comments

[](#comments)

```
{{-- This comment will not be in the rendered HTML --}}

```

### Examples

[](#examples)

```

    Page Title

    @include('header.php')

    @startloop
        ``the_title();``
        ``the_content();``
    @noposts
        Sorry no posts here..
    @endloop

    @include('footer.php')

```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~76 days

Total

3

Last Release

4646d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1124666?v=4)[Thomas Kjærgaard](/maintainers/tkjaergaard)[@tkjaergaard](https://github.com/tkjaergaard)

---

Top Contributors

[![tkjaergaard](https://avatars.githubusercontent.com/u/1124666?v=4)](https://github.com/tkjaergaard "tkjaergaard (4 commits)")

### Embed Badge

![Health badge](/badges/gaunt-gaunt/health.svg)

```
[![Health](https://phpackages.com/badges/gaunt-gaunt/health.svg)](https://phpackages.com/packages/gaunt-gaunt)
```

###  Alternatives

[the42coders/eu-cookie-consent

To make your site compliant to the EU GDPR law you can use this package and customize it to your needs.

5941.3k](/packages/the42coders-eu-cookie-consent)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
