mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-02 21:22:43 +00:00
docs(skills): update paths to docs directory in problem-approach skill
This commit is contained in:
1 parent
d171fe1565
commit
f14dcf2723
1 file changed
+9
-7
@@ -1,11 +1,11 @@
|
|||||||
---
|
---
|
||||||
name: problem-approach
|
name: problem-approach
|
||||||
description: Write the `## Approach` section — a Mermaid flowchart that traces the submitted solution — for every docs solution page under apps/docs/content/ that lacks one, using the repo's exact placement and node conventions. Use when asked to add/implement/fill in missing approaches, draw the approach diagram for a problem page, or when `/problem-approach` is run.
|
description: Write the `## Approach` section — a Mermaid flowchart that traces the submitted solution — for every docs solution page under docs/ that lacks one, using the repo's exact placement and node conventions. Use when asked to add/implement/fill in missing approaches, draw the approach diagram for a problem page, or when `/problem-approach` is run.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Problem approach diagrams
|
# Problem approach diagrams
|
||||||
|
|
||||||
Every solution page (`apps/docs/content/(<phase>)/<topic>/(problems)/<num>_<slug>.mdx`) has a
|
Every solution page (`docs/(<phase>)/<topic>/(problems)/<num>_<slug>.mdx`) has a
|
||||||
hand-owned section before the script-owned one:
|
hand-owned section before the script-owned one:
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -23,7 +23,7 @@ next `work/` push.
|
|||||||
1. **Find the pages** (numbered pages with no `## Approach` heading):
|
1. **Find the pages** (numbered pages with no `## Approach` heading):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
grep -L '^## Approach' apps/docs/content/*/*.mdx
|
grep -rL '^## Approach' docs --include='[0-9]*_*.mdx'
|
||||||
```
|
```
|
||||||
|
|
||||||
2. **For each page**, read `## Solution` and write the diagram from *that code* — the
|
2. **For each page**, read `## Solution` and write the diagram from *that code* — the
|
||||||
@@ -47,11 +47,13 @@ next `work/` push.
|
|||||||
````
|
````
|
||||||
|
|
||||||
4. **Check** each diagram by hand against the syntax rules below (the docs build does
|
4. **Check** each diagram by hand against the syntax rules below (the docs build does
|
||||||
not parse Mermaid — a broken diagram fails only in the browser), then run the
|
not parse Mermaid — a broken diagram fails only in the browser). The site is built
|
||||||
docs build once at the end and review the pages in `bun run dev`:
|
from prdlk/cs, which reads `docs/` over HTTP, so preview unpushed pages there
|
||||||
|
against this checkout (its `README` names the local-content switch), then build
|
||||||
|
once at the end:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd apps/docs && bunx blume build --isolated && rm -rf .blume-verify
|
cd ../cs && bunx blume build --isolated && rm -rf .blume-verify
|
||||||
```
|
```
|
||||||
|
|
||||||
Pages with two languages (`<CodeGroup>`) get **one** diagram, traced from the
|
Pages with two languages (`<CodeGroup>`) get **one** diagram, traced from the
|
||||||
@@ -59,7 +61,7 @@ Python version. Pages with only JavaScript trace the JavaScript.
|
|||||||
|
|
||||||
## Diagram conventions
|
## Diagram conventions
|
||||||
|
|
||||||
Reference page: `apps/docs/content/(array)/15-3sum.mdx`. Every existing diagram
|
Reference page: `docs/(01-linear-structures)/two-pointers/(problems)/15_3sum.mdx`. Every existing diagram
|
||||||
follows this shape:
|
follows this shape:
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
|
|||||||
Reference in new issue
Block a user