Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
691a2ac
Add consistency
pwizla Jun 23, 2021
ad79887
Merge branch 'main' of github.com:strapi/documentation
pwizla Jun 23, 2021
c453007
Merge branch 'main' of github.com:strapi/documentation
pwizla Jun 23, 2021
0a35eff
Merge branch 'main' of github.com:strapi/documentation
pwizla Jun 24, 2021
45635a9
Add strapi & prerequisites Markdown containers
pwizla Jun 30, 2021
cc62f4e
Use :::strapi and :::prerequisites in existing docs
pwizla Jul 1, 2021
adfd4c3
Add generic callout, tweak strapi & tip callouts, and clean config file
pwizla Jul 2, 2021
f048b7c
Clean up unused inline styles from Markdown files
pwizla Jul 2, 2021
4b0f29f
Remove 🤓 from Markdown files in strapi callouts as it's now included
pwizla Jul 2, 2021
1497732
Use generic callout for congratulations in QSG
pwizla Jul 2, 2021
0b55b02
Add api-call, request and response custom containers
pwizla Jul 7, 2021
4f77efd
Fully redesign style for request & response containers
pwizla Jul 7, 2021
d738bec
Use api-callout container on existing documentation
pwizla Jul 7, 2021
ba3b5c2
Remove emoji from :::strapi as it's included
pwizla Jul 16, 2021
6d6de60
Add 'note' custom callout
pwizla Jul 16, 2021
90728e8
Add 'important', 'caution' and 'warning' custom callouts
pwizla Jul 16, 2021
b55e21e
Remove important callout & cleanup CSS
pwizla Jul 19, 2021
380377f
Merge branch 'repo/custom-containers' into repo/vuepress-enhanced
pwizla Jul 20, 2021
e304250
Merge branch 'repo/snippets' into repo/vuepress-enhanced
pwizla Jul 20, 2021
bf37efa
Apply new callouts and minimal tab styles everywhere
pwizla Jul 20, 2021
4672f2e
Apply minimal tabs to integration guides
pwizla Jul 20, 2021
e2d1ae8
Update VuePress to 1.8.2
pwizla Jul 20, 2021
466036d
Merge branch 'repo/api-enhancements' into repo/vuepress-enhanced
pwizla Jul 20, 2021
ba7b7d2
Temporarily setting root url (testing Vercel deploy)
pwizla Jul 20, 2021
eb7ab45
Revert "Temporarily setting root url (testing Vercel deploy)"
pwizla Jul 20, 2021
4f42545
Use code-blocks and code-groups everywhere appropriate
pwizla Jul 20, 2021
68258fa
Tweak request/response CSS based on designers feedback
pwizla Jul 21, 2021
eb8d89e
Simplify some wordings in i18n doc
pwizla Jul 21, 2021
6399966
Apply api-call/request/response containers throughout the docs
pwizla Jul 21, 2021
3bef1cc
Tweak request/response CSS for use outside of :::api-call
pwizla Jul 21, 2021
0143d9f
Update callouts in the user guide
meganelacheny Jul 27, 2021
12677a2
Remove Google Analytics Vuepress plugin and add GTM
pwizla Aug 11, 2021
65a9e30
Temp remove yarn.lock to fix conflicts
pwizla Aug 24, 2021
5ce001c
Fix emoji for warning callout
pwizla Aug 24, 2021
4df1fb8
Converting warning to note callout in Templates file
pwizla Aug 24, 2021
1dbcf6d
Merge branch 'main' into repo/vuepress-enhanced
pwizla Aug 24, 2021
783519b
Fix QSG callouts
pwizla Aug 24, 2021
5d273c7
Add yarn.lock
pwizla Aug 24, 2021
89886e4
Remove marketing note at end of 21yunbox hosting guide
pwizla Aug 24, 2021
ca0c7f7
Removing GTM script from plugins (it's already in head)
pwizla Aug 25, 2021
e2fb5ec
Don't make text prop required in badges as a default is already provided
pwizla Aug 25, 2021
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
85 changes: 69 additions & 16 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,68 @@ const checklinksIgnoredFiles = [
'./developer-docs/latest/update-migration-guides/migration-guides/migration-guide-beta.20-to-3.0.0.md', // line 93
];

const plugins = [
['vuepress-plugin-element-tabs', {}],
['check-md', {
ignore: checklinksIgnoredFiles,
}],
['seo', {
siteTitle: (_, $site) => $site.title,
title: $page => $page.title,
}],
['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'
}]
];

const checkLegacy = () => {
if (process.env.DEPLOY_ENV == 'legacy') {
return '/documentation/';
Expand All @@ -391,22 +453,7 @@ module.exports = {
port: 8080,
description: 'The headless CMS developers love.',
base: checkLegacy(),
plugins: {
'@vuepress/medium-zoom': {},
'vuepress-plugin-element-tabs': {},
'check-md': {
ignore: checklinksIgnoredFiles,
},
seo: {
siteTitle: (_, $site) => $site.title,
title: ($page) => $page.title,
},
'vuepress-plugin-code-copy': {
color: '#ffffff',
successText: 'Copied to clipboard!',
},
'@vuepress/back-to-top': {},
},
plugins: plugins,
head: [
[
'link',
Expand Down Expand Up @@ -646,4 +693,10 @@ module.exports = {
'/user-docs/latest/': sidebar.user,
},
},
markdown: {
extendMarkdown: md => {
// use more markdown-it plugins!
md.use(require('markdown-it-include'))
}
}
};
4 changes: 3 additions & 1 deletion docs/.vuepress/styles/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
color: $accentColor !important

.el-tabs__item:not(.is-disabled):hover
color: $accentColor !important
color: $accentColor !important

@import "strapi-custom-blocks.styl"
194 changes: 194 additions & 0 deletions docs/.vuepress/styles/strapi-custom-blocks.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
.custom-block
/**
* CALLOUTS
*/
.custom-block-title
font-weight 600
margin-bottom -0.4rem
&.callout
&.callout-alt
&.strapi
&.prerequisites
&.note
&.tip
&.warning
&.danger
&.caution
padding .1rem 1.5rem
margin-top 2rem
margin-bottom 2rem
border-left-width: .25rem
border-left-style solid
&.strapi
background-color rgba(129,107,250, .05)
border-color rgb(129,107,250)
.custom-block-title
color #816bfa
font-weight 700
p, li
color #2c3e50
a
color #007eff
&.callout
&.callout-alt
&.prerequisites
background-color #f8f8f8
border-color #bbbbba
&.callout-alt
border-radius: 10px
background-color: #eff5f7
border: none
&.note
background-color #f4fcff
border-color #0193C2
&.caution
border-color #E7C000
background-color rgba(255,229,100,.3)
color #6b5900
.custom-block-title
color #B29400
a
color #2c3e50
&.warning
border-color #cc0000
background-color rgb(255, 230, 230)
color #4d0000
.custom-block-title
color #900
a
color #2c3e50
&.tip
background-color #EFFDF6
/**
* API CALLS
*/
&.api-call
padding: 0
border-radius: 12px
// margin: 2rem 0 2rem
@media (min-width: 1536px)
display: flex
margin: 0 -12rem 2rem 0
align-items: stretch
&.request
background-color: #666687
padding: 0 1rem 1rem
border-radius: 12px
font-size: 100%
color:#F6F6F9
.custom-block-title
margin-left: -1rem
margin-right: -1rem
margin-top: 0
border-radius: 12px 12px 0 0
padding: .5rem 1rem
font-weight: 700
background-color: #32324D
color: #F6F6F9
font-size: 90%;
.custom-block-title+p
padding-top: 1rem
p, ul, ol
color: #2c3e50
color: rgba(241,251,255,.8)
p
padding-left: 1rem
ul, ol
padding-left: 3rem
[class^="language-"]
background-color: transparent
font-size: 110%
&::before
color: #EAEAEF
pre
padding: 1rem 0 0 1rem
code
color: #F6F6F9
background-color: #212134
.token
color: #F6F6F9 // catch-all for undefined colors
&.punctuation
color: #d3d3d3
&.operator
&.property
color: #F6F6F9
&.string
&.attr-name
&.function
color: #B6FFB5
&.number
&.keyword
color: #FDED9B
&.comment
color: #d9d9d9
&.response
background-color: #DCDCE4
margin-top: 2rem
padding: 0 1rem 1rem
border-radius: 12px
font-size: 100%
color: #666687
.extra-class::before
color: #666687
.custom-block-title
background-color: #C0C0CF
color: #32324D
border-radius: 12px 12px 0 0
margin-left: -1rem
margin-right: -1rem
padding: .5rem 1rem
margin-top: 0
font-weight: 700
font-size: 90%;
margin-bottom: .5rem
[class^="language-"]
background-color: transparent
font-size: 110%
&::before
color: #666687
pre
padding: 1rem 0 0 1rem
code
color: #666687 !important
.token
color: #666687 // catch-all for undefined colors
&.punctuation
&.operator
&.property
color: #666687
&.string
color: #2B7732
&.number
color: #B7322A
&.comment
color: #8585b2
&.request
&.response
margin-top: 2rem
.extra-class
font-size: 90%
border-radius: 6px 0 6px 0
pre
// white-space: pre-wrap
word-break: break-word
margin-bottom: 0

&.api-call
> .request
> .response
@media (min-width: 1536px)
flex: 0 0 42%
max-width: 42%
> .request
@media (min-width: 1536px)
border-radius: 12px 0 0 12px
.custom-block-title
border-radius: 12px 0 0 0
.response
@media (min-width: 1536px)
border-radius: 0 12px 12px 0
.custom-block-title
border-radius: 0 12px 0 0

.custom-block.details
color rgb(44, 62, 80)
2 changes: 1 addition & 1 deletion docs/.vuepress/theme/global-components/BronzeBadge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
text: {
type: String,
default: 'Bronze',
required: true
// required: true // to suppress Vue warnings
},
withLinkIcon: {
type: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/theme/global-components/CustomBadge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
text: {
type: String,
default: 'Badge',
required: true
// required: true // to suppress Vue warnings
},
withLinkIcon: {
type: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/theme/global-components/GoldBadge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
text: {
type: String,
default: 'Gold',
required: true
// required: true // to suppress Vue warnings
},
withLinkIcon: {
type: Boolean,
Expand Down
2 changes: 1 addition & 1 deletion docs/.vuepress/theme/global-components/SilverBadge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
text: {
type: String,
default: 'Silver',
required: true
// required: true // to suppress Vue warnings
},
withLinkIcon: {
type: Boolean,
Expand Down
8 changes: 4 additions & 4 deletions docs/developer-docs/latest/developer-resources/cli/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ options: [--no-build |--watch-admin |--browser ]
- **strapi develop --watch-admin --browser 'google chrome'**<br/>
Starts your application with the autoReload enabled and the front-end development server. It allows you to customize the administration panel. Provide a browser name to use instead of the default one, `false` means stop opening the browser.

::: tip
:::warning
You should never use this command to run a Strapi application in production.
:::

Expand Down Expand Up @@ -120,7 +120,7 @@ Options:

All these examples are equivalent.

::: warning
:::caution
When configuring your application you often enter credentials for third party services (e.g authentication providers). Be aware that those credentials will also be dumped into the output of this command.
In case of doubt, you should avoid committing the dump file into a versioning system. Here are some methods you can explore:

Expand Down Expand Up @@ -372,7 +372,7 @@ strapi install <name>

Example: `strapi install graphql` will install the plugin `strapi-plugin-graphql`

::: warning
:::caution
Some plugins have admin panel integrations, your admin panel might have to be rebuilt. This can take some time.
:::

Expand All @@ -396,7 +396,7 @@ options [--delete-files]

Example: `strapi uninstall graphql --delete-files` will remove the plugin `strapi-plugin-graphql` and all the files in `./extensions/graphql`

::: warning
:::caution
Some plugins have admin panel integrations, your admin panel might have to be rebuilt. This can take some time.
:::

Expand Down
Loading