aboutsummaryrefslogtreecommitdiff
path: root/src/utils/schemas
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-04-22 21:53:50 +0300
committerValentin Popov <valentin@popov.link>2026-04-22 21:53:50 +0300
commit9a0746a4715400ab8ef37ec23a4df93ae712e74b (patch)
tree5678821ab8e56f3098a26240f5db0f13fa25bf5c /src/utils/schemas
parenta6efbdc3aba7cbc3918976ad1a3c4143363c6f7a (diff)
downloadpopov.link-9a0746a4715400ab8ef37ec23a4df93ae712e74b.tar.xz
popov.link-9a0746a4715400ab8ef37ec23a4df93ae712e74b.zip
feat: add RSS feed generation and update package metadata
- Implemented a new RSS feed generation feature in src/pages/feed.xml.ts, allowing users to follow blog updates. - Updated package.json and package-lock.json to include license information and new type definitions for markdown-it and sanitize-html. - Refactored createOgImage function to return Uint8Array instead of Buffer for better compatibility. - Simplified pageSchema by removing the optional mainEntityId parameter for cleaner schema generation.
Diffstat (limited to 'src/utils/schemas')
-rw-r--r--src/utils/schemas/pageSchema.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils/schemas/pageSchema.ts b/src/utils/schemas/pageSchema.ts
index ba8fd86..2305986 100644
--- a/src/utils/schemas/pageSchema.ts
+++ b/src/utils/schemas/pageSchema.ts
@@ -4,14 +4,13 @@ import { personId, websiteId } from "./ids";
export type WebsiteSchemaParams = {
readonly description: string;
readonly lang: string;
- readonly mainEntityId?: string;
readonly page: string;
readonly siteUrl: string;
readonly title: string;
readonly type?: "WebPage" | "ProfilePage";
};
-export default ({ siteUrl, page, title, description, lang, type = "WebPage", mainEntityId }: WebsiteSchemaParams): WebPage | ProfilePage => {
+export default ({ siteUrl, page, title, description, lang, type = "WebPage" }: WebsiteSchemaParams): WebPage | ProfilePage => {
const url = new URL(page, siteUrl).toString();
const base = {
@@ -28,7 +27,7 @@ export default ({ siteUrl, page, title, description, lang, type = "WebPage", mai
return {
...base,
"@type": "ProfilePage",
- "mainEntity": { "@id": mainEntityId ?? personId(siteUrl) },
+ "mainEntity": { "@id": personId(siteUrl) },
};
}