github happytodev/blogr v2.8.0
2.8.0 — titles, descriptions and the series pages

latest releases: v2.9.3, v2.9.2, v2.9.1...
one day ago

Blogr 2.8.0

Titles, meta descriptions and the series pages — plus a test suite that finally
runs what it was given.

Titles (#366)

<title> was the entity title and nothing else: AF-01 · day 11, Amber Fossils. Every page of a blog
read as an internal reference in a tab, a search result or a shared link, and an article said nothing
about the series it belongs to. SEOHelper::forBlogPost() existed to build those titles and was never
called — the controller computed its own SEO array.

// config/blogr.php
'seo' => ['title_pattern' => '{title} — {site}'],

Placeholders: {title}, {site}, {series}, {category}. The pattern is walked token by token, so an
empty placeholder takes its separator with it — "AF-01 — My Blog", never "AF-01 — — My Blog" — and a
title that legitimately contains a separator (AF-01 · day 11) is left alone. An editor's seo_title
still wins; {title} restores the old bare titles.

Before upgrading: {site} is blogr.seo.site_name, whose demo value is "The blog". Set it, or every
title will end with "— The blog".

Descriptions (#367)

Without seo_description, the meta description was the first 160 characters of the body — markdown
included, because strip_tags() removes HTML, not markdown:

**Provenance.** frameworkheroes · 7a32a883 … ## Histoire

The body now goes through the markdown converter before being flattened, and the chain is
seo_description → excerpt → tldr → body. excerpt was not in $fillable, so no import or form could
ever set it; it is now. Same treatment for series and CMS pages.

Series pages (#368, #369, #370, #371)

  • One description. series-list repeated the title, the description and the count that the page
    header had already printed. The component takes a showHeader prop; the series page passes false.
  • Paragraphs survive. The description is markdown typed in a textarea (1 705 characters, 10 newlines,
    4 blank lines on the artwork series) and was printed in a single <p>, where HTML collapses the
    whitespace. Rendered as markdown in the header, in the list and in the article's box.
  • A teaser, not the whole text. Every post of a series reprinted the entire series description; the
    article box now shows 200 characters and leaves the description to the series page.
  • A way back. The series title in that box is a link, the article carries a breadcrumb
    (Blog › series › article) and the page declares a BreadcrumbList — which it did not have at all.

Tests

Fifteen regression files were named regression_<issue>_<what>.php; PHPUnit only collects *Test.php, so
Pest skipped them silently — 45 tests and 112 assertions, written for real bugs (#274, #278, #279, #283,
#319, #321, #338, #339, #340, #342, #344, #345, #347, #348). Renamed to the directory's convention, all 45
pass. The suite goes from 1497 to 1566 tests.

Upgrade

composer require happytodev/blogr:^2.8.0
php artisan view:clear && php artisan optimize:clear

No migration. Sites that publish resources/views/vendor/blogr/blog/show.blade.php or
layouts/blog.blade.php must update those copies (or drop them) to get the series box and the breadcrumb.

Don't miss a new blogr release

NewReleases is sending notifications on new releases.