Add sounds page to build and sitemap

This commit is contained in:
Misode
2021-10-08 02:45:50 +02:00
parent 79b3291d06
commit d46976ed11
2 changed files with 11 additions and 1 deletions

View File

@@ -16,6 +16,11 @@ export default defineConfig({
title: '404',
template: template,
}),
html({
fileName: `sounds/index.html`,
title: getTitle({ id: 'title.sounds', page: true }),
template: template,
}),
...config.generators.map(m => html({
fileName: `${m.url}/index.html`,
title: getTitle(m),
@@ -45,7 +50,11 @@ function getTitle(m) {
const minVersion = Math.max(0, config.versions.findIndex(v => m.minVersion === v.id))
const versions = config.versions.slice(minVersion).map(v => v.id)
versions.splice(0, versions.length - 3)
return `${English[m.id] ?? ''} Generator${m.category === true ? 's' : ''} Minecraft ${versions.join(', ')}`
return `${English[m.id] ?? ''}${m.page ? '' : ` Generator${m.category === true ? 's' : ''}`} Minecraft ${versions.join(', ')}`
}
function getTitleSuffix(versions ) {
}
function template({ files, title }) {