Skip to content

Commit 71f95eb

Browse files
committed
Merge #213: feat(blog): add sources of public domain torrents post
2c0dcff fix: add noopener to all target=_blank links (Jose Celano) 1170399 feat(blog): add sources of public domain torrents post with awesome-legal-torrent-sources repo (Jose Celano) Pull request description: ## Summary Adds a new blog post curating sources of legal, public-domain, and openly-licensed torrents. Also creates the companion repository [torrust/awesome-legal-torrent-sources](https://github.com/torrust/awesome-legal-torrent-sources) as a community-maintained canonical list that the blog post links to. ## Changes - New blog post `sources-of-public-domain-torrents` with curated list of legal torrent sources - New companion repo `torrust/awesome-legal-torrent-sources` for community-maintained updates - Cover image for the post - Metadata and blog listing updated ## Related issue Closes #114 ACKs for top commit: josecelano: ACK 2c0dcff Tree-SHA512: 4198cbcbcfe1c57241b5fdbf86d1bf3b464af40954453f66ba8c1af814f2f62bb1ec91150ad2e1527c0b49936e1c419f71b6fb9a9af24774d0a34b806f8d4f9a
2 parents 5ebd4a2 + 2c0dcff commit 71f95eb

5 files changed

Lines changed: 583 additions & 106 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { getMetadata } from '$lib/data/metadata';
2+
import type { PageServerLoad } from './$types';
3+
4+
export const load: PageServerLoad = async ({ url }) => {
5+
const slug = url.pathname.split('/').filter(Boolean).pop();
6+
if (!slug) throw new Error('Slug could not be determined.');
7+
8+
const metadata = await getMetadata();
9+
const currentPost = metadata.find((post) => post.slug === slug);
10+
11+
if (!currentPost) throw new Error(`Post not found: ${slug}`);
12+
13+
return { currentPost, allPosts: metadata };
14+
};

0 commit comments

Comments
 (0)