Use meta-description instead of description in templates.
Since this is an attribute value, we need to prepare it in the writer.
This commit is contained in:
parent
528b67df59
commit
99e1b67b74
3 changed files with 7 additions and 4 deletions
|
@ -13,8 +13,8 @@ $endif$
|
||||||
$if(keywords)$
|
$if(keywords)$
|
||||||
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
|
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
|
||||||
$endif$
|
$endif$
|
||||||
$if(description)$
|
$if(description-meta)$
|
||||||
<meta name="description" content="$description$" />
|
<meta name="description" content="$description-meta$" />
|
||||||
$endif$
|
$endif$
|
||||||
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
|
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
|
@ -13,8 +13,8 @@ $endif$
|
||||||
$if(keywords)$
|
$if(keywords)$
|
||||||
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
|
<meta name="keywords" content="$for(keywords)$$keywords$$sep$, $endfor$" />
|
||||||
$endif$
|
$endif$
|
||||||
$if(description)$
|
$if(description-meta)$
|
||||||
<meta name="description" content="$description$" />
|
<meta name="description" content="$description-meta$" />
|
||||||
$endif$
|
$endif$
|
||||||
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
|
<title>$if(title-prefix)$$title-prefix$ – $endif$$pagetitle$</title>
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -254,6 +254,8 @@ pandocToHtml opts (Pandoc meta blocks) = do
|
||||||
let stringifyHTML = escapeStringForXML . stringify
|
let stringifyHTML = escapeStringForXML . stringify
|
||||||
let authsMeta = map stringifyHTML $ docAuthors meta
|
let authsMeta = map stringifyHTML $ docAuthors meta
|
||||||
let dateMeta = stringifyHTML $ docDate meta
|
let dateMeta = stringifyHTML $ docDate meta
|
||||||
|
let descriptionMeta = escapeStringForXML $
|
||||||
|
lookupMetaString "description" meta
|
||||||
slideVariant <- gets stSlideVariant
|
slideVariant <- gets stSlideVariant
|
||||||
let sects = adjustNumbers opts $
|
let sects = adjustNumbers opts $
|
||||||
makeSections (writerNumberSections opts) Nothing $
|
makeSections (writerNumberSections opts) Nothing $
|
||||||
|
@ -352,6 +354,7 @@ pandocToHtml opts (Pandoc meta blocks) = do
|
||||||
defField "author-meta" authsMeta .
|
defField "author-meta" authsMeta .
|
||||||
maybe id (defField "date-meta")
|
maybe id (defField "date-meta")
|
||||||
(normalizeDate dateMeta) .
|
(normalizeDate dateMeta) .
|
||||||
|
defField "description-meta" descriptionMeta .
|
||||||
defField "pagetitle"
|
defField "pagetitle"
|
||||||
(stringifyHTML . docTitle $ meta) .
|
(stringifyHTML . docTitle $ meta) .
|
||||||
defField "idprefix" (writerIdentifierPrefix opts) .
|
defField "idprefix" (writerIdentifierPrefix opts) .
|
||||||
|
|
Loading…
Add table
Reference in a new issue