items = []; for ($i = 0; $i < 5; $i++) { $url = self::LATEST_POSTS . $i; $content = getContents($url); $array = json_decode($content, true); if ($array['posts'] != null) { foreach ($array['posts'] as $post) { $item = []; $item['title'] = $post['title']; $item['content'] = nl2br(htmlspecialchars($post['brief'])); $item['timestamp'] = $post['dateAdded']; if ($post['partOfPublication'] === true) { $item['uri'] = sprintf( 'https://%s.hashnode.dev/%s', $post['publication']['username'], $post['slug'] ); } else { $item['uri'] = sprintf('https://hashnode.com/post/%s', $post['slug']); } if (!isset($item['uri'])) { continue; } $this->items[] = $item; } } } } public function getName() { return self::NAME . ': Recent posts'; } } elease/refs/pull/2705/merge'>changeset-release/refs/pull/2705/merge Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/.devcontainer (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-12-08[ci] formatGravatar matthewp 2-2/+4
2022-12-08fix: Error reporting fails on undefined error index (#5539)Gravatar wulinsheng123 2-1/+6
2022-12-08astro-rss: Generate feed with proper XML escaping (#5550)Gravatar Anders Kaseorg 5-36/+57
2022-12-08Fix Astro.params not having values when using base in SSR (#5553)Gravatar Matthew Phillips 6-4/+66
2022-12-07Allow all redirection status codes in redirect() (#5446)Gravatar Jeffrey Yasskin 2-1/+6
2022-12-06feat(astro-rss): generate post content in feed (#5366)Gravatar Ben Smith 4-1/+46
2022-12-06[ci] formatGravatar matthewp 2-7/+6
2022-12-06Use accumulated sort order when order production CSS (#5549)Gravatar Matthew Phillips 15-2/+180
2022-12-06[ci] formatGravatar matthewp 22-158/+171
2022-12-06Head propagation (#5511)Gravatar Matthew Phillips 36-279/+804
2022-12-06[ci] formatGravatar matthewp 1-7/+7
2022-12-06Removed premature optimization (#5548)Gravatar Ido S 2-37/+35
2022-12-06Exclude astro from Vite optimization (#5545)Gravatar Bjorn Lu 2-1/+6
2022-12-06bench workflow - use bash as shell (#5546)Gravatar Matthew Phillips 1-2/+4
2022-12-06bench workflow - pipe stderr (#5543)Gravatar Matthew Phillips 1-2/+4
2022-12-06Update esbuild dependency (#5534)Gravatar Bjorn Lu 7-18/+275
2022-12-06Fix tests with node 18 (#5528)Gravatar Bjorn Lu 1-9/+14