mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Static render all combinations of convert formats
This commit is contained in:
@@ -7,6 +7,8 @@ import { viteStaticCopy } from 'vite-plugin-static-copy'
|
||||
const config = require('./src/config.json')
|
||||
const English = require('./src/locales/en.json')
|
||||
|
||||
const convertFormats = ['give-command', 'loot-table', 'item-modifier']
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
port: 3000,
|
||||
@@ -44,6 +46,11 @@ export default defineConfig({
|
||||
title: `${English[m.id] ?? ''} Generator${m.category === true ? 's' : ''} - ${getVersions(m)}`,
|
||||
template,
|
||||
})),
|
||||
...convertFormats.flatMap(s => convertFormats.filter(t => s !== t).map(t => [s, t])).map(([s, t]) => html({
|
||||
fileName: `convert/${s}-to-${t}/index.html`,
|
||||
title: `${English[`convert.format.${s}`]} to ${English[`convert.format.${t}`]} Converter - ${getVersions({ minVersion: '1.20.5' })}`,
|
||||
template,
|
||||
})),
|
||||
...config.legacyGuides.map(g => html({
|
||||
fileName: `guides/${g.id}/index.html`,
|
||||
title: `${g.title} - ${getVersions()}`,
|
||||
|
||||
Reference in New Issue
Block a user