Skip to content

Commit

Permalink
Merge pull request #142 from ChtiJS/fix/feed-extractor
Browse files Browse the repository at this point in the history
fix(planete): using extract instead of read that is deprecated
  • Loading branch information
Sterbenfr authored Dec 5, 2023
2 parents 10c98d2 + 9e7e41d commit 143c796
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@types/node": "^18.11.9",
"@types/react": "18.2.38",
"@types/react-dom": "18.2.16",
"@extractus/feed-extractor": "^7.0.7",
"@extractus/feed-extractor": "^7.0.8",
"front-matter": "^4.0.2",
"lunr": "^2.3.9",
"next": "14.0.3",
Expand Down
8 changes: 4 additions & 4 deletions src/pages/planete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Strong from '../components/strong';
import Anchor from '../components/a';
import Article from '../components/article';
import Cite from '../components/cite';
import { read } from '@extractus/feed-extractor';
import { extract } from '@extractus/feed-extractor';
import type { GetStaticProps } from 'next';

const BLOGS = [
Expand All @@ -29,8 +29,8 @@ const BLOGS = [
];

type Entry = {
entry: Required<Awaited<ReturnType<typeof read>>>['entries'][number];
feedData: Omit<Awaited<ReturnType<typeof read>>, 'entries'>;
entry: Required<Awaited<ReturnType<typeof extract>>>['entries'][number];
feedData: Omit<Awaited<ReturnType<typeof extract>>, 'entries'>;
blog: typeof BLOGS[number];
};
type Props = {
Expand Down Expand Up @@ -93,7 +93,7 @@ export const getStaticProps: GetStaticProps<Props> = async () => {
const entries = (
await Promise.all(
BLOGS.map(async (blog) => {
const { entries, ...data } = await read(blog.feed);
const { entries, ...data } = await extract(blog.feed);

return {
blog,
Expand Down

0 comments on commit 143c796

Please sign in to comment.