Skip to content

Stardust#3066

Open
atharvadeosthale wants to merge 5 commits into
mainfrom
stardust
Open

Stardust#3066
atharvadeosthale wants to merge 5 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
Failed Failed 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 their direct URL but are hidden from all public surfaces (listings, RSS, JSON feed, LLM context files) and receive a noindex meta tag to prevent search engine indexing.

  • publishedPosts is introduced as a single filtered export in content.ts, and all consumers (layout, feeds, LLM endpoints) are switched to use it, keeping the filtering logic in one place.
  • The llms.txt and llms-full.txt handlers add a PUBLISHED_BLOG_SLUGS set to efficiently skip draft markdoc files that are picked up by the glob import but should not appear in AI context.
  • Post.svelte gains a draft prop and conditionally renders a noindex meta tag; the "Read next" section also filters drafts from the context posts.

Confidence Score: 5/5

Safe to merge — draft filtering is correctly applied across all public-facing surfaces with no missing exclusions found.

The change is well-scoped: a single publishedPosts filtered list flows consistently through layout, feeds, and LLM endpoints. No public listing or feed accidentally surfaces draft content.

src/markdoc/layouts/Post.svelte (JSON-LD emitted for draft posts) and src/routes/blog/content.ts (interface type annotation).

Important Files Changed

Filename Overview
src/routes/blog/content.ts Adds publishedPosts as a draft-filtered export; getBlogEntries and category filtering now use it correctly. draft: boolean in the interface should be optional (draft?: boolean) since older posts without the frontmatter key yield undefined at runtime.
src/markdoc/layouts/Post.svelte Adds draft prop and noindex meta tag for draft posts; "Read next" context correctly excludes drafts. Schema.org JSON-LD blocks (createBreadcrumbsSchema, createPostSchema) are still emitted unconditionally for drafts.
src/routes/blog/+layout.ts Passes publishedPosts to the layout context instead of the full posts list — correct and minimal change.
src/routes/blog/feed.json/+server.ts Switches to publishedPosts and fixes the total count from Object.keys(posts).length to publishedPosts.length.
src/routes/blog/rss.xml/+server.ts Switches RSS feed to use publishedPosts — draft posts correctly excluded.
src/routes/llms-full.txt/+server.ts Adds PUBLISHED_BLOG_SLUGS set and filters out draft blog posts from the LLM context file; slug matching logic is correct.
src/routes/llms.txt/+server.ts Same draft-filtering pattern as llms-full.txt; correctly excludes draft posts from the LLM index.

Reviews (4): Last reviewed commit: "Merge pull request #3120 from appwrite/m..." | 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