Skip to content

fix: 修复gitignore忽略问题#1874

Merged
robinv8 merged 3 commits into
jd-opensource:nextfrom
bjmhe:hotfix_docs_20260509
May 11, 2026
Merged

fix: 修复gitignore忽略问题#1874
robinv8 merged 3 commits into
jd-opensource:nextfrom
bjmhe:hotfix_docs_20260509

Conversation

@bjmhe
Copy link
Copy Markdown
Contributor

@bjmhe bjmhe commented May 9, 2026

image 这个文件,本地开发是直接复制到新文件夹 docs 下,所以构建没问题。但是提交的时候,由于gitignore设置了vitepress,所以没提交成功 本次改动修复了gitignore,并且还原了丢失的内容

@bjmhe
Copy link
Copy Markdown
Contributor Author

bjmhe commented May 11, 2026

@robinv8 review please

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 adjusts the repository’s .gitignore so the docs’ .vitepress source directory (config/theme) is no longer unintentionally ignored, and introduces a custom VitePress configuration/theme to support the documentation site (including an embedded H5 demo iframe and an IconList component).

Changes:

  • Update .gitignore to ignore only VitePress build artifacts (.vitepress/cache, .vitepress/dist) instead of the entire .vitepress/ directory.
  • Add VitePress site config (docs/.vitepress/config.mts) including a dev-server middleware to serve the H5 demo build from examples/demo/dist.
  • Add a custom VitePress theme (CSS, Layout with iframe demo, global IconList component).

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/.vitepress/theme/style.css Adds VitePress brand tokens and doc/demo-specific styling (icon list, resource cards, iframe wrapper, changelog timeline).
docs/.vitepress/theme/Layout.vue Custom layout that conditionally embeds the H5 demo in an iframe on component docs pages.
docs/.vitepress/theme/index.ts Registers the custom theme assets and globally registers IconList.
docs/.vitepress/theme/components/IconList.vue New Vue version of the icon list renderer used by docs.
docs/.vitepress/config.mts VitePress config (base/nav/sidebar/etc.) plus a dev middleware to serve /h5/ assets from examples/demo/dist.
.gitignore Stops ignoring the whole .vitepress/ directory; ignores only cache/dist outputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/.vitepress/config.mts
Comment thread docs/.vitepress/config.mts
Comment thread docs/.vitepress/config.mts
Comment thread docs/.vitepress/theme/Layout.vue
Comment thread docs/.vitepress/theme/components/IconList.vue
Comment thread docs/.vitepress/theme/components/IconList.vue
@robinv8 robinv8 merged commit 96c2eee into jd-opensource:next May 11, 2026
5 checks passed
@bjmhe bjmhe deleted the hotfix_docs_20260509 branch May 11, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants