mirror of
http://nostr-git-proxy.forgejo.svc.cluster.local/git/45387ca441053e230b2126802005eb03767ab59d84555e8bac86b6e7def14e27/bestdadjokes
synced 2026-11-03 07:26:59 +00:00
feat(seo): add school, cars, and ocean topic clusters
All checks were successful
Build and Deploy / deploy (push) Successful in 19s
All checks were successful
Build and Deploy / deploy (push) Successful in 19s
This commit is contained in:
parent
0f5372b42b
commit
21a8f9e294
1 changed files with 27 additions and 1 deletions
28
build.py
28
build.py
|
|
@ -52,6 +52,15 @@ TOPICS = [
|
|||
{"slug": "winter", "name": "Winter Dad Jokes", "emoji": "⛄",
|
||||
"intro": "These winter dad jokes are snow joke. Perfect for breaking the ice at any cold-weather gathering.",
|
||||
"keywords": r"\b(winter|snow|snowman|ic(y|icle)|frost|chill)\b"},
|
||||
{"slug": "school", "name": "Dad Jokes About School", "emoji": "\U0001F392",
|
||||
"intro": "Class clown certified jokes for teachers, students, and anyone who survived homework. These school dad jokes will get you a passing grade in groans.",
|
||||
"keywords": r"\b(school|teacher|class|student|homework|math|book|read|study)\b"},
|
||||
{"slug": "cars", "name": "Dad Jokes About Cars", "emoji": "\U0001F697",
|
||||
"intro": "Drive everyone up the wall during your next road trip. These car dad jokes are strictly automatic when it comes to terrible punchlines.",
|
||||
"keywords": r"\b(car|drive|road|truck|tire|wheel|traffic)\b"},
|
||||
{"slug": "ocean", "name": "Dad Jokes About the Ocean", "emoji": "\U0001F30A",
|
||||
"intro": "Water you waiting for? Dive into these shore-fire maritime puns. These ocean dad jokes will make waves at any beach party.",
|
||||
"keywords": r"\b(ocean|sea|beach|water|tides?|waves?|boat|ship|sail|sand|sharks?|fish)\b"},
|
||||
]
|
||||
MIN_TOPIC_JOKES = 5
|
||||
|
||||
|
|
@ -311,7 +320,24 @@ def page_topic(slug):
|
|||
</div>"""
|
||||
title = '%s — %d Clean, Groan-Worthy Jokes' % (t['name'], len(js))
|
||||
desc = '%s %s' % (t['intro'], 'A curated collection of %d clean, family-friendly jokes.' % len(js))
|
||||
return layout(title, desc, body, '/topic/%s/' % slug)
|
||||
|
||||
faq_ld = {
|
||||
"@context": "https://schema.org",
|
||||
"@type": "FAQPage",
|
||||
"mainEntity": [
|
||||
{
|
||||
"@type": "Question",
|
||||
"name": j['setup'].replace('\n', ' '),
|
||||
"acceptedAnswer": {
|
||||
"@type": "Answer",
|
||||
"text": j['punch']
|
||||
}
|
||||
} for j in js
|
||||
]
|
||||
}
|
||||
|
||||
return layout(title, desc, body, '/topic/%s/' % slug,
|
||||
'<script type="application/ld+json">%s</script>' % json.dumps(faq_ld).replace('</', '<\/'))
|
||||
|
||||
|
||||
def page_generator():
|
||||
|
|
|
|||
Loading…
Reference in a new issue