Skip to content

uptheirons78/greatsby

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GreatSby

This project is based on one of my Gatsby Repo: "gatsby-markdown-blog".

step-01

  • Install gatsby-source-contentful;
  • Create .env file and add Gatsby Api Keys;
  • Add the plugin inside "gatsby-config" [with options];
  • Add a fake placeholder image inside Contentful Media to avoid GraphQL issues;
  • Set /pages/blog.js to display all blog posts from Contentful;
  • create a query with "allContentfulBlogPost" and render a list of posts;

step-02

  • Create dynamic pages for each post;
  • Inside "gatsby-node" remove onCreateNode [slugs are defined in Contentful] and modify ".createPages" [see file];
  • Modify Blog Template to render a blog post properly;
  • install @contentful/rich-text-react-renderer and use it inside Blog Template;
  • create 'options' to display images and other assets;

step-03

  • Create "404.js";
  • Add "React-Helmet" for setting up head of our pages;
  • Create the Head components and add it to any pages and blog template;

About

Gatsby Blog built with Markdown and Contentful Api

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published