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