change `else { if() ` to `else if`
This commit is contained in:
parent
1350532de4
commit
03c1de5591
|
@ -136,31 +136,25 @@ export default defineIntegration({
|
|||
verbose,
|
||||
}),
|
||||
);
|
||||
} else {
|
||||
if (verbose) {
|
||||
} else if (verbose) {
|
||||
GhostIntegrationLogger.info(c.gray("Theme Provider is disabled"));
|
||||
}
|
||||
}
|
||||
|
||||
// Satori OG Images
|
||||
if (options.enableOGImages) {
|
||||
addIntegration(ghostOGImages({ verbose }));
|
||||
} else {
|
||||
if (verbose) {
|
||||
} else if (verbose) {
|
||||
GhostIntegrationLogger.info(
|
||||
c.gray("OG Image Provider is disabled"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// RSS Feed
|
||||
if (options.enableRSSFeed) {
|
||||
addIntegration(ghostRSS({ verbose }));
|
||||
} else {
|
||||
if (verbose) {
|
||||
} else if (verbose) {
|
||||
GhostIntegrationLogger.info(c.gray("RSS Feed is disabled"));
|
||||
}
|
||||
}
|
||||
|
||||
// @ASTROJS/SITEMAP
|
||||
if (!hasIntegration("@astrojs/sitemap")) {
|
||||
|
@ -172,15 +166,13 @@ export default defineIntegration({
|
|||
);
|
||||
}
|
||||
addIntegration(sitemap(options.Integrations?.sitemap));
|
||||
} else {
|
||||
if (verbose) {
|
||||
} else if (verbose) {
|
||||
GhostIntegrationLogger.info(
|
||||
c.gray(
|
||||
"@astrojs/sitemap integration already exists, skipping...",
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
// ASTRO-ROBOTS-TXT
|
||||
if (!hasIntegration("astro-robots-txt")) {
|
||||
if (verbose) {
|
||||
|
@ -191,15 +183,13 @@ export default defineIntegration({
|
|||
);
|
||||
}
|
||||
addIntegration(robotsTxt(options.Integrations?.robotsTxt));
|
||||
} else {
|
||||
if (verbose) {
|
||||
} else if (verbose) {
|
||||
GhostIntegrationLogger.info(
|
||||
c.gray(
|
||||
"astro-robots-txt integration already exists, skipping...",
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Set up default 404 page
|
||||
if (!options.disableDefault404) {
|
||||
|
@ -213,13 +203,11 @@ export default defineIntegration({
|
|||
entrypoint: `${name}/404.astro`,
|
||||
prerender: true,
|
||||
});
|
||||
} else {
|
||||
if (verbose) {
|
||||
} else if (verbose) {
|
||||
GhostRouteLogger.info(
|
||||
c.gray("Default 404 page is disabled, Skipping..."),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Add virtual imports for user configuration
|
||||
addVirtualImports({
|
||||
|
|
Loading…
Reference in New Issue