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
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "8.0.0",
|
"version": "8.0.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "8.0.0",
|
"version": "8.0.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minisearch": "^7.1.2",
|
"minisearch": "^7.1.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "8.0.0",
|
"version": "8.0.1",
|
||||||
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
|
@ -9,6 +9,15 @@ WITH oembed_data AS (
|
||||||
p.date AS content_date
|
p.date AS content_date
|
||||||
FROM optimized_posts p
|
FROM optimized_posts p
|
||||||
UNION ALL
|
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
|
SELECT
|
||||||
'book' AS type,
|
'book' AS type,
|
||||||
b.url::TEXT AS url,
|
b.url::TEXT AS url,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue