mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Merge pull request #13059 from strapi/ts/documentation-plugin
Fix documenation plugin
This commit is contained in:
commit
4e5b69058f
1
examples/kitchensink-ts/.gitignore
vendored
1
examples/kitchensink-ts/.gitignore
vendored
@ -112,3 +112,4 @@ exports
|
||||
*.cache
|
||||
build
|
||||
.strapi-updater.json
|
||||
documentation
|
||||
@ -14,6 +14,7 @@
|
||||
"dependencies": {
|
||||
"@strapi/admin": "4.1.7",
|
||||
"@strapi/provider-email-mailgun": "4.1.7",
|
||||
"@strapi/plugin-documentation": "4.1.7",
|
||||
"@strapi/provider-upload-aws-s3": "4.1.7",
|
||||
"@strapi/provider-upload-cloudinary": "4.1.7",
|
||||
"@strapi/strapi": "4.1.7",
|
||||
|
||||
@ -49,7 +49,7 @@ module.exports = {
|
||||
.getDocumentationVersion();
|
||||
|
||||
const openAPISpecsPath = path.join(
|
||||
strapi.dirs.dist.extensions,
|
||||
strapi.dirs.app.extensions,
|
||||
'documentation',
|
||||
'documentation',
|
||||
version,
|
||||
@ -82,7 +82,7 @@ module.exports = {
|
||||
|
||||
try {
|
||||
const staticFolder = path.resolve(
|
||||
strapi.dirs.dist.extensions,
|
||||
strapi.dirs.app.extensions,
|
||||
'documentation',
|
||||
'public'
|
||||
);
|
||||
@ -120,7 +120,7 @@ module.exports = {
|
||||
|
||||
try {
|
||||
const layoutPath = path.resolve(
|
||||
strapi.dirs.dist.extensions,
|
||||
strapi.dirs.app.extensions,
|
||||
'documentation',
|
||||
'public',
|
||||
'login.html'
|
||||
@ -131,7 +131,7 @@ module.exports = {
|
||||
ctx.url = path.basename(`${ctx.url}/login.html`);
|
||||
|
||||
try {
|
||||
const staticFolder = path.resolve(strapi.dirs.dist.extensions, 'documentation', 'public');
|
||||
const staticFolder = path.resolve(strapi.dirs.app.extensions, 'documentation', 'public');
|
||||
return koaStatic(staticFolder)(ctx, next);
|
||||
} catch (e) {
|
||||
strapi.log.error(e);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user