Require at least one photo category before actually rendering pages of the photos
This commit is contained in:
@@ -11,7 +11,9 @@ export async function getAllRoutesList(settings: GlobalSettings): Promise<string
|
|||||||
const webpages = await getAllWebpages();
|
const webpages = await getAllWebpages();
|
||||||
|
|
||||||
webpages.forEach((webpage) => {
|
webpages.forEach((webpage) => {
|
||||||
|
if (webpage.exists) {
|
||||||
routes.push(webpage.url);
|
routes.push(webpage.url);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (settings.blog.enabled) {
|
if (settings.blog.enabled) {
|
||||||
@@ -48,6 +50,8 @@ export async function getAllRoutesList(settings: GlobalSettings): Promise<string
|
|||||||
}
|
}
|
||||||
if (settings.photo.enabled) {
|
if (settings.photo.enabled) {
|
||||||
const categories = await getAllCategories(settings);
|
const categories = await getAllCategories(settings);
|
||||||
|
|
||||||
|
if (categories.length > 0) {
|
||||||
const galleries = await getAllAlbums(settings);
|
const galleries = await getAllAlbums(settings);
|
||||||
|
|
||||||
routes.push(settings.photo.categoryIndex.indexRouteTemplate);
|
routes.push(settings.photo.categoryIndex.indexRouteTemplate);
|
||||||
@@ -85,6 +89,7 @@ export async function getAllRoutesList(settings: GlobalSettings): Promise<string
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return routes;
|
return routes;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user