Skip to content

rewrite#3

Merged
def-WA2025 merged 14 commits into
masterfrom
copilot/rewrite-docs-with-modern-architecture
May 1, 2026
Merged

rewrite#3
def-WA2025 merged 14 commits into
masterfrom
copilot/rewrite-docs-with-modern-architecture

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

📖 文档预览

构建成功!点击下方链接在线预览文档(PR 关闭后自动删除)。

🔗 在线预览

预览地址:http://xmoj-docs.infinityfreeapp.com/pr-3/
构建运行:#5

Replace artifact-based PR previews with live FTP deployment to xmoj-docs.infinityfreeapp.com. Each PR gets an isolated directory; closing the PR deletes it automatically.

Changes

preview.yml

  • Swap actions/upload-artifact for SamKirkland/FTP-Deploy-Action@v4.3.5
  • Uploads .vitepress/dist/pr-{N}/ on ftpupload.net:21 using FTP_USERNAME/FTP_PASSWORD secrets
  • PR bot comment now links to http://xmoj-docs.infinityfreeapp.com/pr-{N}/ (live URL, not a download)

preview-cleanup.yml (new)

  • Triggers on pull_request: [closed]
  • Uses lftp to rm -rf pr-{N}/ from FTP, keeping the server clean

Required secrets

Secret Description
FTP_USERNAME FTP login username
FTP_PASSWORD FTP login password

Copilot AI and others added 6 commits April 25, 2026 07:11
Agent-Logs-Url: https://github.com/XMOJ-Script-dev/docs/sessions/6160bb51-f3e1-42ac-9a73-6c347813d3f9

Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Agent-Logs-Url: https://github.com/XMOJ-Script-dev/docs/sessions/eb49bb44-1a27-4e25-94ae-ef1df73fdc18

Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Agent-Logs-Url: https://github.com/XMOJ-Script-dev/docs/sessions/39cacf77-dc43-4016-9311-f11137134a8d

Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Agent-Logs-Url: https://github.com/XMOJ-Script-dev/docs/sessions/6c49dfe8-b721-45ea-9c4a-187134ec1c5a

Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Copy link
Copy Markdown

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 replaces the existing Writerside-based documentation setup with a VitePress site, updates CI to build/deploy the docs to GitHub Pages, and adds PR preview deployments via FTP with per-PR directories and cleanup on PR close.

Changes:

  • Migrate documentation source/content from Writerside to VitePress (new .vitepress config/theme + reorganized Markdown pages + new public assets).
  • Update GitHub Pages build workflow to run npm run docs:build and publish .vitepress/dist.
  • Add PR preview workflow that builds docs and deploys to pr-{N}/ on an FTP host, plus a cleanup workflow to delete that directory when PRs close.

Reviewed changes

Copilot reviewed 39 out of 45 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
qa/discussion.md Adds VitePress FAQ page for discussion/DM troubleshooting.
public/logo.png Adds site logo asset used by VitePress config.
public/badge.png Adds badge example image for community docs page.
package.json Introduces VitePress build/dev scripts and dependency.
legal/eula.md Adds EULA page in new docs structure.
index.md Adds VitePress home page frontmatter + feature cards.
guide/installation.md Adds installation guide content for the new docs site.
features/rating.md Adds rating feature documentation (includes a math formula).
features/index.md Adds feature overview page.
features/image-hosting.md Adds image hosting feature documentation.
features/get-data.md Adds “get test data” feature documentation.
features/auto-handin.md Adds “auto hand-in” feature documentation.
community/contributing.md Adds contribution guidelines page.
community/badges.md Adds badge/tag documentation page referencing /badge.png.
apps/messages.md Adds “messages web app” documentation page.
apps/elxmoj.md Adds ELXMOJ desktop client documentation page.
Writerside/xd.tree Removes Writerside TOC/instance profile.
Writerside/writerside.cfg Removes Writerside project configuration.
Writerside/v.list Removes Writerside variable list.
Writerside/topics/docs/q&a/discussion.md Removes old Writerside Q&A discussion doc.
Writerside/topics/docs/joinus.md Removes old Writerside contributing/join page.
Writerside/topics/docs/index.md Removes old Writerside landing page.
Writerside/topics/docs/functions/rating.md Removes old Writerside rating doc.
Writerside/topics/docs/functions/pics.md Removes old Writerside image hosting doc.
Writerside/topics/docs/functions/data.md Removes old Writerside data feature doc.
Writerside/topics/docs/functions/auto-handin.md Removes old Writerside auto-handin doc.
Writerside/topics/docs/eula.md Removes old Writerside EULA doc.
Writerside/topics/docs/ads.md Removes old Writerside ads page.
Writerside/topics/Installation.md Removes old Writerside installation stub.
Writerside/topics/Badges.md Removes old Writerside badges page.
Writerside/redirection-rules.xml Removes Writerside redirection rules.
Writerside/cfg/glossary.xml Removes Writerside glossary config.
Writerside/cfg/buildprofiles.xml Removes Writerside build profiles config.
Writerside/c.list Removes Writerside categories list.
.vitepress/theme/style.css Adds custom GitHub/Primer-inspired VitePress styling.
.vitepress/theme/index.js Loads the custom theme stylesheet.
.vitepress/config.mts Adds VitePress site config (nav/sidebar/search/footer/edit link).
.gitignore Ignores Node/VitePress build outputs and cache.
.github/workflows/test.yml Adds CI workflow to build docs on PRs and non-master pushes.
.github/workflows/preview.yml Adds PR preview build + FTP deploy + PR comment link.
.github/workflows/preview-cleanup.yml Adds PR-closed cleanup job to delete FTP preview directory.
.github/workflows/build.yml Replaces Writerside build with Node/VitePress build and Pages publish.

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

Comment thread features/rating.md
Comment thread .github/workflows/build.yml
Comment thread .github/workflows/build.yml
Comment thread .github/workflows/test.yml
Comment thread .github/workflows/preview.yml
Comment thread .github/workflows/preview.yml
Comment thread .github/workflows/preview-cleanup.yml
Comment thread .github/workflows/preview.yml Outdated
Comment thread .github/workflows/preview.yml
Comment thread .github/workflows/preview-cleanup.yml
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 25, 2026

📖 文档预览

构建成功!点击下方链接在线预览文档(PR 关闭后自动删除)。

🔗 在线预览

预览地址:http://xmoj-docs.infinityfreeapp.com/pr-3/
构建运行:#9

@PythonSmall-Q
Copy link
Copy Markdown
Member

@copilot ftp服务器上我只看到了文件夹我没有看到任何文件,也没有index页面。跳转链接给有index的

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 25, 2026

@copilot ftp服务器上我只看到了文件夹我没有看到任何文件,也没有index页面。跳转链接给有index的

InfinityFree 的 FTP 根目录本身不对外提供 Web 服务,文件必须放在 htdocs/ 子目录下才能通过域名访问。之前上传路径是 pr-{N}/(FTP 根),改成 htdocs/pr-{N}/ 后文件就会落在 Web 根目录里,http://xmoj-docs.infinityfreeapp.com/pr-{N}/ 就能正常返回 index.html 了。已在 commit 66a5568 中修复。

@PythonSmall-Q
Copy link
Copy Markdown
Member

@copilot css不显示,链接导航有问题

… in subdirectory

Agent-Logs-Url: https://github.com/XMOJ-Script-dev/docs/sessions/85ada21c-c8d8-43ef-8ac7-fcffa87c67c5

Co-authored-by: PythonSmall-Q <106425289+PythonSmall-Q@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 25, 2026

@copilot css不显示,链接导航有问题

VitePress 默认生成绝对路径的静态资源(如 /assets/style.css),部署到 /pr-N/ 子目录时这些路径会指向域名根目录而非子目录,导致 CSS/JS 全部 404。在 commit d74e534 中将构建命令改为 npm run docs:build -- --base /pr-N/,让 VitePress 将所有资源路径和导航链接都相对于 /pr-N/ 生成,CSS 和导航就能正常工作了。

@PythonSmall-Q PythonSmall-Q requested a review from boomzero April 25, 2026 08:24
@PythonSmall-Q PythonSmall-Q changed the title ci: FTP preview deployment with per-PR folders and auto-cleanup rewrite Apr 25, 2026
Comment thread features/get-data.md Outdated
Updated warning message about known bugs and data retrieval issues.
@def-WA2025
Copy link
Copy Markdown
Member

@PythonSmall-Q 给个权限我改一改latex显示

@PythonSmall-Q
Copy link
Copy Markdown
Member

done

@def-WA2025
Copy link
Copy Markdown
Member

@PythonSmall-Q Merge?

@def-WA2025 def-WA2025 merged commit 8cc0ea4 into master May 1, 2026
4 checks passed
@def-WA2025 def-WA2025 deleted the copilot/rewrite-docs-with-modern-architecture branch May 1, 2026 06:40
@PythonSmall-Q
Copy link
Copy Markdown
Member

PythonSmall-Q commented May 1, 2026 via email

@def-WA2025
Copy link
Copy Markdown
Member

不是我预览过了

@PythonSmall-Q
Copy link
Copy Markdown
Member

PythonSmall-Q commented May 2, 2026 via email

@def-WA2025
Copy link
Copy Markdown
Member

我是不是要改一下开发者模式的那一段
那个要点 允许运行用户脚本

@def-WA2025
Copy link
Copy Markdown
Member

还有这是什么图片链接

@PythonSmall-Q
Copy link
Copy Markdown
Member

PythonSmall-Q commented May 2, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] The docs should state how to enable developer mode

5 participants