-
Notifications
You must be signed in to change notification settings - Fork 7
Update #43
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
Update #43
Conversation
- 添加 starlight-scroll-to-top 插件 - 合并远程分支的新功能:学校周边设施、考试相关内容 - 保留本地的编程语言学习内容 - 更新网站URL为 njuptnavi.netlify.app - 添加自定义分页组件配置
…r, while, and do-while loops, including syntax, examples, best practices, and common pitfalls.
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 refactors the documentation site by removing custom image components in favor of integrated plugins and adds new C programming language content with extensive code examples.
- Removes custom
ImageComponent.astro
across all content files and replaces it with thestarlight-image-zoom
plugin - Adds comprehensive C programming tutorial content with three new chapters
- Integrates several new plugins including mermaid diagram support, scroll-to-top functionality, and image zoom capabilities
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
astro.config.mjs | Adds new plugin integrations and reorganizes sidebar structure with C language section |
package.json | Adds dependencies for new plugins (mermaid, image zoom, scroll-to-top) |
src/components/ImageComponent.astro | Removes custom image component entirely |
src/content/docs/learn/program/c/*.mdx | Adds three comprehensive C programming tutorials with extensive code examples |
src/content/docs/life/network/autologin.mdx | Replaces video thumbnails with embedded bilibili iframe players |
Multiple content files | Removes imports and usage of the custom ImageComponent |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;"> | ||
<iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" src="//player.bilibili.com/player.html?aid=114126038762288&bvid=BV1MuRWY4Ema&cid=28759034574&page=1" frameborder="0" allowfullscreen></iframe> | ||
</div> |
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.
The iframe src uses a protocol-relative URL (//player.bilibili.com/...) which could potentially load over HTTP on insecure connections. Consider using an absolute HTTPS URL for better security.
Copilot uses AI. Check for mistakes.
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;"> | ||
<iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" src="//player.bilibili.com/player.html?aid=114126038762357&bvid=BV1MuRWY4E2b&cid=28759034829&page=1" frameborder="0" allowfullscreen></iframe> | ||
</div> |
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.
The iframe src uses a protocol-relative URL (//player.bilibili.com/...) which could potentially load over HTTP on insecure connections. Consider using an absolute HTTPS URL for better security.
Copilot uses AI. Check for mistakes.
@@ -75,7 +76,9 @@ import { Aside, Tabs, TabItem, Steps } from '@astrojs/starlight/components'; | |||
</TabItem> | |||
|
|||
<TabItem label="Windows / Linux / macOS"> | |||
[](https://www.bilibili.com/video/BV1MuRWY4E2b/) | |||
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;"> | |||
<iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" src="//player.bilibili.com/player.html?aid=114126038762357&bvid=BV1MuRWY4E2b&cid=28759034829&page=1" frameborder="0" allowfullscreen></iframe> |
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.
The frameborder
attribute is deprecated in HTML5. Use CSS border: none
instead for better standards compliance.
Copilot uses AI. Check for mistakes.
This pull request introduces several improvements and refactors to the documentation site configuration, content, and dependencies. The most significant changes include integrating new plugins for enhanced user experience, cleaning up redundant code, and updating dependency management. Below are the key changes grouped by theme:
Site configuration and feature enhancements:
starlight-scroll-to-top
,starlight-image-zoom
, andastro-mermaid
integrations toastro.config.mjs
for improved navigation, image interaction, and diagram support. Mermaid is configured with a custom theme.astro.config.mjs
for better organization, including a new section for programming languages and improved formatting.Dependency management:
package.json
for the integrated plugins (astro-mermaid
,mermaid
,starlight-image-zoom
,starlight-scroll-to-top
) and reorganized devDependencies for semantic-release tools.Code cleanup and refactoring:
ImageComponent.astro
and all imports/usages across content files, relying instead on the new image zoom plugin for image interaction. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Content improvements:
General code style consistency:
Let me know if you'd like to discuss any of these changes in more detail!