PHPackages                             justso/justgen - 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. justso/justgen

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

justso/justgen
==============

Simple HTML page generator module.

3.0.1(9y ago)0158MITPHPPHP &gt;=5.6.0

Since Aug 16Pushed 9y ago2 watchersCompare

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

READMEChangelogDependencies (4)Versions (12)Used By (0)

JustGen
=======

[](#justgen)

Simple HTML page generator module.

HTML pages are generated on-the-fly on base of Smarty templates with texts from JustTexts package and placed in the file system to be retrieved directly later. When the template or text is changed (aka content management), it is sufficient to delete the generated HTML files to have them re-generated again later.

The package doesn't try to be a content management system, but a smart tool to help people have more control with html pages and the content without the need to use a 'real' CMS with all it's superpowers. Instead, you can create small and really fast web pages in multiple languages.

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

[](#installation)

### Composer

[](#composer)

composer require justso/justgen

### git

[](#git)

git clone git://github.com/JustsoSoftware/JustGen.git vendor/justso/justgen

Setup
-----

[](#setup)

Checkout in vendor/justso/justgen and add the lines

```
  "/justtexts/page/*/text/*": "justso\\justgen\\TextService",
  "/justgen/flushcache":      "justso\\justgen\\FlushCache",
  "*":                        "file:vendor/justso/justgen/services.json"

```

to your `config.json` file section "services" (see JustAPI package). Make sure that the first precedes the entry for "justtexts" so that the modified TextService class is used. It adds not yet defined text containers to the JustTexts frontend when editing page content if they are used in the template. The `*` rule should be the last of all your rules, and catches all unknown accesses and tries to find a page to generate. The page generator itself sends an 404 error if no such page exists.

If you use Apache, your configuration should be like that:

```

    ...
    Redirect 301 /index /de/
    ErrorDocument 403 /api/justgen/
    ErrorDocument 404 /api/justgen/

```

With NginX, make sure that 403 and 404 errors are routed to the FrontController:

```
    error_page 403 404 = /vendor/justso/justapi/FrontController.php;

```

To make JustTexts frontend work with JustGen, you need to overwrite an entry in your dependencies.php file:

```
  '\justso\justtexts\Page'    => '\justso\justgen\model\Page',

```

Templates
---------

[](#templates)

Templates are stored in a /templates folder and are filled by the generator with help from Smarty

templates are selected according to a requested page via rules defined in the config.json file. In the section "pages" you can define which page name uses which template file, for example:

```
{
  ...
  "pages": {
    "my-page": "ExampleTemplate"
  }
  ...
}

```

The generator checks if there is a page rule defining a template, and then uses the template to generate the actual HTMl. It is sended then back to the requesting browser and additionally used to generate a file in the htdocs folder, so that consecutive accesses find this file and the content need not to be generated again.

So, how about dynamic content? Dynamic content should be handled differently, for example by loading it via AJAX requests and not be used in a fixed, generated way.

Redirects
---------

[](#redirects)

Sometimes, you need to redirect URLs to new ones. Therefore, you can configure the generator to map an old URL to a new one. This is done by adding a section "redirects" to config.json like this:

```
{
  ...
  "redirects": {
    "old-page": "new-page"
  }
  ...
}

```

Support &amp; More
------------------

[](#support--more)

If you need support, please contact us:

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

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 ~43 days

Recently: every ~6 days

Total

11

Last Release

3498d ago

Major Versions

1.3.0 → 2.0.02016-08-06

2.1.2 → 3.0.02016-10-07

PHP version history (2 changes)1.0.0PHP &gt;=5.4.0

2.0.0PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/29e190fa4b9db5e54262059be363640915b121b168ad95dc072059498a7b8e99?d=identicon)[justso](/maintainers/justso)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[nzedb/nzedb

A Usenet Indexer

6415.4k](/packages/nzedb-nzedb)

PHPackages © 2026

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