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

CopilotAI commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

📖 文档预览

构建成功!点击下方链接在线预览文档(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

SecretDescription
FTP_USERNAMEFTP login username
FTP_PASSWORDFTP login password

CopilotAIand 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>

CopilotAI left a comment

Copy link
Copy Markdown

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
FileDescription
qa/discussion.mdAdds VitePress FAQ page for discussion/DM troubleshooting.
public/logo.pngAdds site logo asset used by VitePress config.
public/badge.pngAdds badge example image for community docs page.
package.jsonIntroduces VitePress build/dev scripts and dependency.
legal/eula.mdAdds EULA page in new docs structure.
index.mdAdds VitePress home page frontmatter + feature cards.
guide/installation.mdAdds installation guide content for the new docs site.
features/rating.mdAdds rating feature documentation (includes a math formula).
features/index.mdAdds feature overview page.
features/image-hosting.mdAdds image hosting feature documentation.
features/get-data.mdAdds “get test data” feature documentation.
features/auto-handin.mdAdds “auto hand-in” feature documentation.
community/contributing.mdAdds contribution guidelines page.
community/badges.mdAdds badge/tag documentation page referencing /badge.png.
apps/messages.mdAdds “messages web app” documentation page.
apps/elxmoj.mdAdds ELXMOJ desktop client documentation page.
Writerside/xd.treeRemoves Writerside TOC/instance profile.
Writerside/writerside.cfgRemoves Writerside project configuration.
Writerside/v.listRemoves Writerside variable list.
Writerside/topics/docs/q&a/discussion.mdRemoves old Writerside Q&A discussion doc.
Writerside/topics/docs/joinus.mdRemoves old Writerside contributing/join page.
Writerside/topics/docs/index.mdRemoves old Writerside landing page.
Writerside/topics/docs/functions/rating.mdRemoves old Writerside rating doc.
Writerside/topics/docs/functions/pics.mdRemoves old Writerside image hosting doc.
Writerside/topics/docs/functions/data.mdRemoves old Writerside data feature doc.
Writerside/topics/docs/functions/auto-handin.mdRemoves old Writerside auto-handin doc.
Writerside/topics/docs/eula.mdRemoves old Writerside EULA doc.
Writerside/topics/docs/ads.mdRemoves old Writerside ads page.
Writerside/topics/Installation.mdRemoves old Writerside installation stub.
Writerside/topics/Badges.mdRemoves old Writerside badges page.
Writerside/redirection-rules.xmlRemoves Writerside redirection rules.
Writerside/cfg/glossary.xmlRemoves Writerside glossary config.
Writerside/cfg/buildprofiles.xmlRemoves Writerside build profiles config.
Writerside/c.listRemoves Writerside categories list.
.vitepress/theme/style.cssAdds custom GitHub/Primer-inspired VitePress styling.
.vitepress/theme/index.jsLoads the custom theme stylesheet.
.vitepress/config.mtsAdds VitePress site config (nav/sidebar/search/footer/edit link).
.gitignoreIgnores Node/VitePress build outputs and cache.
.github/workflows/test.ymlAdds CI workflow to build docs on PRs and non-master pushes.
.github/workflows/preview.ymlAdds PR preview build + FTP deploy + PR comment link.
.github/workflows/preview-cleanup.ymlAdds PR-closed cleanup job to delete FTP preview directory.
.github/workflows/build.ymlReplaces Writerside build with Node/VitePress build and Pages publish.

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

Comment threadfeatures/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

github-actionsBot commented Apr 25, 2026

Copy link
Copy Markdown

📖 文档预览

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

🔗 在线预览

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

@PythonSmall-Q

Copy link
Copy Markdown
Member

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

CopilotAI commented Apr 25, 2026

Copy link
Copy Markdown
ContributorAuthor

@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>

CopilotAI commented Apr 25, 2026

Copy link
Copy Markdown
ContributorAuthor

@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-QPythonSmall-Q changed the title ci: FTP preview deployment with per-PR folders and auto-cleanuprewriteApr 25, 2026
Comment threadfeatures/get-data.md Outdated
Updated warning message about known bugs and data retrieval issues.
@PythonSmall-Q

Copy link
Copy Markdown
Member

done

@def-WA2025
def-WA2025 merged commit 8cc0ea4 into masterMay 1, 2026
4 checks passed
@PythonSmall-Q

PythonSmall-Q commented May 1, 2026 via email

Copy link
Copy Markdown
Member

@PythonSmall-Q

PythonSmall-Q commented May 2, 2026 via email

Copy link
Copy Markdown
Member

@PythonSmall-Q

PythonSmall-Q commented May 2, 2026 via email

Copy link
Copy Markdown
Member

Sign up for freeto 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

4 participants

@PythonSmall-Q@boomzero