Fixed cover-image
in EPUB YAML metadata.
This commit is contained in:
parent
96b678d823
commit
17ef39d157
2 changed files with 4 additions and 3 deletions
4
README
4
README
|
@ -542,7 +542,7 @@ Options affecting specific writers
|
||||||
`--epub-cover-image=`*FILE*
|
`--epub-cover-image=`*FILE*
|
||||||
: Use the specified image as the EPUB cover. It is recommended
|
: Use the specified image as the EPUB cover. It is recommended
|
||||||
that the image be less than 1000px in width and height. Note that
|
that the image be less than 1000px in width and height. Note that
|
||||||
in a markdown source document you can also specify `epub-cover-image`
|
in a markdown source document you can also specify `cover-image`
|
||||||
in a YAML metadata block (see [EPUB Metadata], below).
|
in a YAML metadata block (see [EPUB Metadata], below).
|
||||||
|
|
||||||
`--epub-metadata=`*FILE*
|
`--epub-metadata=`*FILE*
|
||||||
|
@ -2820,7 +2820,7 @@ The following fields are recognized:
|
||||||
~ A string value.
|
~ A string value.
|
||||||
`rights`
|
`rights`
|
||||||
~ A string value.
|
~ A string value.
|
||||||
`epub-cover-image`
|
`cover-image`
|
||||||
~ A string value (path to cover image).
|
~ A string value (path to cover image).
|
||||||
|
|
||||||
Literate Haskell support
|
Literate Haskell support
|
||||||
|
|
|
@ -279,7 +279,8 @@ metadataFromMeta opts meta = EPUBMetadata{
|
||||||
relation = metaValueToString <$> lookupMeta "relation" meta
|
relation = metaValueToString <$> lookupMeta "relation" meta
|
||||||
coverage = metaValueToString <$> lookupMeta "coverage" meta
|
coverage = metaValueToString <$> lookupMeta "coverage" meta
|
||||||
rights = metaValueToString <$> lookupMeta "rights" meta
|
rights = metaValueToString <$> lookupMeta "rights" meta
|
||||||
coverImage = lookup "epub-cover-image" (writerVariables opts)
|
coverImage = lookup "epub-cover-image" (writerVariables opts) `mplus`
|
||||||
|
(metaValueToString <$> lookupMeta "cover-image" meta)
|
||||||
|
|
||||||
-- | Produce an EPUB file from a Pandoc document.
|
-- | Produce an EPUB file from a Pandoc document.
|
||||||
writeEPUB :: WriterOptions -- ^ Writer options
|
writeEPUB :: WriterOptions -- ^ Writer options
|
||||||
|
|
Loading…
Reference in a new issue