PHPackages                             nodepub/theme-engine - 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. [Templating &amp; Views](/categories/templating)
4. /
5. nodepub/theme-engine

ActiveLibrary[Templating &amp; Views](/categories/templating)

nodepub/theme-engine
====================

Theme engine built with Twig for creating customizable and inheritable site themes

020PHP

Since Feb 11Pushed 12y ago2 watchersCompare

[ Source](https://github.com/nodepub/ThemeEngine)[ Packagist](https://packagist.org/packages/nodepub/theme-engine)[ RSS](/packages/nodepub-theme-engine/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

NodePub Theme Engine
====================

[](#nodepub-theme-engine)

A simple web site theme engine built with Twig.

Each theme has a namespace, and themes can inherit templates from one another.

Includes a Silex Service Provider.

Defining a Theme
----------------

[](#defining-a-theme)

A theme is a collection of twig templates, css, js, and images. Each theme has a config.yml file that contains metadata about the theme, and defines the customizable settings of the theme.

config.yml

- css
- js
- images layout.twig

Twig Functions
--------------

[](#twig-functions)

**theme\_styles**: renders the style tags for the current theme's CSS. By default, the themes's configured CSS will be minified into a single file. This can be turned off so that it renders a separate script tag for each configured JavaScript file.

**theme\_javascripts**: renders the script tags for the current theme's JavaScript files. By default, the theme's configured JavaScript files will be minified into a single file. This can be turned off so that it renders a separate script tag for each configured JavaScript file.

**theme\_icons**: renders favicon and apple touch icon meta tags if they are defined in the current theme

All twig templates also have access to a site object.

site.title site.name site.tagline site.description

Asset Minification
------------------

[](#asset-minification)

CSS and JavaScript files are minified by default, so that each theme will have only one CSS file and one JavaScript file. Minification can be turned off by setting $app\['np.theme.minify\_assets'\] to false.

Theme Customization
-------------------

[](#theme-customization)

Most themes have customizable settings for changing the look and style of the theme. These settings are defined in a theme's config.yml file

Types of settings:

- fonts
- colors
- background colors
- background images

Theme Switching
---------------

[](#theme-switching)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/059f915d32a35c9918f88ee53e4587701b1caa3a66a7fb72e4da13ebc4525b3a?d=identicon)[gruner](/maintainers/gruner)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/nodepub-theme-engine/health.svg)

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

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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