Back to lessons

Hosting Operations

Find Pages Missing og:title

You need to list generated HTML pages without og:title metadata.

Command

find public -name '*.html' -print | while read -r f; do grep -qi 'property="og:title"' "$f" || echo "$f"; done

What changed

Nothing changes. The command checks each HTML file for og:title metadata.

Danger

safe

When to use it

Use before launch, after changing social preview templates, or when link previews look wrong.

When not to use it

Do not use it to validate image sizes or preview rendering; it only checks og:title presence.

Undo or recovery

No undo needed because this command is read-only.

Expected output

A list of HTML files missing property="og:title".

demo script

Disposable terminal steps

  1. grep -Rni --include='*.html' 'property="og:title"' public
  2. find public -name '*.html' -print | while read -r f; do grep -qi 'property="og:title"' "$f" || echo "$f"; done

simulated output

What it looks like

disposable vessel
::fixture-ready::
$ grep -Rni --include='*.html' 'property="og:title"' public
public/blog/post.html:5:
public/index.html:6:
::exit-code::0
$ find public -name '*.html' -print | while read -r f; do grep -qi 'property="og:title"' "$f" || echo "$f"; done
public/about.html
public/draft.html
::exit-code::0

YouTube Short

Find missing social titles.

Scan built HTML for og:title so shared links do not fall back to weak defaults.

LinkedIn hook

Social previews often fail because one template missed Open Graph tags.

Question: Do you audit Open Graph tags before sharing a new page?

experiments

A/B tests to run

Metric: click_rate

A: Social preview failed.

B: Find missing og:title.