-
Notifications
You must be signed in to change notification settings - Fork 1
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
3 changed files
with
78 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (C) myl7 | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
const meta = { | ||
title: 'Random notes', | ||
description: 'Notes about anything that come out of my mind with the guidance of the world', | ||
url: '/random-notes', | ||
pubDate: '2023-11-09', | ||
updDate: '2023-11-09', | ||
} | ||
export default meta |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// Copyright (C) myl7 | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { serialize } from 'next-mdx-remote/serialize' | ||
|
||
import MDXRemote from '@/app/mdx/mdxRemote' | ||
import { remarkPlugins, rehypePlugins } from '@/app/mdx/plugins' | ||
|
||
import src from './random-notes.md?raw' | ||
import meta from './meta' | ||
|
||
import type { Metadata } from 'next' | ||
|
||
export const metadata: Metadata = { | ||
title: meta.title, | ||
description: meta.description, | ||
alternates: { | ||
canonical: meta.url, | ||
}, | ||
openGraph: { | ||
title: meta.title, | ||
description: meta.description, | ||
url: meta.url, | ||
siteName: 'mylmoe', | ||
type: 'article', | ||
publishedTime: `${meta.pubDate}T00:00:00.000Z`, | ||
modifiedTime: `${meta.updDate}T00:00:00.000Z`, | ||
}, | ||
} | ||
|
||
export default async function Page() { | ||
const mdxSrc = await serialize(src, { mdxOptions: { remarkPlugins, rehypePlugins, format: 'md' } }) | ||
|
||
return ( | ||
<main> | ||
<section className="flex flex-col gap-2 rounded border-2 border-bg-l4 bg-bg-l1 p-2 font-serif dark:border-bg-d4 dark:bg-bg-d1"> | ||
<h1 className="text-2xl">{meta.title}</h1> | ||
<hr className="border-bg-l4 dark:border-bg-d4" /> | ||
<p className="text-sm"> | ||
{meta.pubDate == meta.updDate ? ( | ||
<> | ||
updated & published on <time>{meta.updDate}</time> | ||
</> | ||
) : ( | ||
<> | ||
updated on <time>{meta.updDate}</time> & published on <time>{meta.pubDate}</time> | ||
</> | ||
)} | ||
</p> | ||
<hr className="border-bg-l4 dark:border-bg-d4" /> | ||
<p> | ||
<span className="italic">Abstract:</span> {meta.description} | ||
</p> | ||
<hr className="border-bg-l4 dark:border-bg-d4" /> | ||
<MDXRemote {...mdxSrc} /> | ||
</section> | ||
</main> | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<!-- Copyright (C) myl7 --> | ||
<!-- SPDX-License-Identifier: CC0 --> | ||
|
||
Old world blue is new world hope | ||
|
||
## License | ||
|
||
SPDX-License-Identifier: CC0 |
8b65ed0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mylmoe – ./
mylmoe.vercel.app
mylmoe-myl7.vercel.app
myl.moe
mylmoe-git-main-myl7.vercel.app
www.myl.moe