Add fediverse:creator tag to pages

This commit is contained in:
Bad Manners 2024-11-21 10:10:49 -03:00
parent 51cdd232ad
commit 5d701069e9
No known key found for this signature in database
GPG key ID: 8C88292CCB075609
9 changed files with 22 additions and 137 deletions

View file

@ -1,11 +1,12 @@
# licenses.toml
file = "licenses.toml"
url = "https://gallery.badmanners.xyz/licenses.toml"
[copyright]
title = "gallery.badmanners.xyz"
description = "Bad Manners's self-hosted gallery."
type = "website"
date = "2024"
author = { name = "Bad Manners", url = "https://badmanners.xyz", email = "me@badmanners.xyz>" }
author = { name = "Bad Manners", url = "https://badmanners.xyz", email = "me@badmanners.xyz" }
source = "https://git.badmanners.xyz/badmanners/gallery.badmanners.xyz"
license = { name = "MIT", url = "https://opensource.org/license/mit" }
notes = """All rights reserved. \
@ -24,7 +25,7 @@ notes = """My characters, whether directly attributed to me or unattributed, are
type = "content"
description = "Content hosted on this website, i.e. the stories, games, and blog posts."
date = "2022-2024"
author = { name = "Bad Manners", url = "https://badmanners.xyz", email = "me@badmanners.xyz>" }
author = { name = "Bad Manners", url = "https://badmanners.xyz", email = "me@badmanners.xyz" }
source = "https://git.badmanners.xyz/badmanners/gallery.badmanners.xyz/src/branch/main/src/content"
license = { name = "CC-BY-NC-ND-4.0", url = "https://creativecommons.org/licenses/by-nc-nd/4.0/" }
notes = "All rights reserved."
@ -60,7 +61,7 @@ notes = """All third-party copyrights and trademarks belong to their respective
[[attributions]]
description = "Edited icons for other websites."
type = "icons"
author = { name = "Bad Manners", url = "https://badmanners.xyz", email = "me@badmanners.xyz>" }
author = { name = "Bad Manners", url = "https://badmanners.xyz", email = "me@badmanners.xyz" }
source = "https://git.badmanners.xyz/badmanners/badmanners.xyz/src/branch/main/src/components/icons/brands"
license = { name = "CC0 1.0 Universal", url = "https://creativecommons.org/publicdomain/zero/1.0/" }
items = [

View file

@ -47,6 +47,7 @@ const relatedBlogPosts = (await getEntries(props.relatedBlogPosts)).filter((post
relatedGames={relatedGames}
relatedBlogPosts={relatedBlogPosts}
posts={props.posts}
authors={authorsList}
labelReturnTo={{ title: t(props.lang, "blog/return_to_blog_posts"), link: "/blog" }}
labelPreviousContent={t(props.lang, "blog/previous_post_aria_label")}
labelNextContent={t(props.lang, "blog/next_post_aria_label")}

View file

@ -44,6 +44,7 @@ const metaDescription = t(props.lang, "game/warnings", props.platforms, props.co
relatedGames={relatedGames}
relatedBlogPosts={relatedBlogPosts}
posts={props.posts}
authors={authorsList}
labelReturnTo={{ title: t(props.lang, "game/return_to_games"), link: "/games" }}
labelPreviousContent={t(props.lang, "game/previous_game_aria_label")}
labelNextContent={t(props.lang, "game/next_game_aria_label")}

View file

@ -49,6 +49,7 @@ type Props = {
relatedGames?: CollectionEntry<"games">[];
relatedBlogPosts?: CollectionEntry<"blog">[];
posts: Posts;
authors: CollectionEntry<"users">[];
/* Layout attributes */
publishedContentType: "story" | "game" | "blog post";
@ -126,6 +127,12 @@ const returnTo = series
</Fragment>
) : null
}
{
props.authors
.map((user) => user.data.links.mastodon?.username)
.filter((value) => value)
.map((username) => <meta name="fediverse:creator" content={`@${username}`} />)
}
<slot name="head" />
</Fragment>
<div

View file

@ -55,6 +55,7 @@ const metaDescription = t(props.lang, "story/warnings", wordCount, props.content
relatedGames={relatedGames}
relatedBlogPosts={relatedBlogPosts}
posts={props.posts}
authors={authorsList}
labelReturnTo={{ title: t(props.lang, "story/return_to_stories"), link: "/stories" }}
labelPreviousContent={t(props.lang, "story/previous_story_aria_label")}
labelNextContent={t(props.lang, "story/next_story_aria_label")}