Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ php bin/generate-llms-full

- `bin/generate-feed` rewrites `public/feed.xml` from the published posts in the database.
- `bin/sitemap` rewrites `public/sitemap.xml` from the published posts in the database.
- `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`).
- `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.

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

Expand All @@ -75,4 +75,4 @@ None of this is wired into an automated deploy pipeline in this repository — t
- Logs to `log/generate-packages.log`.
- **`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.
- **`bin/sitemap`** (`public/sitemap.xml`) — **manual only**, no cron. Same trigger as `bin/generate-feed`: re-run after any change to `articles_cleaned.json`.
- **`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).
- **`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.
2 changes: 1 addition & 1 deletion bin/generate-llms-full
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $llmsFullGenerator = $container->get(LlmsFullGenerator::class);
$count = $llmsFullGenerator->write();

printf(
"Done. %d article%s written to %s%s",
"Done. %d section%s written to %s%s",
$count,
$count === 1 ? '' : 's',
$llmsFullGenerator->getOutputFile(),
Expand Down
14 changes: 11 additions & 3 deletions config/autoload/local.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@ $databases = [
],
];

/**
* Exposed twice below, deliberately: as the `application` config key that PHP reads, and as
* the `app` Twig global that templates read. `url` is the single application URL - the artifact
* generators take it from config, the JSON-LD templates build absolute URLs from `app.url`.
*/
$app = [
'baseUrl' => $baseUrl,
'meta' => [
'url' => $baseUrl,
'meta' => [
'title' => 'Dotkernel | Headless Platform for modern web application',
'description' => 'Dotkernel is a Headless Platform for building modern web applications '
. 'using a collection of applications (skeletons).',
'image' => $baseUrl . '/uploads/opengraph/dotkernel.png',
'type' => 'website',
'siteName' => 'Dotkernel Light',
'locale' => 'en_US',
'url' => $baseUrl,
'twitterCard' => 'summary_large_image',
'twitterSite' => '@dotkernel',
],
Expand Down Expand Up @@ -62,6 +66,8 @@ return [
'llms' => [
'sourceDir' => realpath(__DIR__ . '/../../public/md-articles'),
'outputFile' => realpath(__DIR__ . '/../../public/llms-full.txt'),
// Markdown versions of the static pages, appended after the articles. Optional.
'pagesDir' => realpath(__DIR__ . '/../../public/md-pages'),
],
/**
* Credentials for `bin/generate-packages`. Reading public repositories needs no token
Expand All @@ -80,6 +86,8 @@ return [
// and is routed in Light\App\RoutesDelegator. Re-adding it here registers the path twice.
'routes' => [
'page' => [
// Linked from the footer on every page, so this route must stay registered.
'about' => 'about',
'contact' => 'contact',
'api' => 'api',
'admin' => 'admin',
Expand Down
2 changes: 1 addition & 1 deletion public/css/app.css

Large diffs are not rendered by default.

Loading