Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Draft blog posts are published and listed in the sitemap

Open Beginner friendly
#1,772 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
content, frontend

Research direction

Read apps/outreach/src/pages/[locale]/blog/[slug].astro and compare its getStaticPaths collection query with the filter in apps/outreach/src/pages/[locale]/blog/index.astro. Run pnpm --filter @opendatacapture/outreach build; done means the draft's page is absent from dist and its URL is absent from dist/sitemap-0.xml.

Written by the indexing model from the issue text.

Description

Area: Outreach Bug Difficulty: Low Good First Issue Priority: Medium

Blog posts marked isDraft: true are still published. The blog index filters drafts out, but the post route's getStaticPaths builds a page for every entry in the blog collection, drafts included. The draft is then live at its URL, and @astrojs/sitemap lists it in sitemap-0.xml, so search engines are told to index it. Today this exposes blog/open-data-capture-vs-redcap.md (isDraft: true), which is served at https://opendatacapture.org/en/blog/open-data-capture-vs-redcap/ with a 200.

Where

apps/outreach/src/pages/[locale]/blog/[slug].astro:11-23:

export const getStaticPaths = async () => {
  const posts = await getCollection('blog');

  const paths = posts.map((post) => ({
    params: {
      locale: post.data.language,
      slug: post.slug
    },
    props: { post }
  }));

The index applies the filter the post route is missing, at apps/outreach/src/pages/[locale]/blog/index.astro:17:

const posts = await getCollection('blog', ({ data }) => data.language === resolvedLanguage && !data.isDraft);

Reproduce

  1. pnpm --filter @opendatacapture/outreach build.
  2. Look for dist/en/blog/open-data-capture-vs-redcap/index.html, and grep dist/sitemap-0.xml for open-data-capture-vs-redcap.

Actual: the page is built, and the sitemap lists https://opendatacapture.org/en/blog/open-data-capture-vs-redcap/. The live site serves it.
Expected: no page and no sitemap entry for a post with isDraft: true.

Tests

apps/outreach has no unit or Playwright suite, by decision (apps/outreach/AGENTS.md). Verify through the build: after the fix, dist/en/blog/open-data-capture-vs-redcap/ does not exist and dist/sitemap-0.xml does not mention it.

Suggested fix

Filter with the same predicate in getStaticPaths: getCollection('blog', ({ data }) => !data.isDraft).

Dominant language
TypeScript
Stars
119
Forks
19
Avg merge
1d 2h
Merged PRs (30d)
56

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DouglasNeuroInformatics/OpenDataCapture

All issues in DouglasNeuroInformatics/OpenDataCapture

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.