Skip to content
Snippets Groups Projects
Commit 8ba81833 authored by Julien MARGAIL's avatar Julien MARGAIL
Browse files

fix feed rss (abstract + thumbnail) (v0.10.0)

parent 902f349d
No related branches found
Tags 0.10.0
No related merge requests found
......@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Maps promote map by tag "TOP"
- Data manage default thumbnail (dataset, organisation, Explorer default image)
- Header prepare Button for direct login & register
- RSS Feed truncate content & add thumbnail url
### Changed
......
......@@ -106,21 +106,32 @@ module.exports = {
"news",
].join("/")
const thumbnail =
item.image?.imageFile?.publicURL
const thumbnailUrl = thumbnail
? site.siteMetadata.siteUrl + thumbnail
: null
return Object.assign(
{},
{
title: item.title,
description: item.content,
description:
(
item.abstract || item.content
).slice(0, 250) + "...",
date: item.date_published,
url: baseUrl + "/" + item.slug,
guid: baseUrl + "/" + item.slug,
enclosure: {
url: thumbnailUrl,
},
category: "news",
}
)
})
},
query: `
{
{
directus {
news(
filter: { status: { _eq: "published" } }
......@@ -132,6 +143,12 @@ module.exports = {
abstract
title
date_published
image {
id
imageFile {
publicURL
}
}
categories {
id
name
......@@ -139,7 +156,7 @@ module.exports = {
}
}
}
}
}
`,
output: "/feed.rss",
title: "Onegeo Suite Portal RSS Feed",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment