summaryrefslogtreecommitdiff
path: root/src/components/templates/SimplePostList.astro
diff options
context:
space:
mode:
authorJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-07-06 22:27:04 -0300
committerJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-07-06 22:27:04 -0300
commit449f71511e539878af4c65f073cdc373b469c45e (patch)
tree6c264a77426284d97d1c9b9d7a27a6015c3077a8 /src/components/templates/SimplePostList.astro
parent4ae2b810b68538ba4c287b0c80d6c2e002fe9ddd (diff)
feat: more structured data
Signed-off-by: João Augusto Costa Branco Marado Torres <torres.dev@disroot.org>
Diffstat (limited to 'src/components/templates/SimplePostList.astro')
-rw-r--r--src/components/templates/SimplePostList.astro33
1 files changed, 23 insertions, 10 deletions
diff --git a/src/components/templates/SimplePostList.astro b/src/components/templates/SimplePostList.astro
index c2c002b..164b32b 100644
--- a/src/components/templates/SimplePostList.astro
+++ b/src/components/templates/SimplePostList.astro
@@ -21,14 +21,22 @@ const { posts } = Astro.props;
const display = name ?? email ?? entity;
return (
<li>
- <article>
- <h3><a href={`/blog/read/${id}`}>{title}</a></h3>
- {
- description &&
- description.split("\n\n").map((paragraph) => (
- <p class="small">{paragraph}</p>
- ))
- }
+ <article
+ itemprop="blogPost"
+ itemscope
+ itemtype="https://schema.org/BlogPosting"
+ >
+ <h3>
+ <a href={`/blog/read/${id}`} itemprop="headline name">{title}</a>
+ </h3>
+ <div itemprop="abstract">
+ {
+ description &&
+ description.split("\n\n").map((paragraph) => (
+ <p class="small">{paragraph}</p>
+ ))
+ }
+ </div>
<footer class="small">
<Date
@@ -39,7 +47,12 @@ const { posts } = Astro.props;
month: "long",
day: "numeric",
}}
- />{display}
+ itemprop="dateModified"
+ /><span
+ itemprop="author"
+ itemscope
+ itemtype="https://schema.org/Person"
+ ><span itemprop="alternateName">{display}</span></span>
<KeywordsList {keywords} />
</footer>
</article>
@@ -58,7 +71,7 @@ const { posts } = Astro.props;
& > article {
padding-inline-end: calc(var(--size-9) * 1em);
- & > p:not(:first-of-type) {
+ & > [itemprop="abstract"] > p:not(:first-of-type) {
margin-block-start: 1.5em;
}