-
Notifications
You must be signed in to change notification settings - Fork 118
/
site-metadata.js
157 lines (145 loc) · 5.98 KB
/
site-metadata.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
const {
coreFrameworks: coreRenderers,
communityFrameworks: communityRenderers,
featureGroups,
} = require('./src/content/docs/frameworks');
const versionData = require('./src/util/version-data');
const isDeployPreview = process.env.CONTEXT === 'deploy-preview';
const homepageUrl = isDeployPreview ? process.env.DEPLOY_PRIME_URL : 'https://storybook.js.org';
const gitHubOrg = `https://github.com/storybookjs`;
const npmApiBase = `https://api.npmjs.org/downloads/point/last-month`;
const docsUrl = `${homepageUrl}/docs`;
const essentialsBase = '/docs/react/essentials';
const contributeUrl = `${docsUrl}/react/contribute/how-to-contribute`;
const siteMetadata = {
...versionData,
title: 'Storybook: Frontend workshop for UI development',
description: `Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and documentation. It’s open source and free.`,
ogImage: '/images/social/open-graph.jpg',
ogImageAddons: '/images/social/og-addons.jpg',
ogImageHome: '/images/social/og-home.jpg',
siteUrl: homepageUrl, // Used for gatsby-plugin-sitemap
googleSiteVerification: '_OxxMv1o0aRcxPfieLW0BRsMxxIzkpA9Vv6O0AB5xg0',
contributorCount: 1440,
algoliaDocSearchConfig: {
appId: '6L6UWBTLCK',
indexName: 'storybook-js',
},
allRenderers: [...coreRenderers, ...communityRenderers],
coreRenderers,
communityRenderers,
defaultRenderer: 'react',
// These "framework" properties are used by other SB sites, so we need to keep them here for now
coreFrameworks: coreRenderers,
communityFrameworks: communityRenderers,
defaultFramework: 'react',
featureGroups,
urls: {
gitHubOrg,
homepageUrl,
docsUrl,
contributeUrl,
npmApiBase,
gitHub: {
repo: `${gitHubOrg}/storybook`,
frontpage: `${gitHubOrg}/frontpage`,
issues: `${gitHubOrg}/storybook/issues`,
releases: `${gitHubOrg}/storybook/releases`,
contributors: `${gitHubOrg}/storybook/graphs/contributors`,
brand: `${gitHubOrg}/press`,
},
npm: `https://www.npmjs.com/package/@storybook/react`,
openCollective: `https://opencollective.com/storybook`,
npmApi: {
react: `${npmApiBase}/@storybook/react`,
reactNative: `${npmApiBase}/@storybook/react-native`,
vue: `${npmApiBase}/@storybook/vue`,
angular: `${npmApiBase}/@storybook/angular`,
ember: `${npmApiBase}/@storybook/ember`,
html: `${npmApiBase}/@storybook/html`,
svelte: `${npmApiBase}/@storybook/svelte`,
mithril: `${npmApiBase}/@storybook/mithril`,
riot: `${npmApiBase}/@storybook/riot`,
polymer: `${npmApiBase}/@storybook/polymer`,
preact: `${npmApiBase}/@storybook/preact`,
},
// Navigation
home: homepageUrl,
showcase: `https://storybook.js.org/showcase/`,
docs: '/docs/',
tutorials: `https://storybook.js.org/tutorials/`,
integrations: `/integrations/`,
addons: `/addons/`,
recipes: `/recipes/`,
community: `/community/`,
useCases: `/use-cases/`,
releases: '/releases/',
support: `/support/`,
telemetry: `/telemetry/`,
team: `/team/`,
addonsApi: '/docs/react/addons/addons-api/',
// This slug is also used to exclude some pages from the sitemap in gatsby-config.js
installDocsPageSlug:
versionData.version >= 8 ? '/docs/get-started/' : '/docs/get-started/install/',
// Social
blog: `https://storybook.js.org/blog`,
medium: `https://medium.com/storybookjs`,
twitter: `https://twitter.com/storybookjs`,
chat: `https://discord.gg/storybook`,
youtube: `https://www.youtube.com/channel/UCr7Quur3eIyA_oe8FNYexfg`,
// Brand
brand: `${gitHubOrg}/brand`,
designSystem: `${gitHubOrg}/design-system`,
badge: `${gitHubOrg}/brand/tree/master/badge`,
presentation: `${gitHubOrg}/brand/tree/master/presentation`,
video: `${gitHubOrg}/brand/tree/master/video`,
// Official addons
officialAddons: {
docs: '/docs/addons/',
install: '/docs/addons/install-addons/',
create: '/docs/addons/writing-addons/',
publish: '/docs/addons/integration-catalog/',
controls: `${essentialsBase}/controls`,
actions: `${essentialsBase}/actions`,
viewport: `${essentialsBase}/viewport`,
backgrounds: `${essentialsBase}/backgrounds`,
toolbars: `${essentialsBase}/toolbars-and-globals`,
knobs: `${gitHubOrg}/storybook/tree/master/addons/knobs`,
source: `${gitHubOrg}/storybook/tree/master/addons/storysource`,
info: `${gitHubOrg}/storybook/tree/master/addons/info`,
notes: `${gitHubOrg}/storybook/tree/master/addons/notes`,
storyshots: `${gitHubOrg}/storybook/tree/master/addons/storyshots`,
accessibility: `${gitHubOrg}/storybook/tree/master/addons/a11y`,
console: `${gitHubOrg}/storybook-addon-console`,
links: `${gitHubOrg}/storybook/tree/master/addons/links`,
},
},
};
siteMetadata.urls.navCommunityLinks = [
{ title: 'Blog', href: siteMetadata.urls.blog, isGatsby: false },
{ title: 'Releases', href: siteMetadata.urls.releases, isGatsby: true },
{ title: 'Get involved', href: siteMetadata.urls.community, isGatsby: true },
{ title: 'Use cases', href: siteMetadata.urls.useCases, isGatsby: true },
{ title: 'Support', href: siteMetadata.urls.support, isGatsby: true },
{ title: 'Team', href: siteMetadata.urls.team, isGatsby: true },
];
siteMetadata.urls.navLinks = [
{ title: 'Showcase', href: siteMetadata.urls.showcase, isGatsby: false },
{ title: 'Docs', href: siteMetadata.urls.docsUrl, isGatsby: false },
{ title: 'Tutorials', href: siteMetadata.urls.tutorials, isGatsby: false },
{ title: 'Integrations', href: siteMetadata.urls.integrations, isGatsby: true },
...siteMetadata.urls.navCommunityLinks,
];
siteMetadata.urls.addonsLearnLinks = [
{
title: 'How to install addons',
icon: 'book',
to: siteMetadata.urls.officialAddons.install,
},
{
title: 'Create an addon',
icon: 'edit',
to: siteMetadata.urls.officialAddons.create,
},
];
module.exports = siteMetadata;