mirror of
https://github.com/valentineus/popov.link.git
synced 2025-07-04 00:20:26 +03:00
14 lines
342 B
TypeScript
14 lines
342 B
TypeScript
|
import type { WithContext, Blog } from "schema-dts";
|
||
|
|
||
|
export type BlogSchemaParams = {
|
||
|
readonly siteUrl: string;
|
||
|
readonly title: string;
|
||
|
};
|
||
|
|
||
|
export default ({ siteUrl, title }: BlogSchemaParams): WithContext<Blog> => ({
|
||
|
"@context": "https://schema.org",
|
||
|
"@type": "Blog",
|
||
|
"url": new URL("/blog/", siteUrl).toString(),
|
||
|
"name": title,
|
||
|
});
|