Publish: lint internal links that point at non-live posts
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 72/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- markdown, sqlite, typescript
調査の方向性
Start in buildLiveSet in src/lib/server/publish.ts, where the publish pass already has the live slug set when it renders post bodies. The new pure function findLinkProblems(body, liveSlugs) belongs in its own module with a *.check.ts file covering the listed link cases. Done means the check passes for every case, warnings appear per post in the Publish view, editor-route links disable the Publish button with a reason, and the rendered .svx text is unchanged.
索引モデルが issue の本文から書いたものです。
説明
Context
Posts link to each other by hand with a root-relative slug (/gear). Nothing checks that the target is a live post, so links to drafts, renamed posts and pasted titles ship broken. Publish already knows the full live set when it renders post bodies (buildLiveSet in src/lib/server/publish.ts).
Scope
In the publish pass, scan each live body for links and report:
- root-relative hrefs whose first segment is not a live slug: a warning per link, shown in the Publish view;
- hrefs that contain the editor's own origin or start with
/posts/(an editor route, not a site route): block the publish.
Acceptance criteria
- A pure function
findLinkProblems(body, liveSlugs)in its own module with a*.check.tscovering: live slug, unknown slug, renamed slug, editor-route href, external link, anchor-only link, and a title pasted as a path. - The Publish view lists warnings per post; editor-route links disable the Publish button with the reason.
- No change to the rendered
.svxtext.
Estimate: about 3 hours.
- 主要言語
- HTML
- スター
- 0
- フォーク
- 0
- 平均マージ
- 1分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mrgnw/cfcms のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
G-nn-r/lg_heatpump#52 ·
-
area: core bug priority: high
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
griffinwork40/agent-afk#4872 ·
メンテナーはふだん 1 日以内に返信
-
fleet size/m
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
sipyourdrink-ltd/bernstein#7517 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
BUG-MERGE-TO-HDR-RESULT-NAME対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
storytold/photocraft#14025 ·
メンテナーはふだん 1 日以内に返信