Skip to content

Conversation

AstroAir
Copy link
Contributor

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:

  • Added starlight-scroll-to-top, starlight-image-zoom, and astro-mermaid integrations to astro.config.mjs for improved navigation, image interaction, and diagram support. Mermaid is configured with a custom theme.
  • Updated the sidebar structure in astro.config.mjs for better organization, including a new section for programming languages and improved formatting.

Dependency management:

  • Added new dependencies to 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:

Content improvements:

  • Updated the "编程语言" section in the sidebar to include a subgroup for "C 语言".
  • Fixed a typo in the tab label from "WC?舟" to "WC?洲" in the 仙林校区介绍 document.
  • Replaced static video thumbnails with responsive embedded bilibili video players in the 校园网自动登录 guide for Android and Windows/Linux/macOS. [1] [2]

General code style consistency:

  • Standardized import statements and formatting in config and content files for better readability and maintainability.

Let me know if you'd like to discuss any of these changes in more detail!

- 添加 starlight-scroll-to-top 插件
- 合并远程分支的新功能:学校周边设施、考试相关内容
- 保留本地的编程语言学习内容
- 更新网站URL为 njuptnavi.netlify.app
- 添加自定义分页组件配置
…r, while, and do-while loops, including syntax, examples, best practices, and common pitfalls.
@AstroAir AstroAir requested a review from Copilot September 16, 2025 18:54
Copy link

@Copilot 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 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 the starlight-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.

Comment on lines +68 to +70
<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>
Copy link
Preview

Copilot AI Sep 16, 2025

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.

Comment on lines +79 to +81
<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>
Copy link
Preview

Copilot AI Sep 16, 2025

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">
[![Windows / Linux / macOS 视频教程](https://i2.hdslb.com/bfs/archive/61f58444f3570f2753e5b624f77816e1739f50d5.jpg@154w_87h)](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>
Copy link
Preview

Copilot AI Sep 16, 2025

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.

@AstroAir AstroAir closed this Sep 16, 2025
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.

1 participant