diff --git a/.github/logos/bedrock.svg b/.github/logos/bedrock.svg
new file mode 100644
index 0000000..a2fa925
--- /dev/null
+++ b/.github/logos/bedrock.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/cakephp.svg b/.github/logos/cakephp.svg
new file mode 100644
index 0000000..987bf88
--- /dev/null
+++ b/.github/logos/cakephp.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/codeigniter.svg b/.github/logos/codeigniter.svg
new file mode 100644
index 0000000..12035d7
--- /dev/null
+++ b/.github/logos/codeigniter.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/drupal.svg b/.github/logos/drupal.svg
new file mode 100644
index 0000000..9f47467
--- /dev/null
+++ b/.github/logos/drupal.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/laravel.svg b/.github/logos/laravel.svg
new file mode 100644
index 0000000..15f8c43
--- /dev/null
+++ b/.github/logos/laravel.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/lumen.svg b/.github/logos/lumen.svg
new file mode 100644
index 0000000..0aa876e
--- /dev/null
+++ b/.github/logos/lumen.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/magento.svg b/.github/logos/magento.svg
new file mode 100644
index 0000000..3617048
--- /dev/null
+++ b/.github/logos/magento.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/statamic.svg b/.github/logos/statamic.svg
new file mode 100644
index 0000000..a4b0d16
--- /dev/null
+++ b/.github/logos/statamic.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/symfony.svg b/.github/logos/symfony.svg
new file mode 100644
index 0000000..c3bc7c4
--- /dev/null
+++ b/.github/logos/symfony.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/tempest.svg b/.github/logos/tempest.svg
new file mode 100644
index 0000000..5c1e94e
--- /dev/null
+++ b/.github/logos/tempest.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/typo3.svg b/.github/logos/typo3.svg
new file mode 100644
index 0000000..dd68234
--- /dev/null
+++ b/.github/logos/typo3.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/winter.svg b/.github/logos/winter.svg
new file mode 100644
index 0000000..a685fe8
--- /dev/null
+++ b/.github/logos/winter.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/wordpress.svg b/.github/logos/wordpress.svg
new file mode 100644
index 0000000..cfd0a84
--- /dev/null
+++ b/.github/logos/wordpress.svg
@@ -0,0 +1 @@
+
diff --git a/.github/logos/yii.svg b/.github/logos/yii.svg
new file mode 100644
index 0000000..7d7c77a
--- /dev/null
+++ b/.github/logos/yii.svg
@@ -0,0 +1 @@
+
diff --git a/.github/scripts/readme_logos.py b/.github/scripts/readme_logos.py
new file mode 100644
index 0000000..e3c1ffa
--- /dev/null
+++ b/.github/scripts/readme_logos.py
@@ -0,0 +1,51 @@
+"""Render the README's framework logos from the store's own marks.
+
+The marks under frameworks/ are monochrome by contract, which GitHub would
+draw black and lose on a dark theme. This paints each one in its declared
+colour on a white tile, so the README reads the same in either theme.
+
+Run from the repo root after adding or changing a mark:
+ python3 .github/scripts/readme_logos.py
+"""
+
+import json
+import pathlib
+import re
+import sys
+
+import yaml
+
+ROOT = pathlib.Path(__file__).resolve().parents[2]
+OUT = ROOT / ".github" / "logos"
+
+TILE = """\
+\
+{body}
+"""
+
+
+def render(mark: str, color: str) -> str:
+ root = re.match(r'\s*]*viewBox="([^"]+)"[^>]*>(.*)\s*$', mark, re.S)
+ if not root:
+ sys.exit("mark has no root")
+ return TILE.format(viewbox=root.group(1), color=color, body=root.group(2))
+
+
+def main() -> None:
+ index = json.loads((ROOT / "frameworks" / "index.json").read_text())
+ OUT.mkdir(exist_ok=True)
+ for entry in index["frameworks"]:
+ name = entry["name"]
+ mark = ROOT / "frameworks" / f"{name}.svg"
+ if not mark.exists():
+ sys.exit(f"{name} has no frameworks/{name}.svg, and the README table shows every framework's mark")
+ definition = yaml.safe_load((ROOT / "frameworks" / name / f"{entry['latest']}.yaml").read_text())
+ color = definition.get("color")
+ if not color:
+ sys.exit(f"{name}@{entry['latest']} declares no color:")
+ (OUT / f"{name}.svg").write_text(render(mark.read_text(), color))
+ print(f"wrote .github/logos/{name}.svg")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/README.md b/README.md
index 3aaf97d..0ca2b79 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,32 @@
-# Lerd Framework Store
-
-> The community-driven store of framework definitions that powers
-> [Lerd](https://lerd.sh) — teach Lerd a new PHP framework by
-> editing YAML, no binary release required.
-
-[](https://lerd.sh)
-[](https://lerd.sh/usage/frameworks)
-[](LICENSE)
+
Lerd Framework Store
+
+
+ The community-driven store of framework definitions that powers Lerd.
+ Teach Lerd a new PHP framework by editing YAML, no binary release required.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
When you run `lerd link` on a project, Lerd detects which framework it is and pulls the matching definition from this store — then it knows how to serve it, which workers to run, how to set up its `.env`, how to scaffold it, and how to health-check it. Everything is a versioned YAML file. Add a framework here and every Lerd install can use it within 24 hours, with no new Lerd release and no Go code.
@@ -28,22 +48,22 @@ All of it is data. None of it ships in the binary.
## Available frameworks
-| Framework | Versions | Detection |
-|-----------|----------|-----------|
-| Bedrock | 1 | `web/wp-config.php` file or `web/wp/wp-login.php` file |
-| CakePHP | 5, 4, 3 | `bin/cake` file or `cakephp/cakephp` in composer.json |
-| CodeIgniter | 4, 3 | `spark` file or `codeigniter4/framework` in composer.json |
-| Drupal | 11, 10, 9, 8 | `drupal/core-recommended` or `drupal/core` in composer.json |
-| Laravel | 13, 12, 11, 10, 9, 8, 7, 6 | `artisan` file or `laravel/framework` in composer.json |
-| Lumen | 11, 10, 9, 8, 7, 6 | `laravel/lumen-framework` in composer.json |
-| Magento | 2 | `bin/magento` file or `magento/product-community-edition` in composer.json |
-| Statamic | 6, 5, 4, 3 | `statamic/cms` in composer.json |
-| Symfony | 8, 7, 6, 5, 4 | `symfony.lock` file or `symfony/framework-bundle` in composer.json |
-| Tempest | 3 | `tempest` file or `tempest/framework` in composer.json |
-| TYPO3 | 14, 13, 12, 11, 10 | `typo3/cms-core` in composer.json or `public/typo3` directory |
-| Winter CMS | 1 | `winter/wn-system-module` in composer.json |
-| WordPress | 7, 6, 5 | `wp-login.php` file or `wp-config.php` file |
-| Yii | 2 | `yiisoft/yii2` in composer.json |
+| | Framework | Versions | Detected by |
+|:-:|---|---|---|
+| | **Bedrock** | `1` | `web/wp-config.php` file or `web/wp/wp-login.php` file |
+| | **CakePHP** | `5` `4` `3` | `bin/cake` file or `cakephp/cakephp` in composer.json |
+| | **CodeIgniter** | `4` `3` | `spark` file or `codeigniter4/framework` in composer.json |
+| | **Drupal** | `11` `10` `9` `8` | `drupal/core-recommended` or `drupal/core` in composer.json |
+| | **Laravel** | `13` `12` `11` `10` `9` `8` `7` `6` | `artisan` file or `laravel/framework` in composer.json |
+| | **Lumen** | `11` `10` `9` `8` `7` `6` | `laravel/lumen-framework` in composer.json |
+| | **Magento** | `2` | `bin/magento` file or `magento/product-community-edition` in composer.json |
+| | **Statamic** | `6` `5` `4` `3` | `statamic/cms` in composer.json |
+| | **Symfony** | `8` `7` `6` `5` `4` | `symfony.lock` file or `symfony/framework-bundle` in composer.json |
+| | **Tempest** | `3` | `tempest` file or `tempest/framework` in composer.json |
+| | **TYPO3** | `14` `13` `12` `11` `10` | `typo3/cms-core` in composer.json or `public/typo3` directory |
+| | **Winter CMS** | `1` | `winter/wn-system-module` in composer.json |
+| | **WordPress** | `7` `6` `5` | `wp-login.php` file or `wp-config.php` file |
+| | **Yii** | `2` | `yiisoft/yii2` in composer.json |
Don't see yours? [Add it](#contributing) — that's what this repo is for.
@@ -137,7 +157,7 @@ New frameworks and version bumps are welcome — this store is only as good as t
1. Fork this repo
2. Add or update `frameworks//.yaml`, or `packages/-.yaml` for something a composer package owns (see below)
-3. Optionally add the framework's own mark as `frameworks/.svg` (see below)
+3. Add the framework's own mark as `frameworks/.svg` (see below), then run `python3 .github/scripts/readme_logos.py` to draw it for this README
4. Add or update the entry in `frameworks/index.json` (name, label, versions, latest, detect rules), and list a new package under `packages`
5. Open a pull request
@@ -265,6 +285,8 @@ event handlers and external references, then paints it in the declared colour.
Not a full colour logo, and not a wordmark, which is unreadable at the size this
renders. Take the mark, not the lockup.
+The coloured tiles in this README are not the marks themselves. `.github/scripts/readme_logos.py` paints each one in its declared colour on a white tile, so GitHub shows it in either theme, and writes the result to `.github/logos/`. Run it again whenever a mark or a colour changes.
+
```svg
```
diff --git a/frameworks/bedrock.svg b/frameworks/bedrock.svg
new file mode 100644
index 0000000..b27b0b7
--- /dev/null
+++ b/frameworks/bedrock.svg
@@ -0,0 +1 @@
+
\ No newline at end of file