vue.js - 如何配置 Gridsome 以使用 API 将数据插入静态站点模板生成数千个产品页面?

标签 vue.js templates seo static-site gridsome

我希望利用静态站点生成器框架与 Vue 一起使用以生成带有产品信息的静态页面,但是我们需要为每个页面创建数千个具有不同产品的页面,我们希望进行 api 调用以检索数据和然后用每个产品的不同数据和图片填写我们的模板,希望它提高我们对部分#的搜索结果并带来更多业务,Gridsome这样做吗?如果是这样,我该如何设置此功能?或者 Gridsome 不是最好的选择吗?我愿意探索不同的框架,但我们仍然希望使用 Vue 进行 UI 开发,尽管我们只对纯 html、css 和 vanilla javascript 持开放态度。
谢谢

最佳答案

是的。 Gridsome 旨在准确处理您的情况。来自 gridsome.org :
您可以调用 API 来检索数据:

Gridsome makes it painlessly easy to build Jamstack websites using data from multiple sources such as Content API's, Headless CMSs, and other web services.


提高搜索结果对 SEO 友好:

Gridsome sites load as static HTML before they hydrate into fully Vue.js-powered SPAs. This makes it possible for search engines to be able to crawl content and give better SEO ranking, and still have all the power of Vue.js.


一个好的下一步可能是查看各种 starter templates在 Gridsome 网站上。

关于vue.js - 如何配置 Gridsome 以使用 API 将数据插入静态站点模板生成数千个产品页面?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63140415/

相关文章:

c++ - 了解可变参数模板函数中的点

c++ - 函数模板参数和采用 'auto' 的函数参数有什么区别?

SEO在源代码中发出红色字符? > 为什么?语法高亮?浏览器源代码?

javascript - Vue Composition Reactive 属性未在组件中更新

php - Laravel:vue 组件不渲染

javascript - 如何像 React 中的 {...props} 一样解构 Vue 中的 props?

wordpress - WooCommerce Wordpress Yoast Hatom Rich Snippets 解决方案?

javascript - VueJs - 循环中的动态类

c++ - 怎么可能写 f( *this, std::forward<Args>(args)... ) 而 f 只用 F f 声明;

image - seo如何优化一堆相似的图片?