-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgridsome.config.js
117 lines (115 loc) · 4.02 KB
/
gridsome.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// This is where project configuration and plugin options are located.
// Learn more: https://gridsome.org/docs/config
// Changes here require a server restart.
// To restart press CTRL + C in terminal and run `gridsome develop`
module.exports = {
siteName: 'Gridsomeでいこう!',
siteUrl: 'https://gogridsome.work/',
metadata: {
siteName: 'Gridsomeでいこう!',
siteUrl: 'https://quirky-noyce-a7e03d.netlify.app/',
siteDescription: 'かなり思い付きで立ち上げましたが、時代はJamstackへ…という流れも感じつつ。軽いノリで「Gridsome」やってみっか!というスタンスで始めています。',
pageUrl: 'index.html',
pageTitle: 'Gridsomeでいこう!',
siteOgImage: 'https://quirky-noyce-a7e03d.netlify.app/og.png',
siteOgType: 'article',
},
plugins: [
{
use: '@gridsome/vue-remark',
options: {
typeName: 'StepPost', // 必須。GraphQL上で扱う型定義
baseDir: './content/step', // 記事となるmarkdownファイルを置くディレクトリ
pathPrefix: '/step', // URLになるパス。必須ではない。
template: './src/templates/StepPost.vue' // 記事ページのVueコンポーネントファイルの指定
}
},
{
use: '@gridsome/vue-remark',
options: {
typeName: 'ShopifyPost', // 必須。GraphQL上で扱う型定義
baseDir: './content/shopify', // 記事となるmarkdownファイルを置くディレクトリ
pathPrefix: '/shopify', // URLになるパス。必須ではない。
template: './src/templates/ShopifyPost.vue' // 記事ページのVueコンポーネントファイルの指定
}
},
{
use: '@gridsome/vue-remark',
options: {
typeName: 'ReactPost', // 必須。GraphQL上で扱う型定義
baseDir: './content/react', // 記事となるmarkdownファイルを置くディレクトリ
pathPrefix: '/react', // URLになるパス。必須ではない。
template: './src/templates/ReactPost.vue' // 記事ページのVueコンポーネントファイルの指定
}
},
{
use: '@gridsome/vue-remark',
options: {
typeName: 'PressPost', // 必須。GraphQL上で扱う型定義
baseDir: './content/press', // 記事となるmarkdownファイルを置くディレクトリ
pathPrefix: '/press', // URLになるパス。必須ではない。
template: './src/templates/PressPost.vue' // 記事ページのVueコンポーネントファイルの指定
}
},
{
use: '@gridsome/plugin-google-analytics',
options: {
id: 'UA-180466873-1'
}
},
{
use: '@gridsome/source-wordpress',
options: {
// baseUrl: 'http://gogogridsome.backdrop.jp/', // url
baseUrl: 'https://gridsome.work/', // url
apiBase: 'wp-json',
typeName: 'WordPress',
perPage: 10,
concurrent: 1,
customEndpoints: [
{
typeName: "DiaryPost", //カスタム投稿タイプ用
route: "/wp/v2/diary?_embed", //カスタム投稿タイプ用のURL
normalize: true,
},
]
}
},
{
use: '@gridsome/plugin-sitemap',
options: {
exclude: [],
config: {
'/about/*': {
changefreq: 'weekly',
priority: 0.5
},
'/step/*': {
changefreq: 'weekly',
priority: 0.5
},
'/blog/*': {
changefreq: 'weekly',
priority: 0.5
},
'/shopify/*': {
changefreq: 'weekly',
priority: 0.5
},
'/react/*': {
changefreq: 'weekly',
priority: 0.5
},
'/press/*': {
changefreq: 'weekly',
priority: 0.5
},
}
}
}
],
templates: {
WordPressPost: "/wp/:id/", //出力するURLの指定
DiaryPost: "/blog/:id/" //出力するURLの指定
},
}