DEV Community

Loftie Ellis
Loftie Ellis

Posted on • Originally published at loftie.com

2 1

Gridsome 0.7 Released!

Gridsome is a new static site generator based on the JAMstack, and it is the underlying software powering my blog at https://loftie.com/. If you have ever heard of Gatsby, well Gridsome is the vue.js equivalent, and they just released a new version with some cool improvements.

New Schema API

This is be biggest improvement for me. Gridsome used to simply infer the GraphQL schema from the data passed on startup, which works well if all the data is present, but I started to run into issues where some nested entries (eg tags) were not correctly discovered.

With the Schema API you can now define your fields yourself:

api.loadSource(({ addSchemaTypes }) => {
  addSchemaTypes(`
    type Post implements Node {
      title: String
    }
  `)
})

You dont have to specify all the fields either, Gridsome can still automatically infer the fields that you know will be present and only specify the deeper ones. To do that simply pass the @infer extension.

type Post implements Node @infer {
    title: String
}

Other Changes

  • Vue Remark plugin - Lets you add vue components to markdown files-
  • New template configuration - More consistent way to specify template routes
  • Custom App.vue - Useful if you want for example a <transition> component around the <router-view>- And some more, see the full list here

Check out Gridsome for yourself at https://gridsome.org/

Top comments (0)

SurveyJS custom survey software

JavaScript UI Libraries for Surveys and Forms

SurveyJS lets you build a JSON-based form management system that integrates with any backend, giving you full control over your data and no user limits. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay