Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,7 @@ dist
# IDE
.idea
.vscode


# Auto generated files
docs/.vuepress/config.js
19 changes: 17 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,26 @@ The core team will review your pull request and will either merge it, request ch
cd docs
```

6. Make sure all dependencies are installed, then run the server:
6. Make sure all dependencies are installed

```bash
yarn && yarn dev
yarn
```

7. Start the documentation server

```bash
# Launch the full documentation
yarn dev

# Launch only the developer docs
yarn dev:developer

# Launch only the user docs
yarn dev:user
```



#### Writing
We can't provide you specific procedures with step-by-step instructions to write technical documentation. But our ["12 Rules of Technical Writing"](https://handbook.strapi.io/user-success-manual/12-rules-of-technical-writing) and [style guide](https://handbook.strapi.io/user-success-manual/strapi-documentation-style-guide) should help you get started. If you have any question or need help, do feel free to reach us through [our forum](https://forum.strapi.io/).
Expand Down
11 changes: 8 additions & 3 deletions docs/.vuepress/config.js → docs/.vuepress/config-backup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
/**
* This file is the backyup the old config.js one.
* @Piwi & @DerrickMehaffy I'll let you decide if you want to keep it.
*/

const sidebar = {
developer: [
{
Expand Down Expand Up @@ -693,7 +698,6 @@ module.exports = {
port: 8080,
description: 'The headless CMS developers love.',
base: '/',
plugins: plugins,
head: [
[
'link',
Expand Down Expand Up @@ -874,8 +878,8 @@ module.exports = {
],
},
{
text: 'v3 Documentation',
link: 'https://docs-v3.strapi.io'
text: 'v3 documentation',
link: 'https://docs-v3.strapi.io',
},
{
text: 'Ecosystem',
Expand Down Expand Up @@ -958,4 +962,5 @@ module.exports = {
md.use(require('markdown-it-include'));
},
},
plugins: plugins,
};
6 changes: 6 additions & 0 deletions docs/.vuepress/config/markdown.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const markdown = {
extendMarkdown: md => {
// use more markdown-it plugins!
md.use(require('markdown-it-include'));
},
};
104 changes: 104 additions & 0 deletions docs/.vuepress/config/metas.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
const metas = {
title: '',
port: 8080,
description: 'The headless CMS developers love.',
base: '/',
head: [
[
'link',
{
rel: 'icon',
href: 'https://strapi.io/assets/favicon-32x32.png',
},
],
[
'meta',
{
property: 'og:title',
content: 'Strapi Documentation',
},
],
[
'meta',
{
property: 'og:type',
content: 'article',
},
],
[
'meta',
{
property: 'og:url',
content: 'https://strapi.io/documentation/',
},
],
[
'meta',
{
property: 'og:description',
content: 'The headless CMS developers love.',
},
],
[
'meta',
{
property: 'og:image',
content: 'https://strapi.io/documentation/assets/meta.png',
},
],
[
'meta',
{
property: 'og:article:author',
content: 'strapi',
},
],
[
'meta',
{
property: 'twitter:card',
content: 'summary_large_image',
},
],
[
'meta',
{
property: 'twitter:url',
content: 'https://strapi.io/documentation/',
},
],
[
'meta',
{
property: 'twitter:site',
content: '@strapijs',
},
],
[
'meta',
{
property: 'twitter:title',
content: 'Strapi Documentation',
},
],
[
'meta',
{
property: 'twitter:description',
content: 'The headless CMS developers love.',
},
],
[
'meta',
{
property: 'twitter:image',
content: 'http://strapi.io/assets/images/strapi-website-preview.png',
},
],
[
'script',
{},
`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-KN9JRWG');`,
],
],
};
1 change: 1 addition & 0 deletions docs/.vuepress/config/patterns-developer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const patterns = ['**/*.md', '!**/user-docs/**/*.md', '!node_modules'];
8 changes: 8 additions & 0 deletions docs/.vuepress/config/patterns-user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const patterns = [
'**/*.md',
'!**/developer-docs/**/*.md',
// We import the homepage of the documentation from the developer documentation,
// without this when launching the doc it redirects to the 404 page.
'**/developer-docs/latest/getting-started/introduction.md',
'!node_modules',
];
123 changes: 123 additions & 0 deletions docs/.vuepress/config/plugins.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
const checklinksIgnoredFiles = [
'**/node_modules', // please never remove this one
/**
* Caution: Adding an individual file to this section
* will prevent the _whole_ file from being scanned for broken links.
*
* Currently, there is no easy way to ignore a specific link inside a file.
*/

/**
* Files below give false positives
*/
'/developer-docs/latest/developer-resources/plugin-api-reference/admin-panel.md',
'./developer-docs/latest/development/backend-customization/models.md',
'./developer-docs/latest/guides/count-graphql.md', // might be removed once GraphQL customization is ready
'./developer-docs/latest/setup-deployment-guides/configurations.md', // the script thinks filename[]() at line 977 is a real link
'./developer-docs/latest/development/backend-customization/webhooks.md', // 'missing" links are in commented part of file
];

const plugins = [
['vuepress-plugin-element-tabs', {}],
[
'check-md',
{
ignore: checklinksIgnoredFiles,
},
],
[
'seo',
{
siteTitle: (_, $site) => $site.title,
title: $page => $page.title,
},
],
['@vuepress/medium-zoom'],
[
'vuepress-plugin-code-copy',
{
color: '#ffffff',
successText: 'Copied to clipboard!',
},
],
['@vuepress/back-to-top', {}],
[
'vuepress-plugin-container',
{
type: 'callout',
defaultTitle: '',
},
],
[
'vuepress-plugin-container',
{
type: 'strapi',
defaultTitle: '',
before: info =>
`<div class="custom-block strapi"><p class="custom-block-title">🤓 ${info}</p>`,
after: '</div>',
},
],
[
'vuepress-plugin-container',
{
type: 'tip',
before: info => `<div class="custom-block tip"><p class="custom-block-title">💡 ${info}</p>`,
after: '</div>',
},
],
[
'vuepress-plugin-container',
{
type: 'note',
before: info => `<div class="custom-block note"><p class="custom-block-title">✏️ ${info}</p>`,
after: '</div>',
},
],
[
'vuepress-plugin-container',
{
type: 'caution',
before: info =>
`<div class="custom-block caution"><p class="custom-block-title">✋ ${info}</p>`,
after: '</div>',
},
],
[
'vuepress-plugin-container',
{
type: 'warning',
before: info =>
`<div class="custom-block warning"><p class="custom-block-title">️❗️ ${info}</p>`,
after: '</div>',
},
],
[
'vuepress-plugin-container',
{
type: 'prerequisites',
defaultTitle: 'PREREQUISITES',
},
],
[
'vuepress-plugin-container',
{
type: 'api-call',
defaultTitle: '',
},
],
[
'vuepress-plugin-container',
{
type: 'request',
defaultTitle: 'Request',
},
],
[
'vuepress-plugin-container',
{
type: 'response',
defaultTitle: 'Response',
},
],
];
Loading