├── README.md ├── .gitignore ├── src ├── favicon.png ├── components │ └── README.md ├── layouts │ ├── README.md │ └── Default.vue ├── pages │ ├── README.md │ ├── About.vue │ └── Index.vue ├── templates │ └── README.md └── main.js ├── sandbox.config.json ├── static └── README.md ├── package.json ├── gridsome.server.js └── gridsome.config.js /README.md: -------------------------------------------------------------------------------- 1 | # Gridsome starter for codesandbox 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .cache 3 | .DS_Store 4 | src/.temp 5 | node_modules 6 | dist 7 | .env 8 | .env.* 9 | -------------------------------------------------------------------------------- /src/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mr-dev-dragon/gridsome-starter-codesandbox/HEAD/src/favicon.png -------------------------------------------------------------------------------- /sandbox.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "infiniteLoopProtection": true, 3 | "hardReloadOnChange": false, 4 | "view": "browser", 5 | "server": "true", 6 | "container": { 7 | "port": 8080 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/components/README.md: -------------------------------------------------------------------------------- 1 | Add components that will be imported to Pages and Layouts to this folder. 2 | Learn more about components here: https://gridsome.org/docs/components/ 3 | 4 | You can delete this file. 5 | -------------------------------------------------------------------------------- /static/README.md: -------------------------------------------------------------------------------- 1 | Add static files here. Files in this directory will be copied directly to `dist` folder during build. For example, /static/robots.txt will be located at https://yoursite.com/robots.txt. 2 | 3 | This file should be deleted. -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "scripts": { 4 | "develop": "gridsome develop", 5 | "explore": "gridsome explore", 6 | "build": "gridsome build" 7 | }, 8 | "dependencies": { 9 | "gridsome": "^0.7.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/layouts/README.md: -------------------------------------------------------------------------------- 1 | Layout components are used to wrap pages and templates. Layouts should contain components like headers, footers or sidebars that will be used across the site. 2 | 3 | Learn more about Layouts: https://gridsome.org/docs/layouts/ 4 | 5 | You can delete this file. 6 | -------------------------------------------------------------------------------- /src/pages/README.md: -------------------------------------------------------------------------------- 1 | Pages are usually used for normal pages or for listing items from a GraphQL collection. 2 | Add .vue files here to create pages. For example **About.vue** will be **site.com/about**. 3 | Learn more about pages: https://gridsome.org/docs/pages/ 4 | 5 | You can delete this file. 6 | -------------------------------------------------------------------------------- /src/templates/README.md: -------------------------------------------------------------------------------- 1 | Templates for **GraphQL collections** should be added here. 2 | To create a template for a collection called `WordPressPost` 3 | create a file named `WordPressPost.vue` in this folder. 4 | 5 | Learn more: https://gridsome.org/docs/templates/ 6 | 7 | You can delete this file. 8 | -------------------------------------------------------------------------------- /gridsome.server.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | module.exports = function (api) { 4 | api.loadSource(({ addCollection }) => { 5 | // Use the Data Store API here: https://gridsome.org/docs/data-store-api/ 6 | }) 7 | 8 | api.createPages(({ createPage }) => { 9 | // Use the Pages API here: https://gridsome.org/docs/pages-api/ 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /gridsome.config.js: -------------------------------------------------------------------------------- 1 | // This is where project configuration and plugin options are located. 2 | // Learn more: https://gridsome.org/docs/config 3 | 4 | // Changes here require a server restart. 5 | // To restart press CTRL + C in terminal and run `gridsome develop` 6 | 7 | module.exports = { 8 | siteName: 'Gridsome', 9 | plugins: [] 10 | } 11 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // This is the main.js file. Import global CSS and scripts here. 2 | // The Client API can be used here. Learn more: gridsome.org/docs/client-api 3 | 4 | import DefaultLayout from '~/layouts/Default.vue' 5 | 6 | export default function (Vue, { router, head, isClient }) { 7 | // Set default layout as a global component 8 | Vue.component('Layout', DefaultLayout) 9 | } 10 | -------------------------------------------------------------------------------- /src/pages/About.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 15 | -------------------------------------------------------------------------------- /src/pages/Index.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 28 | 29 | 34 | -------------------------------------------------------------------------------- /src/layouts/Default.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | query { 18 | metadata { 19 | siteName 20 | } 21 | } 22 | 23 | 24 | 51 | --------------------------------------------------------------------------------