When a book link such as https://livrolog.com/books/B-JJYV-YBQM is shared on iMessage, Slack, Twitter/X, WhatsApp, Facebook, etc., the link preview shows the generic homepage screenshot and the title "LivroLog" instead of the book's cover, title and author.
Steps to reproduce
- Open a book page, e.g.
https://livrolog.com/books/B-JJYV-YBQM
- Paste the URL into iMessage / Slack / WhatsApp / a link-preview debugger
- The preview uses the homepage image and the generic "LivroLog" title
Expected
The preview should show the book cover, the book title (and author), and a book-specific description.
Actual
Every URL serves the same generic homepage Open Graph tags.
Root cause
The webapp is a Quasar/Vue 3 SPA. The static index.html ships hardcoded meta tags pointing at the homepage, and any per-page tags are injected client-side via JavaScript. Social/link-preview crawlers (Facebook, iMessage, Slackbot, Twitterbot, WhatsApp) do not run JavaScript — they read the raw HTML — so they always receive the homepage tags.
Confirmed by fetching the raw HTML of the book URL, which returns:
og:title = LivroLog
og:url = https://livrolog.com
og:image = https://livrolog.com/screenshot-web.jpg
canonical = https://livrolog.com
twitter:card = summary_large_image
No book-specific data is present in the server response.
Proposed fix
Serve per-book Open Graph tags in the server response for /books/{id} so crawlers receive them without executing JS. Given the stack (Laravel 12 + Nginx, Quasar SPA), options in rough order of effort:
- (Recommended) Server-side meta injection for
/books/{id}. A Laravel route/middleware (or Nginx rule) returns the SPA shell with og:*, twitter:*, <title>, description and canonical rewritten per book (cover URL, title, author). Optionally gate on known crawler User-Agents and serve the normal SPA to real users.
- Prerendering for bot UAs (Prerender.io / headless-Chrome prerender service) in front of the SPA.
- Quasar SSR mode for these routes (largest change).
Acceptance criteria
Notes
- Facebook/LinkedIn cache OG data — re-scrape via their debuggers after deploying.
- Ensure book cover images allow hotlinking and are served over HTTPS with the correct content-type.
When a book link such as
https://livrolog.com/books/B-JJYV-YBQMis shared on iMessage, Slack, Twitter/X, WhatsApp, Facebook, etc., the link preview shows the generic homepage screenshot and the title "LivroLog" instead of the book's cover, title and author.Steps to reproduce
https://livrolog.com/books/B-JJYV-YBQMExpected
The preview should show the book cover, the book title (and author), and a book-specific description.
Actual
Every URL serves the same generic homepage Open Graph tags.
Root cause
The webapp is a Quasar/Vue 3 SPA. The static
index.htmlships hardcoded meta tags pointing at the homepage, and any per-page tags are injected client-side via JavaScript. Social/link-preview crawlers (Facebook, iMessage, Slackbot, Twitterbot, WhatsApp) do not run JavaScript — they read the raw HTML — so they always receive the homepage tags.Confirmed by fetching the raw HTML of the book URL, which returns:
No book-specific data is present in the server response.
Proposed fix
Serve per-book Open Graph tags in the server response for
/books/{id}so crawlers receive them without executing JS. Given the stack (Laravel 12 + Nginx, Quasar SPA), options in rough order of effort:/books/{id}. A Laravel route/middleware (or Nginx rule) returns the SPA shell withog:*,twitter:*,<title>,descriptionandcanonicalrewritten per book (cover URL, title, author). Optionally gate on known crawler User-Agents and serve the normal SPA to real users.Acceptance criteria
og:title/twitter:title= book title (+ author).og:urlandcanonical= the book's own URL, not the homepage.og:imageis an absolute HTTPS URL with appropriate dimensions;twitter:card=summary_large_image.Notes