我正在尝试使用GatsbyJS创建一个博客。我遵循以下教程 https://www.gatsbyjs.org/docs/recipes/#optimizing-and-querying-images-in-post-frontmatter-with-gatsby-image 博客包含标题、特色图片和文本。 MDX-file结构如下所示。 ---
title: My First Post
featuredImage: ./corgi.png
---
Post content... 而且,gatsby-node.js文件中的代码如下 exports.createPages = async ({
我有盖茨比的应用程序。
当我在本地构建它时,它工作得很好,但是当我尝试将它部署到Netlify或Gitlab时,我会得到以下错误消息: Netlify错误消息:
8:44:20 PM: npm WARN config tmp This setting is no longer used. npm stores temporary files in a special
8:44:20 PM: npm WARN config location in the cache, and they are managed by
8:44:20 PM: npm WARN config [`cacac
我一直在学习本教程,但普通人不可能编写50行代码来添加图像:
import React from "react"
import { graphql } from "gatsby"
import Img from "gatsby-image"
export default ({ data }) => {
// Set up the array of image data and `media` keys.
// You can have as many entries as you'd like.
const sourc
GraphQL Error Field "tags" must not have a selection since type "[String]" has no subfields.
我正在做一个GatsbyJS回购。根据,GatsbyJS会自动从我的标记文件中推断模式,这将隐式地定义类型,并使用tags: ["sayings", "wisdom"]之类的行。当然,GatsbyJS应该推断出数组、列表或类似的类型。为什么GatsbyJS要推断类型为字符串呢?
我正在用gatsbyjs构建一个博客,其中博客文章是.md文件,并且静态地呈现为HTML。我已经成功地对title, date, and published数据进行了样式化,但是在---下的任何东西都是新罗马的。我到处寻找MDXRenderer的内联样式标签,但是没有运气。这是支持的,如果不是,我如何设计我的身体内容?谢谢!
index.md
---
title: Third Post!
date: 2020-09-10
published: true
---
This is my third post!
How my achievements mock me! -William Shak