2019-02-04 19:45:00 +01:00
|
|
|
const container = require('markdown-it-container');
|
2018-09-28 10:20:08 +02:00
|
|
|
|
2019-02-04 19:45:00 +01:00
|
|
|
const ogprefix = 'og: http://ogp.me/ns#';
|
|
|
|
const title = 'Strapi Documentation';
|
2019-03-07 14:16:22 +01:00
|
|
|
const description = 'The headless CMS developers love.';
|
2019-02-04 19:45:00 +01:00
|
|
|
const color = '#2F80ED';
|
|
|
|
const author = 'Strapi';
|
|
|
|
const url = 'https://strapi.io/documentation/';
|
2018-10-09 14:35:02 +02:00
|
|
|
|
2018-08-28 11:23:59 +02:00
|
|
|
module.exports = {
|
2018-10-09 14:35:02 +02:00
|
|
|
head: [
|
|
|
|
['link', { rel: 'icon', href: `/rocket.png` }],
|
|
|
|
['meta', { name: 'theme-color', content: color }],
|
|
|
|
['meta', { prefix: ogprefix, property: 'og:title', content: title }],
|
|
|
|
['meta', { prefix: ogprefix, property: 'twitter:title', content: title }],
|
|
|
|
['meta', { prefix: ogprefix, property: 'og:type', content: 'article' }],
|
|
|
|
['meta', { prefix: ogprefix, property: 'og:url', content: url }],
|
2019-02-04 19:45:00 +01:00
|
|
|
[
|
|
|
|
'meta',
|
|
|
|
{ prefix: ogprefix, property: 'og:description', content: description },
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'meta',
|
|
|
|
{ prefix: ogprefix, property: 'og:image', content: `${url}rocket.png` },
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'meta',
|
|
|
|
{ prefix: ogprefix, property: 'og:article:author', content: author },
|
|
|
|
],
|
2018-10-09 14:35:02 +02:00
|
|
|
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
|
2019-02-04 19:45:00 +01:00
|
|
|
[
|
|
|
|
'meta',
|
|
|
|
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black' },
|
|
|
|
],
|
2018-10-09 14:35:02 +02:00
|
|
|
// ['link', { rel: 'apple-touch-icon', href: `/assets/apple-touch-icon.png` }],
|
|
|
|
// ['link', { rel: 'mask-icon', href: '/assets/safari-pinned-tab.svg', color: color }],
|
|
|
|
['meta', { name: 'msapplication-TileImage', content: '/rocket.png' }],
|
|
|
|
['meta', { name: 'msapplication-TileColor', content: color }],
|
|
|
|
],
|
2018-09-28 10:20:08 +02:00
|
|
|
markdown: {
|
|
|
|
anchor: {
|
2018-09-28 11:04:40 +02:00
|
|
|
permalink: true,
|
2018-09-28 10:20:08 +02:00
|
|
|
},
|
|
|
|
config: md => {
|
2019-02-04 19:45:00 +01:00
|
|
|
md.use(require('markdown-it-decorate'))
|
2018-09-28 10:20:08 +02:00
|
|
|
.use(...createContainer('intro'))
|
2019-02-06 16:59:33 +01:00
|
|
|
.use(...createContainer('windows'))
|
|
|
|
.use(...createContainer('ubuntu'))
|
|
|
|
.use(...createContainer('mac'))
|
2019-02-04 19:45:00 +01:00
|
|
|
.use(...createContainer('note'));
|
2019-05-06 16:17:16 +02:00
|
|
|
const vuepressTabs = require('vuepress-tabs');
|
|
|
|
vuepressTabs(md);
|
2019-02-04 19:45:00 +01:00
|
|
|
},
|
2018-09-28 10:20:08 +02:00
|
|
|
},
|
2018-10-09 14:35:02 +02:00
|
|
|
title,
|
|
|
|
description,
|
2018-10-05 17:24:17 +02:00
|
|
|
base: '/documentation/',
|
2018-10-19 10:58:30 +02:00
|
|
|
ga: 'UA-54313258-1',
|
2018-08-28 11:23:59 +02:00
|
|
|
themeConfig: {
|
2019-05-06 16:17:16 +02:00
|
|
|
versions: [
|
2019-05-07 17:00:37 +02:00
|
|
|
['Version 3.0.0-beta.x', '/3.0.0-beta.x/'],
|
2019-06-01 08:51:42 -07:00
|
|
|
['Version 3.0.0-alpha.x', '/3.0.0-alpha.x/'],
|
2019-05-06 16:17:16 +02:00
|
|
|
['Version 1.x.x', '/1.x.x/'],
|
|
|
|
],
|
2018-09-28 11:04:07 +02:00
|
|
|
repo: 'strapi/strapi',
|
2018-10-28 08:15:31 +01:00
|
|
|
website: 'https://strapi.io',
|
2019-07-03 10:35:43 +02:00
|
|
|
slack: 'https://slack.strapi.io',
|
|
|
|
blog: 'https://blog.strapi.io',
|
2018-09-28 11:04:07 +02:00
|
|
|
docsDir: 'docs',
|
2019-04-24 16:27:43 +02:00
|
|
|
algolia: {
|
|
|
|
apiKey: 'a93451de224096fb34471c8b8b049de7',
|
2019-07-02 15:09:59 +02:00
|
|
|
indexName: 'strapi',
|
2019-04-24 16:27:43 +02:00
|
|
|
},
|
2018-09-28 11:04:07 +02:00
|
|
|
editLinks: true,
|
|
|
|
editLinkText: 'Improve this page',
|
2018-09-28 10:20:08 +02:00
|
|
|
serviceWorker: true,
|
2019-05-06 16:17:16 +02:00
|
|
|
hiddenLinks: [
|
2019-05-07 17:00:37 +02:00
|
|
|
'/3.0.0-beta.x/cli/CLI.html',
|
|
|
|
'/3.0.0-beta.x/api-reference/reference.html',
|
2019-05-06 16:17:16 +02:00
|
|
|
],
|
2018-09-28 10:20:08 +02:00
|
|
|
sidebar: {
|
2019-05-07 17:00:37 +02:00
|
|
|
'/3.0.0-beta.x/': [
|
2019-05-06 16:17:16 +02:00
|
|
|
{
|
|
|
|
collapsable: false,
|
|
|
|
title: '🚀 Getting started',
|
|
|
|
children: [
|
2019-05-07 17:00:37 +02:00
|
|
|
'/3.0.0-beta.x/getting-started/introduction',
|
|
|
|
'/3.0.0-beta.x/getting-started/install-requirements',
|
|
|
|
'/3.0.0-beta.x/getting-started/quick-start',
|
|
|
|
'/3.0.0-beta.x/getting-started/quick-start-tutorial',
|
2019-05-06 16:17:16 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
collapsable: true,
|
|
|
|
title: '💡 Guides',
|
|
|
|
children: [
|
2019-05-07 17:00:37 +02:00
|
|
|
'/3.0.0-beta.x/concepts/concepts',
|
|
|
|
'/3.0.0-beta.x/guides/api-documentation',
|
|
|
|
'/3.0.0-beta.x/guides/authentication',
|
|
|
|
'/3.0.0-beta.x/configurations/configurations',
|
|
|
|
'/3.0.0-beta.x/guides/controllers',
|
|
|
|
'/3.0.0-beta.x/guides/databases',
|
|
|
|
'/3.0.0-beta.x/guides/deployment',
|
|
|
|
'/3.0.0-beta.x/guides/email',
|
|
|
|
'/3.0.0-beta.x/guides/upload',
|
|
|
|
'/3.0.0-beta.x/guides/filters',
|
|
|
|
'/3.0.0-beta.x/guides/graphql',
|
|
|
|
'/3.0.0-beta.x/guides/i18n',
|
|
|
|
'/3.0.0-beta.x/guides/models',
|
|
|
|
'/3.0.0-beta.x/guides/policies',
|
|
|
|
'/3.0.0-beta.x/guides/public-assets',
|
|
|
|
'/3.0.0-beta.x/guides/requests',
|
|
|
|
'/3.0.0-beta.x/guides/responses',
|
|
|
|
'/3.0.0-beta.x/guides/routing',
|
|
|
|
'/3.0.0-beta.x/guides/services',
|
2019-05-16 21:37:45 +02:00
|
|
|
'/3.0.0-beta.x/guides/queries',
|
2019-05-07 17:00:37 +02:00
|
|
|
'/3.0.0-beta.x/guides/webhooks',
|
2019-05-06 16:17:16 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
collapsable: true,
|
|
|
|
title: '⚙️️ Advanced',
|
|
|
|
children: [
|
2019-05-07 17:00:37 +02:00
|
|
|
'/3.0.0-beta.x/advanced/customize-admin',
|
|
|
|
'/3.0.0-beta.x/advanced/hooks',
|
|
|
|
'/3.0.0-beta.x/advanced/logging',
|
|
|
|
'/3.0.0-beta.x/advanced/middlewares',
|
2019-05-29 09:06:01 -07:00
|
|
|
'/3.0.0-beta.x/advanced/usage-information',
|
2019-05-06 16:17:16 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
collapsable: true,
|
2019-05-16 18:12:56 +02:00
|
|
|
title: '🔌 Local plugins',
|
2019-05-06 16:17:16 +02:00
|
|
|
children: [
|
2019-05-07 17:00:37 +02:00
|
|
|
'/3.0.0-beta.x/plugin-development/quick-start',
|
|
|
|
'/3.0.0-beta.x/plugin-development/plugin-architecture',
|
|
|
|
'/3.0.0-beta.x/plugin-development/backend-development',
|
|
|
|
'/3.0.0-beta.x/plugin-development/frontend-development',
|
2019-05-06 16:17:16 +02:00
|
|
|
|
2019-05-07 17:00:37 +02:00
|
|
|
// '/3.0.0-beta.x/plugin-development/ui-components', TODO: Add this file
|
2019-05-06 16:17:16 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
collapsable: true,
|
|
|
|
title: '💻 Command Line Interface',
|
2019-05-07 17:00:37 +02:00
|
|
|
children: ['/3.0.0-beta.x/cli/CLI'],
|
2019-05-06 16:17:16 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
collapsable: true,
|
|
|
|
title: '🏗 API Reference',
|
2019-05-07 17:00:37 +02:00
|
|
|
children: ['/3.0.0-beta.x/api-reference/reference'],
|
2019-05-06 16:17:16 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
collapsable: false,
|
|
|
|
title: '📚 Resources',
|
|
|
|
children: [
|
|
|
|
[
|
|
|
|
'https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md',
|
|
|
|
'Contributing guide',
|
|
|
|
],
|
2019-05-07 17:00:37 +02:00
|
|
|
'/3.0.0-beta.x/migration-guide/',
|
2019-05-06 16:17:16 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
2019-06-01 08:51:42 -07:00
|
|
|
'/3.0.0-alpha.x/': [
|
2018-09-28 10:20:08 +02:00
|
|
|
{
|
|
|
|
collapsable: false,
|
2018-10-28 08:15:31 +01:00
|
|
|
title: '🚀 Getting started',
|
2018-09-28 10:20:08 +02:00
|
|
|
children: [
|
2019-06-01 08:51:42 -07:00
|
|
|
'/3.0.0-alpha.x/getting-started/introduction',
|
|
|
|
'/3.0.0-alpha.x/getting-started/install-requirements',
|
|
|
|
'/3.0.0-alpha.x/getting-started/quick-start',
|
|
|
|
'/3.0.0-alpha.x/getting-started/quick-start-tutorial',
|
2019-02-04 19:45:00 +01:00
|
|
|
],
|
|
|
|
},
|
2018-09-28 10:20:08 +02:00
|
|
|
{
|
2018-10-28 08:15:31 +01:00
|
|
|
collapsable: true,
|
|
|
|
title: '💡 Guides',
|
2018-10-13 19:07:25 +01:00
|
|
|
children: [
|
2019-06-01 08:51:42 -07:00
|
|
|
'/3.0.0-alpha.x/concepts/concepts',
|
|
|
|
'/3.0.0-alpha.x/guides/api-documentation',
|
|
|
|
'/3.0.0-alpha.x/guides/authentication',
|
|
|
|
'/3.0.0-alpha.x/configurations/configurations',
|
|
|
|
'/3.0.0-alpha.x/guides/controllers',
|
|
|
|
'/3.0.0-alpha.x/guides/databases',
|
|
|
|
'/3.0.0-alpha.x/guides/deployment',
|
|
|
|
'/3.0.0-alpha.x/guides/email',
|
|
|
|
'/3.0.0-alpha.x/guides/upload',
|
|
|
|
'/3.0.0-alpha.x/guides/filters',
|
|
|
|
'/3.0.0-alpha.x/guides/graphql',
|
|
|
|
'/3.0.0-alpha.x/guides/i18n',
|
|
|
|
'/3.0.0-alpha.x/guides/models',
|
|
|
|
'/3.0.0-alpha.x/guides/policies',
|
|
|
|
'/3.0.0-alpha.x/guides/public-assets',
|
|
|
|
'/3.0.0-alpha.x/guides/requests',
|
|
|
|
'/3.0.0-alpha.x/guides/responses',
|
|
|
|
'/3.0.0-alpha.x/guides/routing',
|
|
|
|
'/3.0.0-alpha.x/guides/services',
|
|
|
|
'/3.0.0-alpha.x/guides/webhooks',
|
2018-10-03 14:30:06 +02:00
|
|
|
],
|
2018-09-28 10:20:08 +02:00
|
|
|
},
|
2018-10-03 14:30:06 +02:00
|
|
|
{
|
2018-10-28 08:15:31 +01:00
|
|
|
collapsable: true,
|
|
|
|
title: '⚙️️ Advanced',
|
2018-10-03 14:30:06 +02:00
|
|
|
children: [
|
2019-06-01 08:51:42 -07:00
|
|
|
'/3.0.0-alpha.x/advanced/customize-admin',
|
|
|
|
'/3.0.0-alpha.x/advanced/hooks',
|
|
|
|
'/3.0.0-alpha.x/advanced/logging',
|
|
|
|
'/3.0.0-alpha.x/advanced/middlewares',
|
|
|
|
'/3.0.0-alpha.x/advanced/usage-information',
|
2018-10-03 14:30:06 +02:00
|
|
|
],
|
|
|
|
},
|
2018-10-28 08:15:31 +01:00
|
|
|
{
|
|
|
|
collapsable: true,
|
|
|
|
title: '🔌 Plugin Development',
|
|
|
|
children: [
|
2019-06-01 08:51:42 -07:00
|
|
|
'/3.0.0-alpha.x/plugin-development/quick-start',
|
|
|
|
'/3.0.0-alpha.x/plugin-development/plugin-architecture',
|
|
|
|
'/3.0.0-alpha.x/plugin-development/backend-development',
|
|
|
|
'/3.0.0-alpha.x/plugin-development/frontend-development',
|
|
|
|
'/3.0.0-alpha.x/plugin-development/frontend-use-cases',
|
|
|
|
'/3.0.0-alpha.x/plugin-development/utils',
|
|
|
|
// '/3.0.0-alpha.x/plugin-development/ui-components', TODO: Add this file
|
2018-10-28 08:15:31 +01:00
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
collapsable: true,
|
|
|
|
title: '💻 Command Line Interface',
|
2019-06-01 08:51:42 -07:00
|
|
|
children: ['/3.0.0-alpha.x/cli/CLI'],
|
2018-10-28 08:15:31 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
collapsable: true,
|
|
|
|
title: '🏗 API Reference',
|
2019-06-01 08:51:42 -07:00
|
|
|
children: ['/3.0.0-alpha.x/api-reference/reference'],
|
2018-10-28 08:15:31 +01:00
|
|
|
},
|
2018-10-03 14:30:06 +02:00
|
|
|
{
|
|
|
|
collapsable: false,
|
2018-10-28 08:15:31 +01:00
|
|
|
title: '📚 Resources',
|
2018-10-03 14:30:06 +02:00
|
|
|
children: [
|
2019-02-04 19:45:00 +01:00
|
|
|
[
|
|
|
|
'https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md',
|
|
|
|
'Contributing guide',
|
|
|
|
],
|
2019-06-01 08:51:42 -07:00
|
|
|
'/3.0.0-alpha.x/migration-guide/',
|
|
|
|
'/3.0.0-alpha.x/articles/',
|
2018-10-03 14:30:06 +02:00
|
|
|
],
|
|
|
|
},
|
2018-09-28 10:20:08 +02:00
|
|
|
],
|
2018-09-28 11:04:07 +02:00
|
|
|
'/1.x.x/': [
|
|
|
|
{
|
|
|
|
collapsable: false,
|
|
|
|
title: 'UsefulLinks',
|
|
|
|
children: [
|
|
|
|
['/1.x.x/', 'Introduction'],
|
|
|
|
['https://strapi.io', 'Strapi Website'],
|
|
|
|
['https://github.com/strapi/strapi', 'GitHub Repository'],
|
2019-02-04 19:45:00 +01:00
|
|
|
[
|
|
|
|
'https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md',
|
|
|
|
'Contribution Guide',
|
|
|
|
],
|
2018-09-28 11:04:07 +02:00
|
|
|
],
|
|
|
|
},
|
|
|
|
'/1.x.x/admin.md',
|
|
|
|
'/1.x.x/configuration.md',
|
|
|
|
'/1.x.x/email.md',
|
|
|
|
'/1.x.x/introduction.md',
|
|
|
|
'/1.x.x/queries.md',
|
|
|
|
'/1.x.x/response.md',
|
|
|
|
'/1.x.x/sessions.md',
|
|
|
|
'/1.x.x/testing.md',
|
|
|
|
'/1.x.x/views.md',
|
|
|
|
'/1.x.x/blueprints.md',
|
|
|
|
'/1.x.x/context.md',
|
|
|
|
'/1.x.x/graphql.md',
|
|
|
|
'/1.x.x/logging.md',
|
|
|
|
'/1.x.x/router.md',
|
|
|
|
'/1.x.x/upload.md',
|
|
|
|
'/1.x.x/cli.md',
|
|
|
|
'/1.x.x/customization.md',
|
|
|
|
'/1.x.x/internationalization.md',
|
|
|
|
'/1.x.x/models.md',
|
|
|
|
'/1.x.x/request.md',
|
|
|
|
'/1.x.x/services.md',
|
|
|
|
'/1.x.x/users.md',
|
|
|
|
],
|
2018-09-28 10:20:08 +02:00
|
|
|
},
|
2018-08-28 11:23:59 +02:00
|
|
|
},
|
2019-02-04 19:45:00 +01:00
|
|
|
};
|
2018-09-28 10:20:08 +02:00
|
|
|
|
|
|
|
function createContainer(className) {
|
2019-02-04 19:45:00 +01:00
|
|
|
return [
|
|
|
|
container,
|
|
|
|
className,
|
|
|
|
{
|
|
|
|
render(tokens, idx) {
|
|
|
|
const token = tokens[idx];
|
|
|
|
if (token.nesting === 1) {
|
|
|
|
return `<div class="${className} custom-block">\n`;
|
|
|
|
} else {
|
|
|
|
return `</div>\n`;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
];
|
2018-09-28 10:20:08 +02:00
|
|
|
}
|