gridsome

Import Vue-Navigation-Bar in Gridsome

扶醉桌前 提交于 2021-02-08 10:38:50
问题 I'm trying to import https://github.com/johndatserakis/vue-navigation-bar into my Gridsome project but I receive the error: 'Module not found: Error: Empty Dependency (no request.)' I've tried changing the way I import the component with no luck. I've also tried yarn install in case there was anything missing. <template> <vue-navigation-bar :options="navbarOptions" /> </template> <script> export default { name: 'VueNavBar', components: { VueNavBar: () => import('vue-navigation-bar'), data ()

Gridsome build failing with TypeError

≡放荡痞女 提交于 2020-08-10 23:43:46
问题 I'm encountering some trouble running Gridsome build on a starter project template. The site runs on localhost with no problem. I tried npm install gridsome@latest to update or install any missing packages. Gridsome build gives me the following error: Could not generate HTML for "/work/": TypeError: Cannot read property 'console' of null at Object. (C:\Users\Micah\Desktop\my-gridsome-site\node_modules\vue-meta\dist\vue-meta.common.js:103:23) at Module._compile (internal/modules/cjs/loader.js

Sending the data-api-key value for Snipcart w/vue meta in gridsome

99封情书 提交于 2020-03-03 09:12:14
问题 I am doing an eCommerce site w/gridsome & snipcart. The problem is when I test snipcart's checkout it fails. The snipcart documentation says to add a line <div id="snipcart" data-api-key="myapikey" hidden></div> which I added to default.vue file in my layouts folder. But when I inspect element after build I see in DOM <div id="snipcart" class="snipcart"></div> The data-api-key attribute is not rendered. Utilizing vue-meta to inject api-key-data into markup in main.js per snipcart's [example]

Sending the data-api-key value for Snipcart w/vue meta in gridsome

怎甘沉沦 提交于 2020-03-03 09:09:12
问题 I am doing an eCommerce site w/gridsome & snipcart. The problem is when I test snipcart's checkout it fails. The snipcart documentation says to add a line <div id="snipcart" data-api-key="myapikey" hidden></div> which I added to default.vue file in my layouts folder. But when I inspect element after build I see in DOM <div id="snipcart" class="snipcart"></div> The data-api-key attribute is not rendered. Utilizing vue-meta to inject api-key-data into markup in main.js per snipcart's [example]

Gridsome + Wordpress source plugin - How to add archive routes by month and year

只愿长相守 提交于 2020-01-16 08:43:45
问题 I have to add an archive widget to a blog based on Gridsome (Wordpress as data source). Standard feature like this one: I fetched posts with static query: query Home($page: Int) { allWordPressPost(page: $page) { pageInfo { totalPages currentPage } edges { node { date(format: "YYYY-MM-DD") id title path } } } } Next on monthed hook, i grouped data by year and month to such output: { "2019": { "10": [ { "date": "2019-10-29", "node": { "date": "2019-10-29", "id": "145", "title": "Aspernatur