mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-02 21:22:43 +00:00
docs(docs): add ProblemBadges component, layout slot, and enrich pages with topics/video frontmatter, plus guide placeholders and topic‑landing map.
This commit is contained in:
1 parent
b035d1ffa0
commit
d2888360e2
104 files changed
+741
-355
No files matched your search
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* LeetCode topic-tag slug → the campaign landing routes that teach it, in
|
||||
* default preference order. The one answer to "does the campaign cover this
|
||||
* tag", read by two 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>`;
|
||||
* - `apps/cli/sync.ts` creates a placeholder `content/guides/<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
|
||||
* dead weight, delete it by hand. A tag naming two topics (DFS/BFS: tree and
|
||||
* graph; DP: 1-D and grid) lists both; the badge picks per page.
|
||||
*/
|
||||
export const TOPIC_LANDINGS: Record<string, readonly string[]> = {
|
||||
"hash-table": ["/hash-table"],
|
||||
"prefix-sum": ["/prefix-sum"],
|
||||
"two-pointers": ["/two-pointers"],
|
||||
"sliding-window": ["/sliding-window"],
|
||||
"binary-search": ["/binary-search"],
|
||||
stack: ["/stack"],
|
||||
"monotonic-stack": ["/monotonic-stack"],
|
||||
"linked-list": ["/linked-list"],
|
||||
matrix: ["/matrix-index-math"],
|
||||
"depth-first-search": ["/tree-dfs", "/graph-dfs"],
|
||||
"breadth-first-search": ["/tree-bfs", "/graph-bfs"],
|
||||
"binary-search-tree": ["/binary-search-tree"],
|
||||
"heap-priority-queue": ["/heap-priority-queue"],
|
||||
trie: ["/trie"],
|
||||
"topological-sort": ["/topological-sort"],
|
||||
"union-find": ["/union-find"],
|
||||
backtracking: ["/backtracking"],
|
||||
"dynamic-programming": ["/1d-dynamic-programming", "/multi-d-grid-dp"],
|
||||
greedy: ["/greedy"],
|
||||
};
|
||||
Reference in new issue
Block a user