src/pagesis a static route.
src/pagesis a dynamic route.
Gridsome is a Jamstack framework. Jamstack lets you build fast and secure sites and apps delivered by pre-rendering files and serving them directly from a CDN, removing the requirement to manage or run web servers.
Gridsome generates static html that hydrates into a Vue SPA once loaded in the browser. This means you can build both static websites & dynamic apps with Gridsome.
Gridsome builds one
.html file and one
.json file for every page. After first page load it only uses the
.json files to prefetch and load data for the next pages. It also builds a
.js bundle for each page that needs it (code splitting).
Gridsome adds a
57kB min gzip JS bundle size by default.(vue.js, vue-router, vue-meta and some for image lazy loading).
yarn global add @gridsome/cli
npm install --global @gridsome/cli
gridsome create my-gridsome-siteto create a new project
cd my-gridsome-siteto open folder
gridsome developto start local dev server at
.vuecomponents in the
src/pagesdirectory to create page routes.
gridsome buildto generate static files in a
👋 Stay in the loop. Subscribe to Gridsome newsletter!
VuePress. Another static site generator for Vue.js. It uses local markdown files for content and is perfect for documentation sites. It is possible to build anything in VuePress and Markdown (Like a blog f.ex).
Nuxt. A Universal Vue.js Framework for server-side rendered (SSR) apps and websites. It also has a static site generator feature, but the main focus is SSR.
Gatsby.js Gridsome is highly inspired by Gatsby.js (React.js based), which collects data sources and generates a static site from it. Gridsome is an alternative for Gatsby.js.