-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
30 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
import { fileURLToPath } from "node:url"; | ||
import { join } from "node:path"; | ||
import { parse as parsePath } from "path"; | ||
import { join, parse as parsePath } from "node:path"; | ||
|
||
export function getDistFilePath(dir: URL, pathname: string, component: string) { | ||
const base = fileURLToPath(dir); | ||
|
||
if (pathname === "/404") { | ||
return join(base, "404.html"); | ||
} | ||
|
||
if (parsePath(component).name === "index") { | ||
const { name, ext } = parsePath(component); | ||
|
||
if (name === "index" && ext && pathname !== component) { | ||
return join(base, pathname, "index.html"); | ||
} | ||
|
||
return join(base, pathname + ".html"); | ||
} | ||
return join(base, `${pathname}.html`); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Cosenseの基本的な使い方 | ||
redirect_from: | ||
- /articles/scrapbox/ | ||
--- | ||
|
||
## この記事のハイライト | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Basic Use of Cosense | ||
redirect_from: | ||
- /en/articles/scrapbox/ | ||
--- | ||
|
||
## Highlights of This Article | ||
|
This file was deleted.
Oops, something went wrong.