Skip to content

Add article-level short links and /n, /n/ fallback - #203

Merged
lsy-404 merged 3 commits into
mainfrom
Generate-short-link-redirects-for-posts
Jul 7, 2026
Merged

lsy-404 merged 3 commits into
mainfrom
Generate-short-link-redirects-for-posts

Conversation

@lsy-404

@lsy-404 lsy-404 commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Extends the /n/{vol} issue short-link redirects with article-level short links: /n/{vol}/{article}
    • 0 = 卷首语 (intro), 1..n = 正常文章 (matches the article's own numeric suffix)
    • c = 漫画 (or c1/c2... when an issue has more than one comic)
    • p = 图 (paintings), i = 访谈 (interview), o = 干员秘闻 (ope_sec), s = 特别企划 (specialproj)
  • /n and /n/ now redirect to /posts/ when no volume is given

Test plan

  • pnpm run docs:build succeeds
  • Verified dist/_redirects against user-supplied examples: /n/20/3 -> /posts/2024-03/article3.html, /n/19/i -> /posts/2024-02/interview.html
  • Verified single-comic issues use c (no number) and the one dual-comic issue (2023-09) uses c1/c2

lsy-404 added 3 commits July 7, 2026 20:43
- /n/{vol}/{article}: intro=0, articles keep their numeric suffix,
  comics use c (c1/c2... only when multiple exist per issue),
  paintings=p, interview=i, ope_sec=o, specialproj=s
- /n and /n/ redirect to /posts/ when no volume is given
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

🚀 Preview deployment ready!

项目 详情
Preview URL https://d2235096.aneot.pages.dev
Commit 9e102dd
提交时间 2026-07-07T21:08:08+08:00
提交者 Wuyilingwei 53390868+wuyilingwei@users.noreply.github.com
提交信息 Merge origin/main (squash-merge conflict, no content change)

@lsy-404
lsy-404 merged commit a2db2f9 into main Jul 7, 2026
1 check passed
@lsy-404
lsy-404 deleted the Generate-short-link-redirects-for-posts branch July 7, 2026 13:10
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