diff --git a/theme/components/templates/AppPageBottom.vue b/theme/components/templates/AppPageBottom.vue index dd49df0ac..76506593a 100644 --- a/theme/components/templates/AppPageBottom.vue +++ b/theme/components/templates/AppPageBottom.vue @@ -41,7 +41,7 @@ export default { 'edit', this.settings.github.branch, this.settings.github.dir, - 'content', + this.$config.contentDir, `${this.document.path}${this.document.extension}`.replace(/^\//g, '') ].filter(Boolean).join('/') } diff --git a/theme/module.js b/theme/module.js index 0e004dc02..c5611da6f 100644 --- a/theme/module.js +++ b/theme/module.js @@ -12,6 +12,8 @@ export default function docusModule () { const { nuxt } = this const { options, hook } = this.nuxt + // Inject content dir in private runtime config + options.publicRuntimeConfig.contentDir = options.content.dir || 'content' // Configure `content/` dir options.content.dir = path.resolve(options.rootDir, options.content.dir || 'content') // Configure `static/ dir