Closed ykla closed 1 year ago
It can be obtained by console.log in sorter function
const routeOrder = [
'/A.html',
'/B.html',
'/C.html',
'/AA/1.html',
'/AA/2.html',
'/AA/3.html',
'/BB/4.html',
'/BB/5.html',
'/BB/6.html',
'/CC/7.html',
'/CC/8.html',
'/CC/9.html',
]
export default defineUserConfig({
sorter: (pageA, pageB) => {
const aIndex = routeOrder.findIndex(route => route === pageA.path)
const bIndex = routeOrder.findIndex(route => route === pageB.path)
return aIndex - bIndex
},
})
Hi,
In readme, vuepress-plugin-export-pdf-v2 output page order of the wrong.
And the order controlled by
sorter
. But there is no example or parameter for sorter. So how to change it?Suppose I have the following files and folders in my documents:
docs
folders contains :and after run export pdf, the HTML files are:
docs
folders contains :How should I sort the above folders using the
sorter
parameter? Thank you very much for your help.