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 2w 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 13% 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://avatars.githubusercontent.com/u/2345?v=4)[Andrew](/maintainers/gruner)[@gruner](https://github.com/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

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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