Skip to content

Stardust#3066

Open
atharvadeosthale wants to merge 4 commits into
mainfrom
stardust
Open

Stardust#3066
atharvadeosthale wants to merge 4 commits into
mainfrom
stardust

Conversation

@atharvadeosthale

Copy link
Copy Markdown
Member

No description provided.

A blog post with `draft: true` in frontmatter stays reachable at its direct
URL but is excluded from the blog listing (plus featured hero and pagination),
author pages, category pages and chips, the "read next" list, RSS, the JSON
feed, and the llms.txt / llms-full.txt aggregators. It also emits a noindex
robots meta so search engines drop it while the URL stays live.

Implemented via a single publishedPosts (non-draft) source of truth in
blog/content.ts, reused across the blog layout context, feeds, and llms
generators. unlisted behavior is unchanged.
Hide draft blog posts from listings, feeds, and search
@appwrite

appwrite Bot commented Jun 29, 2026

Copy link
Copy Markdown

Appwrite Website

Project ID: 69d7efb00023389e8d27

Sites (1)
Site Status Logs Preview QR
 website
69d7f2670014e24571ca
Ready Ready View Logs Preview URL QR Code

Website (appwrite/website)

Project ID: 684969cb000a2f6c0a02

Sites (1)
Site Status Logs Preview QR
 website
68496a17000f03d62013
Queued Queued View Logs Preview URL QR Code


Tip

Our Discord community has grown to 24K developers, and counting

@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR introduces a draft post system for the Appwrite blog. Posts marked draft: true in their frontmatter remain accessible via direct URL (for author preview) but are excluded from all public listings, feeds, and LLM context files, and receive a noindex robots meta tag.

  • publishedPosts is added as a new export in content.ts and becomes the single source of truth consumed by the blog layout, RSS feed, JSON feed, and LLM endpoints.
  • Post.svelte gains a draft prop that conditionally emits <meta name="robots" content="noindex" /> for draft posts.
  • llms.txt / llms-full.txt build a PUBLISHED_BLOG_SLUGS set at module load time and skip any draft post paths during file enumeration.

Confidence Score: 5/5

Safe to merge — all public surfaces (listings, RSS, JSON feed, LLM endpoints) now consistently exclude drafts, and the noindex guard is correctly applied to direct-URL draft access.

The change is well-scoped: a single publishedPosts filter propagates cleanly through every consumer. The two open observations (interface type mismatch on draft, JSON-LD emitted for drafts despite noindex) were flagged in a prior review pass and do not affect runtime correctness of the new draft-gating behavior.

No files require special attention beyond the prior review comments on content.ts and Post.svelte.

Important Files Changed

Filename Overview
src/routes/blog/content.ts Adds publishedPosts export (drafts filtered out) and updates getBlogEntries to use it; draft: boolean interface field is non-optional but effectively `boolean
src/markdoc/layouts/Post.svelte Adds draft prop and injects noindex meta for draft posts; JSON-LD structured-data blocks (createPostSchema, createBreadcrumbsSchema) are still emitted unconditionally for drafts (noted in prior review).
src/routes/blog/+layout.ts Switches blog layout load to use publishedPosts; clean, no concerns.
src/routes/blog/feed.json/+server.ts Switches to publishedPosts and fixes total from Object.keys(posts).length (array treated as object) to publishedPosts.length; clean fix.
src/routes/blog/rss.xml/+server.ts Switches RSS feed generation to use publishedPosts; straightforward and correct.
src/routes/llms-full.txt/+server.ts Adds a PUBLISHED_BLOG_SLUGS set and skips draft posts during file enumeration; slug extraction logic aligns correctly with the p.href construction in content.ts.
src/routes/llms.txt/+server.ts Same draft-filtering pattern as llms-full.txt; slug matching logic is consistent and correct.

Reviews (3): Last reviewed commit: "Merge branch 'main' into stardust" | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants