Change track slug
to include album slug
The previous `slug` is now in `trackSlug` instead. This approach offers more flexibility when configuring permalinks in Jekyll.
This commit is contained in:
parent
a0cc2e4927
commit
d186a5398e
|
@ -88,13 +88,15 @@ module.exports = {
|
|||
const newPath = path.resolve(assetRoot, folderName, fileName);
|
||||
await fs.copyFile(file.path, newPath);
|
||||
const coverPath = await extractCoverArt(newPath);
|
||||
const trackSlug = stripExtension(fileName);
|
||||
return _.assign(
|
||||
{},
|
||||
{
|
||||
path: newPath,
|
||||
audio: `/assets/albums/${folderName}/${fileName}`,
|
||||
slug: `${folderName}/${trackSlug}`,
|
||||
albumSlug: folderName,
|
||||
slug: stripExtension(fileName),
|
||||
trackSlug,
|
||||
},
|
||||
coverPath
|
||||
? {
|
||||
|
|
Loading…
Reference in a new issue