chore: update README for clarity and formatting improvements
fix: update test imports to use new package path refactor: improve feed class structure and formatting refactor: enhance smartfeed class for better readability chore: streamline plugin exports for consistency chore: update TypeScript configuration for improved compatibility ci: add workflows for handling tag and non-tag pushes
This commit is contained in:
@@ -10,7 +10,10 @@ export class Smartfeed {
|
||||
/**
|
||||
* creates a feed from a standardized article object (@tsclass/tsclass).content.IArticle
|
||||
*/
|
||||
public async createFeedFromArticleArray(optionsArg: IFeedOptions, articleArray: plugins.tsclass.content.IArticle[]): Promise<string> {
|
||||
public async createFeedFromArticleArray(
|
||||
optionsArg: IFeedOptions,
|
||||
articleArray: plugins.tsclass.content.IArticle[],
|
||||
): Promise<string> {
|
||||
const feed = this.createFeed(optionsArg);
|
||||
for (const article of articleArray) {
|
||||
feed.addItem({
|
||||
@@ -19,7 +22,7 @@ export class Smartfeed {
|
||||
imageUrl: article.featuredImageUrl,
|
||||
title: article.title,
|
||||
url: article.url,
|
||||
content: article.content
|
||||
content: article.content,
|
||||
});
|
||||
}
|
||||
const feedXmlString = feed.exportAtomFeed();
|
||||
@@ -45,4 +48,4 @@ export class Smartfeed {
|
||||
const resultingFeed = await parser.parseURL(urlArg);
|
||||
return resultingFeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user