Commit 6a6ba907fc

6a6ba907fcb7be36d1d1397ee1a30a430c0c3bce

parent: 4d6da96d4d

Unsigned

Alicia Sykes <alicia@omg.lol> · 2024-02-25 15:27 UTC

Ready for deploy

Layout: unified · split

web/astro.config.mjs +11 −1
@@ -5,9 +5,19 @@ import sitemap from '@astrojs/sitemap';
55import vercel from "@astrojs/vercel/serverless";
66// import netlify from "@astrojs/netlify";
77
8const siteMapConfig = {
9 entryLimit: 10000,
10 changefreq: 'weekly',
11 priority: 0.7,
12 lastmod: new Date(),
13 filter: (page) => { // Exclude search result pages
14 return !page.url.startsWith('/search/') && page.url.split('/').length > 2;
15 },
16};
17
818export default defineConfig({
919 output: 'hybrid',
10 integrations: [svelte(), partytown(), sitemap()],
20 integrations: [svelte(), partytown(), sitemap(siteMapConfig)],
1121 site: import.meta.env.SITE_URL || 'https://awesome-privacy.xyz',
1222 adapter: vercel(),
1323 // adapter: netlify(),
web/security.txt.html added
web/src/components/things/Comments.svelte added +24
@@ -0,0 +1,24 @@
1<svelte:head>
2 <script async lang="javascript">
3 var remark_config = {
4 host: "https://comments.as93.net",
5 site_id: "awesome-privacy",
6 components: ["embed"],
7 show_rss_subsription: true,
8 theme: "dark",
9 };
10 !(function (e, n) {
11 for (var o = 0; o < e.length; o++) {
12 var r = n.createElement("script"),
13 c = ".js",
14 d = n.head || n.body;
15 "noModule" in r ? ((r.type = "module"), (c = ".mjs")) : (r.async = !0),
16 (r.defer = !0),
17 (r.src = remark_config.host + "/web/" + e[o] + c),
18 d.appendChild(r);
19 }
20 })(remark_config.components || ["embed"], document);
21
22</script>
23</svelte:head>
24<div id="remark42" />
web/src/components/things/SectionList.astro +18
@@ -109,6 +109,24 @@ ul {
109109 a {
110110 text-decoration: none;
111111 color: var(--foreground);
112 position: relative;
113 &:after {
114 background: none repeat scroll 0 0 transparent;
115 bottom: 0;
116 content: "";
117 display: block;
118 height: 2px;
119 left: 50%;
120 position: absolute;
121 background: var(--accent-3);
122 transition: width 0.15s ease 0s, left 0.15s ease 0s;
123 width: 0;
124 }
125 &:hover:after {
126 text-decoration: underline;
127 width: 80%;
128 left: 0;
129 }
112130 }
113131 .service-count {
114132 color: var(--accent-3);
web/src/env.d.ts +1
@@ -1 +1,2 @@
1/// <reference path="../.astro/types.d.ts" />
12/// <reference types="astro/client" />
web/src/utils/fetch-data.ts +4 −2
@@ -3,13 +3,15 @@ import yaml from 'js-yaml';
33
44import type { AwesomePrivacy } from '../types/Service';
55
6const awesomePrivacyData = 'https://raw.githubusercontent.com/Lissy93/awesome-privacy/main/awesome-privacy.yml';
7
68export const fetchData = async (): Promise<AwesomePrivacy> => {
7 return await fetch('http://localhost:4321/awesome-privacy.yml')
9 return await fetch(awesomePrivacyData)
810 .then((res) => res.text())
911 .then((data) => yaml.load(data))
1012 .catch((err) => console.error('ah crap', err)) as AwesomePrivacy;
1113}
1214
1315export const slugify = (title: string) => {
14 return title.toLowerCase().replace(/\s/g, '-');
16 return title.toLowerCase().replace(/\s/g, '-');z
1517};