Commit f256a07f authored by Florian Pagnoux's avatar Florian Pagnoux
Browse files

Fixup basename

parent 3fb58f12
......@@ -37,6 +37,7 @@ function renderItem(item, key, path) {
const Section = (props) => {
const section = props.router.query
const path = props.router.asPath.endsWith('/') ? props.router.asPath : props.router.asPath + '/'
const basename = process.env.BASENAME || ''
const subParams = flow([
x => map(x, (subParam, name) => Object.assign({}, subParam, {name})),
x => sortBy(x, subParam => section?.metadata?.order.indexOf(subParam.name))
......@@ -47,7 +48,7 @@ const Section = (props) => {
<div className="entry-content text">
<h4>Sommaire</h4>
<ol>
{map(subParams, subParam => renderItem(subParam, subParam.name, path))}
{map(subParams, subParam => renderItem(subParam, subParam.name, `${basename}${path}`))}
</ol>
</div>
</Layout>
......
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