Skip to content

Commit

Permalink
fix: node-modules page (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
esemyonov authored Dec 19, 2023
1 parent aa62a2f commit a07d09e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
15 changes: 0 additions & 15 deletions docs/articles/node-modules.md

This file was deleted.

8 changes: 5 additions & 3 deletions src/app/articles/node-modules/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default async function Page() {
performance of each API Gateway we must approve each module. This
process only takes a few hours so if you need something new please reach
out to use on twitter{" "}
<Link href="https://twitter.com/zuplo">@zuplo</Link> or through email
<Link href="https://twitter.com/zuplo">@zuplo</Link> or through email{" "}
<Link href="mailto:[email protected]">[email protected]</Link>
</p>

Expand All @@ -41,13 +41,15 @@ export default async function Page() {
{data.map((bundle) => (
<tr key={bundle.name}>
<td>
<a
<Link
href={
bundle.url ?? `https://www.npmjs.com/package/${bundle.name}`
}
rel="noopener noreferrer"
target="_blank"
>
{bundle.name}
</a>
</Link>
</td>
<td>{bundle.version}</td>
<td>{bundle.description}</td>
Expand Down
6 changes: 5 additions & 1 deletion src/lib/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ export async function getSlugContent<Data = Record<string, any>>({
sourceDir: string;
}): Promise<Content<Data> | undefined> {
const fileName = `${slug.join("/")}.md`;
const filepath = path.join(process.cwd(), sourceDir, fileName);
const filepath = path.join(
process.cwd(),
sourceDir,
fileName.replace("%5C", "/"),
);
if (!existsSync(filepath)) {
return undefined;
}
Expand Down

0 comments on commit a07d09e

Please sign in to comment.