Skip to content

Stardust#3066

Open
atharvadeosthale wants to merge 3 commits into
mainfrom
stardust
Open

Stardust#3066
atharvadeosthale wants to merge 3 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 first-class draft post support for the Appwrite blog. Posts marked draft: true in frontmatter are now excluded from all public-facing surfaces (blog listings, RSS feed, JSON feed, LLM context files) while still being reachable via their direct URL with a noindex meta tag.

  • content.ts exports a new publishedPosts array (drafts filtered out) used as the single source of truth across feeds, layout context, and LLM files.
  • Post.svelte receives a new draft prop and conditionally emits <meta name="robots" content="noindex"> for draft posts; JSON-LD structured data (breadcrumbs + post schema) is still rendered unconditionally for drafts, which contradicts the noindex intent (noted in a prior review comment).
  • llms-full.txt / llms.txt build a PUBLISHED_BLOG_SLUGS Set at module load time and skip draft posts during file iteration.

Confidence Score: 5/5

Safe to merge — the changes are additive and well-scoped, with no risk of breaking existing published posts.

All changes route through the new publishedPosts export, which is a straightforward filter of the existing posts array. No existing route or feed is removed; draft posts simply become invisible to listings and crawlers. The logic in each consumer is consistent.

No files require special attention — the changes are mechanical and internally consistent.

Important Files Changed

Filename Overview
src/routes/blog/content.ts Adds publishedPosts export (drafts filtered out) and updates getBlogEntries to use it; draft field is still typed as non-optional boolean but will be undefined at runtime for older posts
src/markdoc/layouts/Post.svelte Adds draft prop (default false) and emits noindex meta for drafts; JSON-LD structured data (breadcrumbs + post schema) is still rendered unconditionally for draft posts
src/routes/blog/feed.json/+server.ts Switched to publishedPosts; also fixes total count from Object.keys(posts).length (array quirk) to the cleaner publishedPosts.length
src/routes/blog/rss.xml/+server.ts Straightforward swap of posts to publishedPosts; draft posts no longer appear in the RSS feed
src/routes/llms-full.txt/+server.ts Adds a PUBLISHED_BLOG_SLUGS Set and skips draft blog posts during file iteration; slug extraction logic is consistent between the Set and the per-file check
src/routes/llms.txt/+server.ts Mirrors the same draft-filtering logic added to llms-full.txt; no issues found
src/routes/blog/+layout.ts One-line import swap from posts to publishedPosts; draft posts are now excluded from the blog layout context

Reviews (2): Last reviewed commit: "Merge pull request #3083 from appwrite/m..." | Re-trigger Greptile

Merge main into stardust
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