Use the site name in opengraph tags
…which involves passing around the index file to a lot more places
This commit is contained in:
parent
73cd0ca74e
commit
f51ea184bb
5 changed files with 45 additions and 31 deletions
|
@ -28,16 +28,19 @@ instance Show NoEligibleImages where
|
|||
|
||||
|
||||
make :: Text -- ^ website root
|
||||
-> Text -- ^ website name
|
||||
-> FilePath -- ^ gallery prefix
|
||||
-> Bool -- ^ nsfw?
|
||||
-> FilePath -- ^ data dir
|
||||
-> FilePath -- ^ subdir of datadir containing this @info.yaml@
|
||||
-> Info -> IO Lazy.Text
|
||||
make root prefix nsfw dataDir dir info =
|
||||
toLazyText <$> make' root prefix nsfw dataDir dir info
|
||||
make root siteName prefix nsfw dataDir dir info =
|
||||
toLazyText <$> make' root siteName prefix nsfw dataDir dir info
|
||||
|
||||
make' :: Text -> FilePath -> Bool -> FilePath -> FilePath -> Info -> IO Builder
|
||||
make' root prefix nsfw _dataDir dir info@(Info {date, title, artist, bg}) = do
|
||||
make' :: Text -> Text -> FilePath -> Bool -> FilePath -> FilePath -> Info
|
||||
-> IO Builder
|
||||
make' root siteName prefix nsfw _dataDir dir
|
||||
info@(Info {date, title, artist, bg}) = do
|
||||
let images = imagesFor nsfw info
|
||||
|
||||
let undir = joinPath (replicate (length (splitPath dir)) "..")
|
||||
|
@ -104,7 +107,7 @@ make' root prefix nsfw _dataDir dir info@(Info {date, title, artist, bg}) = do
|
|||
|
||||
<meta property=og:type content=og:website>
|
||||
<meta property=og:title content="$title">
|
||||
<meta property=og:site_name content="$title">
|
||||
<meta property=og:site_name content="$siteName">
|
||||
<meta property=og:description content="$desc">
|
||||
<meta property=og:image content="$url/$thumb">
|
||||
<meta property=og:url content="$url">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue