Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kmelve/sanity-plugin-timelinejs
Sanity schemas for Timeline.js
https://github.com/kmelve/sanity-plugin-timelinejs
Last synced: 14 days ago
JSON representation
Sanity schemas for Timeline.js
- Host: GitHub
- URL: https://github.com/kmelve/sanity-plugin-timelinejs
- Owner: kmelve
- Created: 2018-04-30T21:45:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-09-01T04:53:25.000Z (about 3 years ago)
- Last Synced: 2024-10-04T20:32:02.175Z (about 1 month ago)
- Language: JavaScript
- Size: 30.3 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-sanity - `sanity-plugin-timelinejs` - This plugin installs schemas for hosting content for Timeline.js. ([Example](https://codesandbox.io/s/5w2xv3moox)) (Plugins)
README
# Sanity Timeline.js schemas
```
sanity install timelinejs
```This plugin install schemas for hosting content for [Timeline.js](https://timeline.knightlab.com/). A simple example frontend can be found at [codesandbox.io](https://codesandbox.io/s/5w2xv3moox).
Simple GROQ formatting in order to get the correct content structure:
```
*[_type == "timeline"][0]{
"title": title{
"media": media{
"url": asset->url,
caption,
credit
},
"text": title{
headline,
"text": text[][0].children[][0].text
}
},
events[]->{
"media": media{
caption,
credit,
"url": image.asset->url
},
start_date,
"text": text{
headline,
"text": text[][0].children[][0].text
}
}
}
```