Commit 0aa5af10 authored by Florian Pagnoux's avatar Florian Pagnoux
Browse files

Improve BASENAME default value

parent 1271bea4
export const basename = process.env.BASENAME || ''
export const isProd = process.env.PRODUCTION
......@@ -25,5 +25,5 @@ module.exports = withCSS({
)
})
},
assetPrefix: (localEnv && localEnv.BASENAME) || ""
assetPrefix: (localEnv && localEnv.BASENAME) || "."
})
import Document, { Head, Main, NextScript } from 'next/document'
const basename = process.env.BASENAME || ''
const isProd = process.env.PRODUCTION
import {basename, isProd} from '../config'
class StagingDocument extends Document {
render() {
......
import Layout from '../components/Layout'
import { withRouter } from 'next/router'
import map from 'lodash.map'
import isArray from 'lodash.isarray'
......@@ -6,8 +5,8 @@ import includes from 'lodash.includes'
import flow from 'lodash.flow';
import sortBy from 'lodash.sortby';
const isProd = process.env.PRODUCTION
const basename = process.env.BASENAME || ''
import Layout from '../components/Layout'
import {basename, isProd} from '../config'
function renderSubParams(item, key, path) {
const shouldSort = ! isArray(item.subparams) // A specific order has been explicitly defined in the conf
......@@ -34,7 +33,7 @@ function renderItem(item, key, path) {
</li>
}
if (item.table) {
return <li key={key}><a href={`/${path}${key}`}>{item.title || item.table.description || item.table.id}</a></li>
return <li key={key}><a href={`${path}${key}`}>{item.title || item.table.description || item.table.id}</a></li>
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment