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
3c030205
Commit
3c030205
authored
1 year ago
by
Julien MARGAIL
Browse files
Options
Downloads
Plain Diff
Merge branch 'feat/news' into 'main'
add date and badge See merge request onegeo-suite/libs/gatsby-theme-onegeo!5
parents
51bc7a35
650eefcb
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/pages/news.tsx
+8
-0
8 additions, 0 deletions
src/pages/news.tsx
with
8 additions
and
0 deletions
src/pages/news.tsx
+
8
−
0
View file @
3c030205
import
React
,
{
ReactElement
,
useState
}
from
"
react
"
import
{
graphql
,
PageProps
}
from
"
gatsby
"
import
{
IGatsbyImageData
}
from
"
gatsby-plugin-image
"
import
dayjs
from
"
dayjs
"
import
{
Layout
,
Content
,
CardList
}
from
"
@onegeo-suite/gatsby-theme-onegeo
"
...
...
@@ -38,6 +39,8 @@ function News({ data }: PageProps<DataProps>): ReactElement {
description
:
dt
.
abstract
||
dt
.
content
,
image
:
dt
.
image
?.
imageFile
,
url
:
"
/news/
"
+
dt
.
slug
,
category
:
dt
.
categories
,
date
:
dayjs
(
dt
.
date_published
).
format
(
"
DD/MM/YYYY
"
),
}
})
...
...
@@ -95,6 +98,11 @@ export const query = graphql`
publicURL
}
}
categories {
id
name
label
}
}
}
}
...
...
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