我正在使用带有 Gridsome 的网站,并使用降价文件向网站提供内容。
我对降价的经验很少。虽然我并不真正了解 md 文件是如何工作的,但我设法通过一些教程让它工作,直到我开始将数组添加到 md 文件中,见下文。
content/home/index.md
---
metaTitle: this is the meta title tag
metaDescription: metadescription
someArray: [alpha, beta, delta] //I tried adding an array like this and it worked fine
imgArray: [{url: "someurl", alt: "some alt", caption: "some caption}, {url: "someurl", alt: "some alt", caption: "some caption}] //this did not work and caused an error
---
我的问题是是否可以在降价文件中添加对象数组?如果是,我该怎么写?非常感谢!