Category : gatsby

I finished to write a small blog application using Gatsby and React. Everything works fine when I try it locally. So I proceed with gatsby build and deploy the build folder into Netlify. However after the deployment the content of some pf the pages is not shown despite locally everything works fine. Description of the ..

Read more

I have a sticky header made in React/Gatsby, it shows only after you scroll down for a bit. It works but the header pops up really abruptly so I tried to animate it. The problem is I’m trying to use CSS keyframes using the insertRule document property and hosting platforms like Netlify don’t have access ..

Read more

I am getting the following error for my website. NavBar.js import { Link } from "gatsby" import React from "react" import styled from ‘styled-components’ import {FaBars} from ‘react-icons/fa’ import { menuData } from ‘../data/MenuData’ const NavBar = () => { return ( <Nav> <NavLink to="/">DemoW</NavLink> <Bars /> <NavMenu> {menuData.map((item, index) =>( <NavLink to={item.link} key={index}> {item.title} ..

Read more

I’ve called this function in my gatsby-node.js file. createPage({ path: `/article/`, component: path.resolve(`./src/pages/article.js`), // The context is passed as props to the component as well // as into the component’s GraphQL query. context: { craftercmsData }, }) class IndexPage extends React.Component { constructor(crafterCmsData) { //how do I access my context data } render = () ..

Read more

I am retrieving data from a REST API using axios and I need to send the data to the page so it can be written on the html. In gatsby-node.js I have: const axios = require(‘axios’) const get = axios.get(‘https://cv-page.prismic.io/api/v1/documents/search?ref=YDNpXBUAAMmV9aOD#format=json’); async function getPrismicData(){ const data = await get; return getExperiences(data.data) } function getExperiences(data) { var ..

Read more