This is a starter kit for using Contentful and Tailwinds with Jekyll
This example uses a content model called post
. With the fields.
- title (short-text, Entry title)
- slug (default from title)
- body (long-text, markdown)
update the _config.yml
file
- uncomment the page_gen section and update with your contentful data source
- uncomment the contentful secont and update the word "example" with the name of your contentful space
- create a duplicate called
_config-secret.yml
in this file, update the "space" and "access_token" with your contentful creditials. - add your
_config-secret.yml
to the .gitignore file - run the server with
jekyll serve --config _config-secret.yml
- Add your contentful creditials into environment variables
- put
Jekyll Contentful && Jekyll Build
in your build settings
See /_layouts/blog.html
file for a generated template example. More setting examples can be found at Jekyll Datapage Gen
Add a quick loop to your index page with this example using
{% for post in site.data.contentful.YOURSPACENAME.post %}
[{{ post.title}}](/blog/{{ post.slug }})
{% endfor %}