-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converts existing privacy and terms pages to use content collections
- Loading branch information
1 parent
77f2ed1
commit c9f8809
Showing
2 changed files
with
19 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
--- | ||
import { fetchPolicy } from "~/helpers/helpers"; | ||
import { render, getEntry } from "astro:content"; | ||
import ProseLayout from "~/layouts/ProseLayout.astro"; | ||
const content = await fetchPolicy("privacy"); | ||
const entry = await getEntry("policy", "privacy"); | ||
if (entry === undefined) | ||
throw new Error( | ||
"Entry `privacy` was undefined, this could mean the source file is under a different path.", | ||
); | ||
const { Content } = await render(entry); | ||
--- | ||
|
||
<ProseLayout | ||
title="Privacy" | ||
description="The privacy of your data—and it is your data, not ours!—is a big deal to us. Here’s the rundown of what we collect and why, when we access your information, and your rights." | ||
color="brown" | ||
> | ||
<article set:html={content} /> | ||
<Content /> | ||
</ProseLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters