fix(route): gq tw no header img (#11556)
This commit is contained in:
parent
0a943aa592
commit
0b9ccd763e
|
|
@ -1,4 +1,6 @@
|
|||
{{ if src }}
|
||||
<figure>
|
||||
<img src="{{ src }}"{{ if alt }} alt="{{@ alt }}"{{ /if }}>
|
||||
{{ if alt }}<figcaption>{{@ alt }}</figcaption>{{ /if }}
|
||||
</figure>
|
||||
{{ /if }}
|
||||
|
|
|
|||
|
|
@ -136,8 +136,8 @@ module.exports = async (ctx) => {
|
|||
dangerousDek: transformed.article.headerProps.dangerousDek, // quote
|
||||
lede: art(path.join(__dirname, '../templates/img.art'), {
|
||||
// header image
|
||||
src: largestImage(lede.sources, lede.id),
|
||||
alt: lede.caption,
|
||||
src: lede?.sources ? largestImage(lede.sources, lede.id) : null,
|
||||
alt: lede?.caption,
|
||||
}),
|
||||
articleBody: articleBody.html(),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue