Skip to content

[#231] Fix page titles and empty og:image in header meta - #239

Merged
vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:header-meta-titles
Oct 1, 2026
Merged

vharseko merged 1 commit into
OpenIdentityPlatform:masterfrom
vharseko:header-meta-titles

Conversation

@vharseko

Copy link
Copy Markdown
Member

Summary

Fixes #231
Fixes #233

Verification

Built the site with bundle exec jekyll build (Ruby 3.1, as in CI) and checked the output:

Page Before After
/blog/2025-12-18-openam-vs-keycloak Openam Vs Keycloak · Open Identity Platform OpenAM vs Keycloak · Open Identity Platform
/blog/2026-07-20-openam-16-1-2-released Openam 16 1 2 Released · Open Identity Platform OpenAM 16.1.2 Released · Open Identity Platform
/forgerock-alternative ForgeRock Alternative & Migration Path — Open Identity Platform · Open Identity Platform ForgeRock Alternative & Migration Path · Open Identity Platform
/ Open Source IAM & SSO unchanged

Not included: canonical: in 33 posts (#236) — pending a decision; the missing openidm-og.png (#232) needs an image.

- Use landing-title for post <title>, og:title and twitter:title instead
  of the slug-derived page.title (Fixes OpenIdentityPlatform#231)
- Drop the duplicated site name from the /forgerock-alternative title
  (Fixes OpenIdentityPlatform#233)
- Treat an empty imageurl as missing in header.html and the BlogPosting
  JSON-LD; remove the empty imageurl from the login/password post

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The title fix is limited to the pages that need it, and the empty-image guard covers both places that render the image.

  • page.collection == "posts" and page.landing-title (_includes/header.html:6) switches only posts to landing-title, so the landing-title in index.html stays out of <title>.
  • The page.imageurl != "" guard is in both og:image consumers: _includes/header.html:4 and the BlogPosting JSON-LD at _includes/structured-data.html:119.

issue (non-blocking): The login/password post's <title>, og:title and twitter:title now show the "Authenticaion" typo.

_posts/2023-02-22-login-password-authentication.md:3-4, _includes/header.html:6

The post has no title:, so header.html:6 now takes its landing-title, "Login and Password Authenticaion". Before this PR the page used Jekyll's slug title, "Login Password Authentication · Open Identity Platform", which is spelled correctly. Now the search-result title and the social card read "Login and Password Authenticaion · Open Identity Platform". This PR already edits that front matter, so the fix fits here.

landing-title: "Login and Password Authentication"
landing-title2: "Login and Password Authentication"

suggestion (non-blocking): Nothing in CI pins the post-title or the empty-og:image fix.

.github/workflows/build.yml:19-30

build.yml runs jekyll build and then htmlproofer --checks Links, which ignores absolute URLs. Neither step reads the <title>, og:title or twitter:title text, or the og:image URL. If the page.collection == "posts" branch were dropped, Openam Vs Keycloak · Open Identity Platform would come back and CI would stay green (reasoned, not run). The only evidence today is the manual build table in the description.

      - name: Check rendered head meta
        run: |
          grep -qF '<title>OpenAM vs Keycloak · Open Identity Platform</title>' _site/blog/2025-12-18-openam-vs-keycloak.html
          if grep -rlE --include='*.html' 'property="og:image" content="[^"]*/assets/img/"' _site; then exit 1; fi

Pin: the first line fails if the posts branch at header.html:6 is removed. The second fails if any page renders og:image as …/assets/img/ again. No page at this head has an empty imageurl, because the only imageurl: '' was removed, so nothing here exercises the != "" guard itself.

@vharseko
vharseko merged commit 0e1f2cb into OpenIdentityPlatform:master Oct 1, 2026
1 check passed
@vharseko
vharseko deleted the header-meta-titles branch October 1, 2026 15:21
vharseko added a commit that referenced this pull request Oct 1, 2026
## Summary

> **Merge after #244** — 20 OpenIDM posts point at `openidm-og.png`,
which #244 adds.

- **Logo strip → OG card (28 posts)** — `imageurl` switched from the
~700×172 `*-logo.png` to the matching 1024×512 `*-og.png`: OpenIDM 12,
OpenDJ 9, OpenAM 6, OpenIG 1.
- **Product posts without an image (21 posts)** — each gets its
product's card: the first entry of `products:`, or the product in the
file name for posts without `products:` (OpenAM JEE agents, OpenIDM
7.0.1 / 7.1.0).
- **General articles (6 posts)** — a new `assets/img/oip-og.png`, built
from `oip-star.png` on a white 1024×512 canvas, for
`stateless-vs-stateful-authentication`, `adaptive-authentication`,
`passwordless-authentication-methods`,
`sso-seamless-authentication-enterprise-client-services`,
`llm-in-access-management` and `how-to-auth-via-esia`.
- **ESIA article title** — `landing-title` / `landing-title2` had the
home page's "Welcome to Open Identity Platform Community" copied into
them; they now use the article's own heading, "Аутентификация через
госуслуги (ЕСИА)". With #239 this also becomes the page `<title>`.

Left to other PRs, as noted in the issue: the OpenICF posts (#244), the
redirect `… copy.md` (#242) and the empty `imageurl: ''` (#239).

Fixes #245

## Verification

Built the site with `bundle exec jekyll build` (Ruby 3.1, as in CI) and
ran the workflow's `htmlproofer` internal-link check: no errors.

`og:image` across the built posts: `openam-og.png` 85, `opendj-og.png`
44, `openig-og.png` 24, `openidm-og.png` 20, `oip-og.png` 6. The rest
are exactly the posts handled elsewhere: 10 `openicf-logo.png` + 3
GitHub avatar (OpenICF, #244) and 1 empty value (#239). On this branch
alone `openidm-og.png` does not exist yet — hence the merge order above.

`git merge-tree` against the branches of #239–#244: no conflicts.

## Preview


![oip-og.png](https://raw.githubusercontent.com/vharseko/OpenIdentityPlatform.org/og-images-for-posts/assets/img/oip-og.png)
vharseko added a commit that referenced this pull request Oct 1, 2026
## Summary

Six OpenIDM posts reference `imageurl: 'openidm-og.png'`, but
`assets/img/openidm-og.png` did not exist, so their `og:image`,
`twitter:image` and `BlogPosting` JSON-LD `image` pointed to a 404:

- `_posts/2024-09-10-openidm-ad-idm.md`
- `_posts/2024-11-13-openidm-can-your-idm-play-chess.md`
- `_posts/2025-05-13-openidm-two-way-ad-opendj.md`
- `_posts/2025-07-16-openidm-6-3-0-released.md`
- `_posts/2025-11-05-openidm-getting-started.md`
- `_posts/2026-02-05-openidm-7-0-2-released.md`

This PR adds the image, generated from `openidm-logo.png` in the same
format as `openam-og.png`, `opendj-og.png` and `openig-og.png`: 1024×512
RGBA, opaque white background, the logo scaled to 921 px wide and
centered (content box x 52–972, centre 512, 255.5 — the same as the
other three). No post or template changes are needed for these six
posts.

It also adds `assets/img/openicf-og.png`, the nice-to-have from the
issue, generated the same way from `openicf-logo.png`, and points all 13
OpenICF posts at it: 10 used the bare `openicf-logo.png`, and 3
(`1.8.0`, `2.0.1`, `2.0.3`) had no `imageurl` and fell back to the
GitHub avatar.

The empty `imageurl: ''` from the issue is fixed in #239.

Fixes #232

## Verification

Built the site with `bundle exec jekyll build` (Ruby 3.1, as in CI) and
ran the workflow's `htmlproofer` internal-link check: no errors. OpenIDM
posts render `og:image` / JSON-LD `image` as
`…/assets/img/openidm-og.png`, OpenICF posts as
`…/assets/img/openicf-og.png`; no rendered page references
`openicf-logo.png` as its image any more. This branch merges cleanly
with #239–#243 (checked with `git merge-tree`), including #243, which
removes `canonical:` two lines below in the same OpenICF posts.

## Preview


![openidm-og.png](https://raw.githubusercontent.com/vharseko/OpenIdentityPlatform.org/openidm-og-image/assets/img/openidm-og.png)


![openicf-og.png](https://raw.githubusercontent.com/vharseko/OpenIdentityPlatform.org/openidm-og-image/assets/img/openicf-og.png)
vharseko added a commit that referenced this pull request Oct 2, 2026
…are links (#242)

## Summary

Cleanups from #238:

- **Unused data file** — deleted `_data/blogposts.yml` (778 lines).
Nothing references it: no template, page or `migrate-to-posts.py`; it
predates the move to `_posts/` (#227).
- **Stray redirect post** — deleted
`_posts/2024-06-20-How-To-Protect-Web-Services-with-OpenIG copy.md`, a
`layout: redirect` post pointing at
`/blog/2025-11-05-openig-getting-started`. It was not in the issue, but
it was visible: an empty card "How To Protect Web Services With Openig
copy" on `/blog/page10/`, and a `noindex` URL listed in `sitemap.xml`.
Nothing links to its `…-OpenIG-copy` URL; the original
`2024-06-20-How-To-Protect-Web-Services-with-OpenIG` article is kept.
- **File name with a space** — renamed
`_posts/2026-02-04-opendj-5-0-3-released .md` to
`2026-02-04-opendj-5-0-3-released.md`. The URL stays
`/blog/2026-02-04-opendj-5-0-3-released`.
- **Share links** — `_includes/share-buttons.html` now uses
`https://twitter.com/intent/tweet?url=…` instead of the deprecated
`http://twitter.com/home?status=…`, and
`https://www.facebook.com/sharer/sharer.php?u=…` instead of
`http://…/share.php`; the shared URL is URL-encoded on all four buttons,
LinkedIn included. Every share window opens with `window.open(url,
'_blank', 'noopener')`, so the social site gets no `window.opener` back
to this tab.
- **Pinterest button** — it was wrapped in `{% if page.image %}`, which
no page sets, so it never rendered (and it passed an empty `url=`). It
now renders when the page has a non-empty `imageurl` and passes the page
URL, `/assets/img/<imageurl>` and the title (`landing-title` or
`title`), all URL-encoded, to
`https://www.pinterest.com/pin/create/button/`. The six OpenIDM posts
point at `openidm-og.png`, which #244 adds; until it is merged their
Pinterest image, like their `og:image`, is a 404.

The fourth item of the issue (empty `imageurl: ''`) is fixed in #239.

Fixes #238

## Verification

Built the site with `bundle exec jekyll build` (Ruby 3.1, as in CI) and
ran the same `htmlproofer` internal-link check as the workflow: no
errors.

- Compared with a build of `master`, the only removed output file is
`blog/2024-06-20-How-To-Protect-Web-Services-with-OpenIG-copy.html`;
`blog/2026-02-04-opendj-5-0-3-released.html` keeps its path.
- `sitemap.xml` and the blog pages no longer mention the `-copy` URL.
- Share buttons render e.g.
`https://twitter.com/intent/tweet?url=https%3A%2F%2Fwww.openidentityplatform.org%2Fblog%2F2025-12-18-openam-vs-keycloak`
and
`https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.openidentityplatform.org%2Fblog%2F2025-12-18-openam-vs-keycloak&title=&summary=&source=`.
- All 513 rendered `window.open(…)` calls (135 pages × 3 buttons + 108
Pinterest buttons) pass `'_blank', 'noopener'`.
- The Pinterest button renders on 108 of the 135 pages with share
buttons; the other 27 have no `imageurl`, so there is no image to pin.
Example:
`https://www.pinterest.com/pin/create/button/?url=https%3A%2F%2Fwww.openidentityplatform.org%2Fblog%2F2025-12-18-openam-vs-keycloak&media=https%3A%2F%2Fwww.openidentityplatform.org%2Fassets%2Fimg%2Fopenam-og.png&description=OpenAM+vs+Keycloak`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Site name duplicated in the page title of /forgerock-alternative Blog post <title> and og:title are built from the file slug (144 posts)

2 participants