feat: add next/prev button for docs according to sidebar

This commit is contained in:
endiliey 2018-09-15 00:25:12 +08:00
parent 11b0d15238
commit 318ea5fbb5
3 changed files with 42 additions and 5 deletions

View file

@ -144,14 +144,14 @@ module.exports = async function processMetadata(
metadata.id = `version-${version}-${metadata.id}`;
}
/* save localized id before adding language on it*/
metadata.localized_id = metadata.id;
/* if language */
if (language) {
metadata.id = `${language}-${metadata.id}`;
}
/* localize id */
metadata.localized_id = metadata.id;
/* Determine order */
const id = metadata.localized_id;
if (order[id]) {