Skip to content

Commit fa370aa

Browse files
committed
only get markdown articles and ignore medium.com
1 parent 8b7ab2d commit fa370aa

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

src/lib/publications/getPublications.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,17 @@ export const getBlogPosts = (): IPublication[] => {
129129
export const getPublications = async (): Promise<IPublication[] | null> => {
130130
try {
131131
const blogPosts = getBlogPosts();
132-
const mediumPublications = await getMediumPublications();
133-
134-
return blogPosts
135-
.concat(mediumPublications)
136-
.sort((publication, otherPublication) => {
137-
const date = new Date(publication.latestPublishedAt);
138-
const otherDate = new Date(otherPublication.latestPublishedAt);
139-
return otherDate.getTime() - date.getTime();
140-
});
132+
// const mediumPublications = await getMediumPublications();
133+
134+
return (
135+
blogPosts
136+
// .concat(mediumPublications)
137+
.sort((publication, otherPublication) => {
138+
const date = new Date(publication.latestPublishedAt);
139+
const otherDate = new Date(otherPublication.latestPublishedAt);
140+
return otherDate.getTime() - date.getTime();
141+
})
142+
);
141143
} catch (err) {
142144
console.error("error: " + err);
143145
return null;

0 commit comments

Comments
 (0)