-
Notifications
You must be signed in to change notification settings - Fork 22
publicディレクトリ内でディレクトリ分けができるようにする(ディレクトリを再起的に読み込む) #340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds recursive directory support for the public directory in Qiita CLI, allowing users to organize articles in nested folders for better management. This addresses the pain point of managing large numbers of articles in a flat structure.
Key Changes:
- Modified file system operations to recursively read directories instead of just the top level
- Updated the preview UI to display articles in a hierarchical tree structure based on folder organization
- Fixed React dependency version mismatches in package.json
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Updated React, React DOM, and related dependencies from 19.1.x to 19.2.x versions with matching scheduler updates |
| package.json | Updated React and @types/react-dom version requirements to ^19.1.13 for consistency |
| src/server/app.ts | Added chokidar watch options to ignore node_modules and .git directories during development |
| src/server/api/items.ts | Added parent property to item responses, calculated from file path segments |
| src/lib/view-models/items.ts | Added parent: string[] field to ItemViewModel type definition |
| src/lib/file-system-repo.ts | Changed parseFilename to preserve directory paths, added recursive readdir option, and filtered out .remote directory |
| src/client/components/SidebarArticles.tsx | Implemented tree-based rendering of articles with nested folder support and visual guide lines for hierarchy |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@yuito-it |
What
publicディレクトリ内の全てのディレクトリを再起的に読み込み、記事を管理しやすくした。
How
parseFilename- basenameを取るのではなく、拡張子を削除するのみにとどめるfileSystemOptions- 再起読み込みのオプションを追加getItemFilenames-.remoteディレクトリの除外itemsIndex- parentを追加startLocalChangeWatcher- 開発用に.git、node_modulesを監視対象から除外Why
下記ディスカッションを参照。
Originally posted by @yuito-it in increments/qiita-discussions#1031
Refs