Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gatsby Theme Onegeo
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OneGeo Suite
Libs
Gatsby Theme Onegeo
Commits
8ba81833
Commit
8ba81833
authored
1 year ago
by
Julien MARGAIL
Browse files
Options
Downloads
Patches
Plain Diff
fix feed rss (abstract + thumbnail) (v0.10.0)
parent
902f349d
No related branches found
Branches containing commit
Tags
0.10.0
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+1
-0
1 addition, 0 deletions
CHANGELOG.md
gatsby-config.js
+20
-3
20 additions, 3 deletions
gatsby-config.js
with
21 additions
and
3 deletions
CHANGELOG.md
+
1
−
0
View file @
8ba81833
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
gatsby-config.js
+
20
−
3
View file @
8ba81833
...
...
@@ -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
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment