add twitter [etc] card previews
This commit is contained in:
parent
8865b951fa
commit
5ad4e3dc30
9 changed files with 115 additions and 57 deletions
|
@ -90,7 +90,7 @@ makeRules :: FilePath -- ^ prefix
|
|||
-> Builder
|
||||
makeRules prefix filters build data_ tmp = [b|@0
|
||||
$@buildPrefix/%/index.html: $@data_/%/info.yaml $$(MAKEPAGES)
|
||||
$$(call single,$@data_,$flags)
|
||||
$$(call single,$@data_,$@prefix,$flags)
|
||||
|
||||
$@tmpPrefix/%.mk: $@data_/%/info.yaml $$(MAKEPAGES)
|
||||
$$(call depend-single,$@prefix,$@build,$@data_,$flags)
|
||||
|
@ -112,16 +112,3 @@ filtersToFlags (GalleryFilters {nsfw}) =
|
|||
|
||||
thumbnail :: Info -> FilePath
|
||||
thumbnail = fromMaybe (error "no thumbnail or sfw images") . #thumb
|
||||
|
||||
addSuffix :: String -> FilePath -> FilePath
|
||||
addSuffix suf path =
|
||||
let (pre, ext) = splitExtension path in
|
||||
pre ++ suf ++ ext
|
||||
|
||||
thumbFile :: FilePath -> FilePath
|
||||
thumbFile = addSuffix "_small"
|
||||
|
||||
pageFile :: FilePath -> FilePath
|
||||
pageFile f
|
||||
| takeExtension f == ".gif" = f
|
||||
| otherwise = addSuffix "_med" f
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue