PHPackages                             clarkwinkelmann/flarum-pages-generator - 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. clarkwinkelmann/flarum-pages-generator

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

clarkwinkelmann/flarum-pages-generator
======================================

Generate pseudo-static pages from markdown and HTML files for Flarum

0.1(4y ago)8811[1 issues](https://github.com/clarkwinkelmann/flarum-pages-generator/issues)MITPHP

Since Aug 26Pushed 4y ago1 watchersCompare

[ Source](https://github.com/clarkwinkelmann/flarum-pages-generator)[ Packagist](https://packagist.org/packages/clarkwinkelmann/flarum-pages-generator)[ RSS](/packages/clarkwinkelmann-flarum-pages-generator/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Flarum Pages Generator
======================

[](#flarum-pages-generator)

This is not a Flarum extension. This package provides a Flarum extender that you can use in the local `extend.php` to define custom pages.

Install at the root of your Flarum, or as a dependency to one of your custom extensions.

I don't recommend bundling this as a dependency of public extensions.

**This package is in beta! Breaking releases will be released regularly. Make sure to use `^` or `~` semver constraints!**

```
composer require clarkwinkelmann/flarum-pages-generator

```

Usage
-----

[](#usage)

In `extend.php`:

```
return [
    (new \ClarkWinkelmann\PagesGenerator\Pages())
        ->source(__DIR__ . '/pages')
        ->mithrilComponent('ContactForm', "flarum.extensions['acme-basic-form'].ContactForm"),
];
```

`->source(string $path)` defines a source folder to enumerate for pages.

`->mithrilComponent(string $tag, string $import)` optionally defines a mapping of an HTML tag to a Mithril component. The expression will be called with `eval()`.

You can call `source` and `mithrilComponent` multiple times on a single extender instance.

**At the moment, a single extender instance must exist in the Flarum application!**If multiple extensions try to use it, it will break.

Pages
-----

[](#pages)

Pages can be Markdown (`.md`) or HTML (`.html`) and must include a [Yaml front matter](https://github.com/spatie/yaml-front-matter).

Markdown is parsed using the Flarum formatter. Any markdown or bbcode made available by extensions will be available.

The filename without file extension will be the page URL. Subfolders under the source directory are preserved as part of the URL.

Example: basic markdown

```
---
title: About us
---

This is a markdown text with **formatting**.

```

Example: basic HTML

```
---
title: Find Us
---

It's very simple to find us

```

Example: Markdown page with custom component

```
---
title: Contact
---

Use the form to contact us:

```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1765d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0538135c1debcef5602dce7ece027909cc832b7a6284ab9189a19aa8de98d60d?d=identicon)[clarkwinkelmann](/maintainers/clarkwinkelmann)

---

Top Contributors

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

---

Tags

pagesflarum

### Embed Badge

![Health badge](/badges/clarkwinkelmann-flarum-pages-generator/health.svg)

```
[![Health](https://phpackages.com/badges/clarkwinkelmann-flarum-pages-generator/health.svg)](https://phpackages.com/packages/clarkwinkelmann-flarum-pages-generator)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12127.5k](/packages/flarum-lang-russian)[fof/byobu

Well integrated, advanced private discussions.

59112.4k11](/packages/fof-byobu)[fof/gamification

Upvotes and downvotes for your Flarum community

4062.0k7](/packages/fof-gamification)[fof/polls

 A Flarum extension that adds polls to your discussions

25130.2k9](/packages/fof-polls)[fof/user-bio

Add a user bio to user profiles

20102.0k9](/packages/fof-user-bio)[fof/sitemap

Generate a sitemap

1796.4k2](/packages/fof-sitemap)

PHPackages © 2026

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