Skip to content

[add] Git submodule of Activity PPT #42

Merged
TechQuery merged 6 commits intomainfrom
copilot/fix-41
Sep 6, 2025
Merged

[add] Git submodule of Activity PPT #42
TechQuery merged 6 commits intomainfrom
copilot/fix-41

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 6, 2025

PR-42 PR-42 PR-42 Powered by Pull Request Badge

Powered by Pull Request Badge

  • Understand the repository structure and existing submodule setup
  • Verify the build works with existing Wiki submodule
  • Add PPT submodule from https://github.com/FreeCodeCamp-Chengdu/Activity_PPT to pages/article/PPT
  • Configure non-Markdown files to use GitHub raw proxy links
  • Test the build with the new submodule
  • Verify the article index page correctly displays the PPT directory tree with proxy links
  • Address feedback: Make pageListOf function generic (remove hardcoded directory logic)
  • Address feedback: Remove package-lock.json and add to .gitignore
  • Address feedback: Actually delete package-lock.json file as requested
  • Address feedback: Merge file handling logic branches in pageListOf function

Summary

Successfully implemented the PPT submodule integration with all feedback addressed:

🎯 Main Changes

  1. Added PPT Submodule: Added https://github.com/FreeCodeCamp-Chengdu/Activity_PPT as a git submodule at pages/article/PPT

  2. Enhanced File Processing: Modified pageListOf function in pages/api/core.ts to include non-Markdown files in the article tree structure

  3. Generic Implementation: Updated function to be generic and only distinguish between Markdown and non-Markdown files, removing hardcoded directory-specific logic

  4. Package Management: Properly removed package-lock.json and ensured it's in .gitignore as requested (project uses PNPM)

  5. Code Consolidation: Merged separate file handling branches into unified logic for better maintainability

📊 Results

  • Article count increased: From 219 to 568+ articles (now includes all PPT and other non-Markdown files)
  • Generic file handling: All non-Markdown files now included regardless of directory
  • Directory structure preserved: Maintains chronological organization (20161106, 20170702, etc.)
  • Existing functionality intact: Wiki submodule and other article features continue to work
  • Build successful: Application builds correctly with the consolidated logic

🔧 Technical Changes

The pageListOf function now handles all file types with unified logic:

  • Single file branch: Consolidated handling for both Markdown and non-Markdown files
  • Conditional metadata: Only extracts front matter for Markdown files
  • Generic naming: Uses appropriate names based on file type

This approach improves code maintainability and reduces duplication.

Article Page with PPT Directory

Fixes #41.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
@TechQuery
Copy link
Copy Markdown
Member

@copilot 接着改

…ete package-lock.json

Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 6, 2025

@copilot 接着改

Completed the requested changes - made the pageListOf function generic and removed package-lock.json. The function now handles all non-Markdown files consistently without hardcoded directory paths, and the application builds successfully. (commit: b66d4bc)

Copilot AI changed the title [WIP] 新增 PPT 子模块目录 新增 PPT 子模块目录 Sep 6, 2025
Copilot AI requested a review from TechQuery September 6, 2025 17:45
Copilot AI and others added 2 commits September 6, 2025 18:27
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 6, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

@TechQuery TechQuery marked this pull request as ready for review September 6, 2025 18:44
@TechQuery TechQuery added the enhancement Some improvements label Sep 6, 2025
@TechQuery TechQuery changed the title 新增 PPT 子模块目录 [add] Git submodule of Activity PPT Sep 6, 2025
@TechQuery TechQuery merged commit ad25c1f into main Sep 6, 2025
1 of 2 checks passed
@TechQuery TechQuery deleted the copilot/fix-41 branch September 6, 2025 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Some improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

新增 PPT 子模块目录

2 participants