Move the use-case index onto Learn so the pilot stories stay reachable, and make share images resolve on the host that serves the page.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
18abeb56dd
commit
9ea3f9fd0a
27 files changed
+656
-419
No files matched your search
@@ -14,7 +14,7 @@ describe("buildPublicSitemap", () => {
|
||||
expect(urls).toContain(sitemapUrl("/learn"));
|
||||
expect(urls).toContain(sitemapUrl("/templates"));
|
||||
expect(urls).toContain(sitemapUrl("/blog"));
|
||||
expect(urls).toContain(sitemapUrl("/use-cases"));
|
||||
expect(urls).not.toContain(sitemapUrl("/use-cases"));
|
||||
expect(urls).toContain(sitemapUrl("/how-it-works"));
|
||||
expect(urls).toContain(sitemapUrl("/privacy"));
|
||||
expect(urls).toContain(sitemapUrl("/terms"));
|
||||
|
||||
@@ -146,13 +146,27 @@ describe("originFromHost", () => {
|
||||
});
|
||||
|
||||
describe("buildRobots", () => {
|
||||
it("disallows crawlers on staging and unknown hosts", () => {
|
||||
expect(buildRobots("staging.communityrule.info")).toEqual({
|
||||
rules: { userAgent: "*", disallow: "/" },
|
||||
});
|
||||
expect(buildRobots("localhost:3000")).toEqual({
|
||||
rules: { userAgent: "*", disallow: "/" },
|
||||
it("disallows crawlers on staging and unknown hosts, and still lets link unfurlers fetch the page", () => {
|
||||
const staging = buildRobots("staging.communityrule.info");
|
||||
expect(staging).toEqual({
|
||||
rules: [
|
||||
{ userAgent: "*", disallow: "/" },
|
||||
{
|
||||
userAgent: [
|
||||
"Twitterbot",
|
||||
"facebookexternalhit",
|
||||
"Slackbot",
|
||||
"Discordbot",
|
||||
"LinkedInBot",
|
||||
"TelegramBot",
|
||||
"WhatsApp",
|
||||
"Bluesky",
|
||||
],
|
||||
allow: "/",
|
||||
},
|
||||
],
|
||||
});
|
||||
expect(buildRobots("localhost:3000")).toEqual(staging);
|
||||
});
|
||||
|
||||
it("allows production hosts and advertises the sitemap", () => {
|
||||
@@ -168,10 +182,9 @@ describe("buildRobots", () => {
|
||||
|
||||
it("honors SITE_INDEXING overrides", () => {
|
||||
process.env.SITE_INDEXING = "false";
|
||||
expect(buildRobots("communityrule.info").rules).toEqual({
|
||||
userAgent: "*",
|
||||
disallow: "/",
|
||||
});
|
||||
expect(buildRobots("communityrule.info").rules).toEqual(
|
||||
buildRobots("staging.communityrule.info").rules,
|
||||
);
|
||||
|
||||
process.env.SITE_INDEXING = "true";
|
||||
expect(buildRobots("staging.communityrule.info").sitemap).toBe(
|
||||
|
||||
Reference in new issue
Block a user