mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-27 22:49:56 -05:00
Merge pull request #4901 from felixrieseberg/RSS-Image
Add Post Image to RSS Feed
This commit is contained in:
commit
13a610a8e1
1 changed files with 5 additions and 0 deletions
|
@ -510,6 +510,11 @@ frontendControllers = {
|
|||
},
|
||||
htmlContent = cheerio.load(post.html, {decodeEntities: false});
|
||||
|
||||
if (post.image) {
|
||||
htmlContent('p').first().before('<img src="' + post.image + '" />');
|
||||
htmlContent('img').attr('alt', post.title);
|
||||
}
|
||||
|
||||
// convert relative resource urls to absolute
|
||||
['href', 'src'].forEach(function (attributeName) {
|
||||
htmlContent('[' + attributeName + ']').each(function (ix, el) {
|
||||
|
|
Loading…
Add table
Reference in a new issue