Skip to content

Add tree-based demo directory and generation script#177

Merged
miuchan merged 1 commit into
masterfrom
codex/add-tree-view-for-demo-list
Oct 22, 2025
Merged

Add tree-based demo directory and generation script#177
miuchan merged 1 commit into
masterfrom
codex/add-tree-view-for-demo-list

Conversation

@miuchan
Copy link
Copy Markdown
Owner

@miuchan miuchan commented Oct 22, 2025

Summary

  • add a dedicated demo directory page with a searchable tree view and bilingual status messaging
  • generate a static demo-tree.json via a new utility that walks public/demo
  • expose the directory from the demo garden cards, including a link to the generation script

Testing

  • python scripts/generate_demo_tree.py

https://chatgpt.com/codex/tasks/task_e_68f8a04277088327975c06b3d8364bea

@miuchan miuchan merged commit 67b18b1 into master Oct 22, 2025
1 check passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

index = directory / 'index.html'
path = str(index.relative_to(DEMO_ROOT)) if index.exists() else None

P1 Badge Normalize generated paths to forward slashes

The generator writes each demo path using str(index.relative_to(DEMO_ROOT)), which emits platform‑specific separators. When the script is run on Windows, the JSON contains backslashes (e.g. "foo\bar\index.html"), and the client code uses those strings as hrefs. Browsers treat backslashes as %5C, so every link becomes a 404 when the data is regenerated on Windows. Convert the relative path to POSIX form (e.g. index.relative_to(DEMO_ROOT).as_posix()) before serializing so the output is portable.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant