Debug
Subject: Try _ _ _ _ _ in Sanity
Ship Ahoy Skill Builder!
One of my tiny tasks this week was:
– Try dsg with the
What did I do?
I tried DSG in a new Gatsby site using the hello-world starter
Why did I do it?
How did I do it?
The Steps
-
I opened my _ _ _ _ notebook and found the DSG page
-
I opened my terminal npx gatsby new gatsby-starter-rendering-modes https://github.com/gatsbyjs/gatsby-starter-rendering-modes
-
cd gatsby-starter-rendering-modes/
-
npm start
-
I opened gatsby-node.js in VS Code
-
I deleted the code
-
I set my timer for 1 hour and 36 minutes and 33 seconds.
-
I re-coded the code while looking in my notebook.
-
I ran the code and looked at http://localhost:8000/desk/topping
// gatsby-node.js
const path = require("path");
exports.createPages = ({ actions }) => {
actions.createPage({
path: "/dsg", // expected relative path
component: path.resolve("src/templates/dsg.js"), // this path goes to where the defered page should be expected
defer: true,
});
};
- I changed the code to make it _ _ _ _ _
I guessed was the code from “Creating data relationships”, video 13 of Master Gatsby by The Great and Powerful Wes Bos.
//sanity / schemas / pizza.js
export default {
// Computer Name
name: 'project',
// visible title
title: 'Project',
type: 'document',
icon,
fields: [
{
name: 'name',
title: 'Project Name',
type: 'string',
description: 'Name of the project',
},
{
name: 'toppings',
title: 'Animal, mineral or vegetable',
type: 'array',
of: [{ type: 'reference', to: [{ type: 'topping' }] }],
},
- I ran the code and looked at http://localhost:3333/desk/topping
- I repeated 8.
- I repeated 8.
- I repeated 8.
- I repeated 8.
- I repeated 8.
- I was done.
My useful beliefs are useful to my skill building.
Try creating a useful skill building belief for yourself. 🔧😺👍
Keep your skill-building-submarine afloat this week! 🔧⛵🏴☠️
Ola Vea Gatsby Piraty Captain
P.S.