mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
fix(route): gq tw no header img (#11556)
This commit is contained in:
@@ -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(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user