Skip to content

Commit

Permalink
Add /other/freedom and /other/one-shot
Browse files Browse the repository at this point in the history
`/other/freedom` links to the Fandom article on the Volume 10 extra mini art book titled "Freedom Love Hell".

`/other/one-shot` links to the section of the "Freedom Love Hell" article with the original Houseki no Kuni one-shot chapter.

Increased hnkrocks-chapter-router version to 2.9.0
  • Loading branch information
MajorTanya committed Feb 18, 2024
1 parent f1aff9f commit 55ec788
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ _All routes are relative to the base URL `https://hnk.rocks`._
- [Other works by Haruko Ichikawa](#other-works-by-haruko-ichikawa)
- [Works directly related to Houseki no Kuni](#works-directly-related-to-houseki-no-kuni)
- ["Pseudomorph of Love" (Artbook)](#pseudomorph-of-love-artbook)
- [Freedom Love Hell (Japanese Volume 10 Extra)](#freedom-love-hell-japanese-volume-10-extra)
- [Original one-shot (Part of Japanese Volume 10 Extra)](#original-one-shot-part-of-japanese-volume-10-extra)
- [Lorebook (Japanese Volume 11 Extra)](#lorebook-japanese-volume-11-extra)
- ["Party at the End" (Japanese Volume 12 Extra)](#party-at-the-end-japanese-volume-12-extra)
- [Works unrelated to Houseki no Kuni:](#works-unrelated-to-houseki-no-kuni)
Expand Down Expand Up @@ -358,6 +360,41 @@ Example: [https://hnk.rocks/other/pseudomorph](https://hnk.rocks/other/pseudomor

---

#### Freedom Love Hell (Japanese Volume 10 Extra)

<table>
<tr>
<td><code>/freedom</code></td>
<td><code>/love-freedom</code></td>
<td><code>/love-freedom-hell</code></td>
<td><code>/vol10-extra</code></td>
</tr>
</table>

Redirects to the [Houseki no Kuni fandom wiki article](https://houseki-no-kuni.fandom.com/wiki/Freedom) with the
Artbook. This includes the [original Houseki no Kuni one-shot](#original-one-shot-part-of-japanese-volume-10-extra)
chapter.

Example: [https://hnk.rocks/other/freedom](https://hnk.rocks/other/freedom)

---

#### Original one-shot (Part of Japanese Volume 10 Extra)

<table>
<tr>
<td><code>/one-shot</code></td>
<td><code>/oneshot</code></td>
</tr>
</table>

Redirects to the section of the [Houseki no Kuni fandom wiki article](https://houseki-no-kuni.fandom.com/wiki/Freedom)
with the [Freedom Love Hell](#freedom-love-hell-japanese-volume-10-extra) Artbook, which includes this one-shot chapter.

Example: [https://hnk.rocks/other/one-shot](https://hnk.rocks/other/one-shot)

---

#### Lorebook (Japanese Volume 11 Extra)

<table>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hnkrocks-chapter-router",
"version": "2.8.3",
"version": "2.9.0",
"dependencies": {
"itty-router": "^4.0.27",
"reflare": "^1.1.5"
Expand Down
2 changes: 2 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export const HNK_MINIMALIST_URL = 'https://mangadex.org/title/37bf7574-641e-4665
export const HNK_PARTY_AT_THE_END_URL = 'https://github.com/coconutcastle/HNK_party_at_the_end/blob/master/readfile.md' as const;
export const HNK_PSEUDOMORPH_URL = 'https://houseki-no-kuni.fandom.com/wiki/Pseudomorph_of_Love' as const;
export const HNK_TITLE_URL = 'https://mangadex.org/title/cade38b7-64c4-4a29-8e3c-8c283291d6c6/houseki-no-kuni' as const;
export const HNK_FREEDOM_URL = 'https://houseki-no-kuni.fandom.com/wiki/Freedom' as const;
export const HNK_ONESHOT_URL = 'https://houseki-no-kuni.fandom.com/wiki/Freedom#Houseki_No_Kuni_One_Shot' as const;

// Other Ichikawa works
export const MOSHIMO_TOKYO_URL = 'https://mangadex.org/title/fa91e632-8556-446e-8227-b6003acab958/moshimo-tokyo' as const;
Expand Down
10 changes: 10 additions & 0 deletions src/handlers/handleOtherWorks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { IRequestStrict } from 'itty-router/Router';
import {
HNK_FREEDOM_URL,
HNK_LOREBOOK_URL,
HNK_ONESHOT_URL,
HNK_PARTY_AT_THE_END_URL,
HNK_PSEUDOMORPH_URL,
MOSHIMO_TOKYO_URL,
Expand All @@ -22,6 +24,14 @@ export const handleOtherWorks = async (request: IRequestStrict): Promise<Respons
case 'pseudomorph':
case 'pseudomorph-of-love':
return Response.redirect(HNK_PSEUDOMORPH_URL, 307);
case 'freedom':
case 'love-freedom':
case 'love-freedom-hell':
case 'vol10-extra':
return Response.redirect(HNK_FREEDOM_URL, 307);
case 'oneshot':
case 'one-shot':
return Response.redirect(HNK_ONESHOT_URL, 307);
case 'lorebook':
case 'hnk-lorebook':
case 'vol11-extra':
Expand Down

0 comments on commit 55ec788

Please sign in to comment.