Skip to content

Commit 67cbcb6

Browse files
committed
fix: og on index
1 parent cf44a25 commit 67cbcb6

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

templates/page.typ

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
#import "/templates/tola.typ": wrap-page
22
#import "/templates/base.typ": base, colors
3-
#import "/utils/tola.typ": cls
3+
#import "/utils/tola.typ": cls, og-tags
44
#import "@tola/site:0.0.0": info
55

66
#let page = wrap-page(
7-
base: base,
8-
head: m => [
9-
#if m.title != none {
10-
html.title(m.title + " | " + info.title)
11-
} else {
12-
html.title(info.title)
13-
}
14-
],
15-
view: (body, m) => {
16-
show heading.where(level: 1): it => html.h2(class: cls("text-2xl font-bold mt-8 mb-4", colors.accent))[#it.body]
17-
show heading.where(level: 2): it => html.h3(class: "text-xl font-semibold mt-6 mb-3")[#it.body]
18-
body
19-
},
7+
base: base,
8+
head: m => [
9+
#og-tags(
10+
title: m.title,
11+
description: info.description,
12+
type: "article",
13+
site-name: info.title,
14+
author: info.author,
15+
tags: (),
16+
image: "/images/avatar.png"
17+
)
18+
#if m.title != none {
19+
html.title(m.title + " | " + info.title)
20+
}
21+
],
22+
view: (body, m) => {
23+
show heading.where(level: 1): it => html.h2(class: cls("text-2xl font-bold mt-8 mb-4", colors.accent))[#it.body]
24+
show heading.where(level: 2): it => html.h3(class: "text-xl font-semibold mt-6 mb-3")[#it.body]
25+
body
26+
},
2027
)

0 commit comments

Comments
 (0)