mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-02 13:12:44 +00:00
feat(docs): add changelog page and switch tag guide paths to appendix
This commit is contained in:
1 parent
c3c482d954
commit
45bd3f771d
3 files changed
+214
-3
No files matched your search
@@ -4,10 +4,10 @@
|
||||
* tag", read by the sides that must agree:
|
||||
*
|
||||
* - `components/ProblemBadges.astro` links a covered tag's badge to its
|
||||
* landing page, and every other tag's badge to `/guides/<slug>`;
|
||||
* landing page, and every other tag's badge to its Appendix guide, `/appendix/<slug>`;
|
||||
* - `components/BacklinksList.astro` lists, under a landing or guide page,
|
||||
* every problem whose badge links there — both via `tagTarget()`;
|
||||
* - `apps/cli/sync.ts` creates a placeholder `content/guides/<slug>.mdx` for
|
||||
* - `apps/cli/sync.ts` creates a placeholder `content/appendix/<slug>.mdx` for
|
||||
* every tag a problem page carries that is NOT a key here.
|
||||
*
|
||||
* Add a key when a campaign topic starts teaching a tag; its guide page is then
|
||||
@@ -61,7 +61,7 @@ export function tagTarget(
|
||||
const prefer = page.tags.some((t) => t.slug === "tree") ? "/tree-" : "/graph-";
|
||||
const landing = landings.includes(own) ? own : (landings.find((p) => p.startsWith(prefer)) ?? landings[0]);
|
||||
if (landing) return { href: landing, kind: "landing" };
|
||||
const guide = `/guides/${tag.slug}`;
|
||||
const guide = `/appendix/${tag.slug}`;
|
||||
if (served.has(guide)) return { href: guide, kind: "guide" };
|
||||
return { href: `https://leetcode.com/problem-list/${tag.slug}/`, kind: "external" };
|
||||
}
|
||||
Reference in new issue
Block a user