Skip to content

Commit 80041fb

Browse files
committed
added md controls, llms-full, cleaned config
Signed-off-by: bidi <bidi@apidemia.com>
1 parent 1b8433d commit 80041fb

202 files changed

Lines changed: 6181 additions & 1696 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ php bin/generate-llms-full
5858

5959
- `bin/generate-feed` rewrites `public/feed.xml` from the published posts in the database.
6060
- `bin/sitemap` rewrites `public/sitemap.xml` from the published posts in the database.
61-
- `bin/generate-llms-full` rewrites `public/llms-full.txt` by concatenating `public/md-articles/index.md` and every other `public/md-articles/*/*.md` file, sorted by path. Requires the `llms.sourceDir` / `llms.outputFile` keys in `config/autoload/local.php` (see `local.php.dist`).
61+
- `bin/generate-llms-full` rewrites `public/llms-full.txt` by concatenating `public/md-articles/index.md` and every other `public/md-articles/*/*.md` file, sorted by path, then appending each `public/md-pages/*.md` file — the markdown versions of the static pages — labelled with a `md-pages/` prefix in the section header. Requires the `llms.sourceDir` / `llms.outputFile` keys in `config/autoload/local.php` (see `local.php.dist`); the `llms.pagesDir` key is optional, and omitting it leaves the page sections out.
6262

6363
These three have no ordering dependency on each other, only on step 3 being done first.
6464

@@ -75,4 +75,4 @@ None of this is wired into an automated deploy pipeline in this repository — t
7575
- Logs to `log/generate-packages.log`.
7676
- **`bin/generate-feed`** (RSS, `public/feed.xml`) — **manual only**, no cron. Run it as part of the publish flow in step 4, right after `bin/doctrine-fixtures`/`bin/create-uploads-dir`, whenever an article is added, edited, or its `post_status` changes.
7777
- **`bin/sitemap`** (`public/sitemap.xml`) — **manual only**, no cron. Same trigger as `bin/generate-feed`: re-run after any change to `articles_cleaned.json`.
78-
- **`bin/generate-llms-full`** (`public/llms-full.txt`) — **manual only**, no cron. Re-run after adding/editing a `.md` file under `public/md-articles/`, or after removing/renaming a draft's `.md` file (it doesn't check `post_status`, see step 1).
78+
- **`bin/generate-llms-full`** (`public/llms-full.txt`) — **manual only**, no cron. Re-run after adding/editing a `.md` file under `public/md-articles/` or `public/md-pages/`, or after removing/renaming a draft's `.md` file (it doesn't check `post_status`, see step 1). The `public/md-pages/*.md` files are hand-maintained alongside the templates in `src/Page/templates/page/` — editing a page template means updating its `.md` and re-running this.

bin/generate-llms-full

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $llmsFullGenerator = $container->get(LlmsFullGenerator::class);
1515
$count = $llmsFullGenerator->write();
1616

1717
printf(
18-
"Done. %d article%s written to %s%s",
18+
"Done. %d section%s written to %s%s",
1919
$count,
2020
$count === 1 ? '' : 's',
2121
$llmsFullGenerator->getOutputFile(),

config/autoload/local.php.dist

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@ $databases = [
2222
],
2323
];
2424

25+
/**
26+
* Exposed twice below, deliberately: as the `application` config key that PHP reads, and as
27+
* the `app` Twig global that templates read. `url` is the single application URL - the artifact
28+
* generators take it from config, the JSON-LD templates build absolute URLs from `app.url`.
29+
*/
2530
$app = [
26-
'baseUrl' => $baseUrl,
27-
'meta' => [
31+
'url' => $baseUrl,
32+
'meta' => [
2833
'title' => 'Dotkernel | Headless Platform for modern web application',
2934
'description' => 'Dotkernel is a Headless Platform for building modern web applications '
3035
. 'using a collection of applications (skeletons).',
3136
'image' => $baseUrl . '/uploads/opengraph/dotkernel.png',
3237
'type' => 'website',
3338
'siteName' => 'Dotkernel Light',
3439
'locale' => 'en_US',
35-
'url' => $baseUrl,
3640
'twitterCard' => 'summary_large_image',
3741
'twitterSite' => '@dotkernel',
3842
],
@@ -62,6 +66,8 @@ return [
6266
'llms' => [
6367
'sourceDir' => realpath(__DIR__ . '/../../public/md-articles'),
6468
'outputFile' => realpath(__DIR__ . '/../../public/llms-full.txt'),
69+
// Markdown versions of the static pages, appended after the articles. Optional.
70+
'pagesDir' => realpath(__DIR__ . '/../../public/md-pages'),
6571
],
6672
/**
6773
* Credentials for `bin/generate-packages`. Reading public repositories needs no token

public/css/app.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)