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 @@ -75,7 +75,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` rewrites `public/llms.txt`, the short curated index (one line per article, grouped by category) — built from the published posts in the database, grouped by category (known categories first, in a fixed order, then any remaining categories by post count) and sorted alphabetically by title within each category. Requires the `llms.sourceDir` / `llms.indexFile` keys in `config/autoload/local.php` (see `local.php.dist`); the `llms.pagesDir` key is optional, same as for `bin/generate-llms-full` below.
- `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.
- `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` file — the markdown versions of the static pages. 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 four have no ordering dependency on each other, only on step 3 being done first.

Expand Down Expand Up @@ -118,4 +118,4 @@ Note: this changes the article's URL (`/{categorySlug}/{slug}/`), so the old URL
- 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 `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`** (`public/llms-full.txt`) — **manual only**, no cron. Re-run after adding/editing a `.md` file under `public/md-articles/` or the static-page `.md` files at the `public/` root, or after removing/renaming a draft's `.md` file (it doesn't check `post_status`, see step 1). The static-page `.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 config/autoload/local.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ return [
'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'),
'pagesDir' => realpath(__DIR__ . '/../../public'),
// Short, categorized index of the blog, written by bin/generate-llms.
'indexFile' => realpath(__DIR__ . '/../../public/llms.txt'),
],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/App/src/Fixture/PostLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ public function load(ObjectManager $manager): void
}

$status = match ($articleData['post_status']) {
'publish' => PostStatusEnum::Published,
'private' => PostStatusEnum::Private,
'archived' => PostStatusEnum::Archived,
default => PostStatusEnum::Draft,
'published' => PostStatusEnum::Published,
'private' => PostStatusEnum::Private,
'archived' => PostStatusEnum::Archived,
default => PostStatusEnum::Draft,
};

$rawDate = $articleData['post_date'] ?? '';
Expand Down
Loading