Empty page.md files are published and listed in the sitemap
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, next.js
- 領域
- backend, build-system
調査の方向性
Start with src/app/sitemap.js to see how fast-glob matches page files, then inspect the prebuild scripts and check-changelog.mjs for the existing check pattern. Add coverage for empty or front-matter-only page.md files under src/app; verify the sitemap excludes them and yarn build fails naming the file, while non-empty sitemap entries remain unchanged.
索引モデルが issue の本文から書いたものです。
説明
Summary
Any empty page.md under src/app (including the docs overlaid from gofr-dev/gofr at deploy time) is published as a route and listed in sitemap.xml. Today this publishes a blank page at https://gofr.dev/docs/quick-start/cli: HTTP 200, the site chrome with nothing in the content area, a generic title, and a sitemap entry that tells search engines to index it.
Cause
src/app/sitemap.js collects routes with fast-glob over src/app/**/page.md, page.jsx and page.tsx and adds every match; it never checks that the file has content. Next.js renders an empty Markdoc file as an empty page rather than failing the build, so nothing flags it.
The source file is docs/quick-start/cli/page.md in gofr-dev/gofr (zero bytes). Fixing that file is tracked in gofr-dev/gofr; this issue is about the website not publishing or indexing such pages in the first place.
Steps to reproduce
curl -s -o /dev/null -w '%{http_code} %{size_download}\n' https://gofr.dev/docs/quick-start/cligives200with only the page shell.curl -s https://gofr.dev/sitemap.xml | grep quick-start/clishows the URL.
Expected behavior
An empty content file is not listed in the sitemap, and the build fails (or at least warns loudly) so it is noticed before deploy.
Proposed solution
- In
sitemap.js, skippage.mdfiles whose size is zero (or whose content is only front matter). - Add a small check to the
prebuildstep (next tocheck-changelog.mjs) that fails the build when an emptypage.mdis found undersrc/app.
Acceptance criteria
- An empty
page.mdis not insitemap.xml. -
yarn buildfails with a message naming the empty file. - Non-empty pages are unaffected (sitemap URL count unchanged otherwise).
- 主要言語
- JavaScript
- スター
- 44
- フォーク
- 44
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
gofr-dev/website のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Homepage HTML shows "Trusted by 0+ Developers" to crawlers対応中かも @thzgajendra が 38 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
Dockerfile builder stage pins node:23.11.1 — a non-LTS line, EOL since 2025-06-01対応中かも @akshat-kumar-singhal が 98 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
-
Add og:image preview cards to docs pages対応中かも @adamshatzkamer が 36 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 66/100
gofr-dev/website の issue をすべて見る
似ている issue
-
nip27: long hashtag swallows the rest of the content, lone # gives an empty hashtag対応中かも @bardrop が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
nbd-wtf/nostr-tools#578 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
h5bp/html5-boilerplate#3512 ·
-
documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
githubnext/gh-aw-workshop#5752 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信