Skip to content

Commit

Permalink
Update next.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kalanakt authored Dec 25, 2022
1 parent 1253549 commit 3260c8a
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion docs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
const isGithubActions = process.env.GITHUB_ACTIONS || false

let assetPrefix = 'docs'
let basePath = 'docs/'

if (isGithubActions) {
const repo = process.env.GITHUB_REPOSITORY.replace(/.*?\//, '')

assetPrefix = `/${repo}/docs/`
basePath = `/${repo}/docs`
}

const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
basePath: '/All-Url-Uploader/docs',
assetPrefix: assetPrefix,
basePath: basePath,
images: {
loader: 'imgix',
path: 'the "domain" of your Imigix source',
},
})

module.exports = withNextra()

0 comments on commit 3260c8a

Please sign in to comment.