-
|
I want to add text like this at the end of RSS entry: <a href="<URL>">see the rest of the article</a>I want to make sure that everybody knows that this is not the whole article by adding a CTA (call to action). Is there a way to get the URL of the blog post from |
Beta Was this translation helpful? Give feedback.
Answered by
slorber
Mar 11, 2024
Replies: 1 comment 1 reply
-
|
You have access to all blog post metadata, cf my answer here: createFeedItems: async ({ blogPosts,...params }) => {
const feedItems = await params.defaultCreateFeedItems({ blogPosts, ...params });
feedItems.forEach(async (feedItem,index) => {
const blogPost = blogPosts[index]!;
const permalink = blogPost.metadata.permalink;
const cta = `<a href="${permalink}">see the rest of the article</a>`
feedItem.content = feedItem.content + cta;
});
return feedItems;
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jcubic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have access to all blog post metadata, cf my answer here:
#9934 (reply in thread)