Keep listed published rules public and guest-claim rules unlisted, with semantic document markup and share chrome that stays clickable.

Guest publishes remain share-by-link but stay out of the catalog and sitemap, and their pages send noindex until claimed. The published-rule view now uses heading and list markup matching Markdown export, and top banners sit below the header so Share is not covered.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
adilalloandCursor committed 2026-09-17 17:42:01 -06:00
1 parent 77b0ec8ad8
commit 1445cb7e1e
27 files changed
+524 -86

No files matched your search

+15
View File
@@ -36,4 +36,19 @@ describe("buildPublicSitemap", () => {
expect(urls.some((url) => url.includes("/monitor"))).toBe(false);
expect(urls.some((url) => url.includes("/api/"))).toBe(false);
});
it("appends listed published-rule URLs and omits them when none are supplied", () => {
const withoutRules = buildPublicSitemap().map((entry) => entry.url);
expect(withoutRules.some((url) => url.includes("/rules/"))).toBe(false);
const updatedAt = new Date("2026-09-01T00:00:00.000Z");
const withRules = buildPublicSitemap([{ id: "rule-1", updatedAt }]);
const listed = withRules.find(
(entry) => entry.url === sitemapUrl("/rules/rule-1"),
);
expect(listed).toEqual({
url: sitemapUrl("/rules/rule-1"),
lastModified: updatedAt,
});
});
});