Improved meta data
This commit is contained in:
@ -11,6 +11,7 @@ import (
|
||||
|
||||
const maxEpisodes = 26
|
||||
const maxEpisodesLongSeries = 5
|
||||
const maxDescriptionLength = 170
|
||||
|
||||
// Get anime page.
|
||||
func Get(ctx *aero.Context) string {
|
||||
@ -40,16 +41,23 @@ func Get(ctx *aero.Context) string {
|
||||
}
|
||||
|
||||
// Open Graph
|
||||
description := anime.Summary
|
||||
|
||||
if len(description) > maxDescriptionLength {
|
||||
description = description[:maxDescriptionLength-3] + "..."
|
||||
}
|
||||
|
||||
openGraph := &arn.OpenGraph{
|
||||
Tags: map[string]string{
|
||||
"og:title": anime.Title.Canonical,
|
||||
"og:image": anime.Image.Large,
|
||||
"og:url": "https://" + ctx.App.Config.Domain + anime.Link(),
|
||||
"og:site_name": "notify.moe",
|
||||
"og:description": anime.Summary,
|
||||
"og:description": description,
|
||||
},
|
||||
Meta: map[string]string{
|
||||
"description": anime.Summary,
|
||||
"description": description,
|
||||
"keywords": anime.Title.Canonical + ",anime",
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -7,13 +7,13 @@ component Anime(anime *arn.Anime, tracks []*arn.SoundTrack, user *arn.User, epis
|
||||
.space
|
||||
|
||||
.anime-info
|
||||
h2.anime-title(title=anime.Type)= anime.Title.Canonical
|
||||
h1.anime-title(title=anime.Type)= anime.Title.Canonical
|
||||
|
||||
//- if user && user.titleLanguage === "japanese"
|
||||
//- span.second-title(title=anime.Title.English !== anime.Title.Romaji ? anime.Title.English : null)= anime.Title.Romaji
|
||||
//- else
|
||||
if anime.Title.Japanese != anime.Title.Canonical
|
||||
.anime-alternative-title
|
||||
h2.anime-alternative-title
|
||||
a(href="http://jisho.org/search/" + anime.Title.Japanese, target="_blank", title="Look up reading on jisho.org", rel="nofollow")= anime.Title.Japanese
|
||||
|
||||
//- h3.anime-section-name.anime-summary-header Summary
|
||||
|
@ -38,7 +38,11 @@
|
||||
|
||||
.anime-alternative-title
|
||||
font-size 0.9em
|
||||
margin-top 0
|
||||
margin-bottom 0.5rem
|
||||
text-align left
|
||||
font-weight normal
|
||||
line-height content-line-height
|
||||
a
|
||||
color rgba(60, 60, 60, 0.5) !important
|
||||
|
||||
|
Reference in New Issue
Block a user