fix(oembed.sql): surface oembed data for pages
This commit is contained in:
parent
9687509e4a
commit
9420ceee4f
3 changed files with 12 additions and 3 deletions
|
@ -9,6 +9,15 @@ WITH oembed_data AS (
|
|||
p.date AS content_date
|
||||
FROM optimized_posts p
|
||||
UNION ALL
|
||||
SELECT
|
||||
'page' AS type,
|
||||
pa.permalink::TEXT AS url,
|
||||
pa.title AS title,
|
||||
pa.description AS description,
|
||||
COALESCE(NULLIF(pa.metadata->>'open_graph_image', ''), (SELECT metadata->>'open_graph_image' FROM optimized_globals LIMIT 1)) AS image_url,
|
||||
NULL::timestamptz AS content_date
|
||||
FROM optimized_pages pa
|
||||
UNION ALL
|
||||
SELECT
|
||||
'book' AS type,
|
||||
b.url::TEXT AS url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue