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'; |
| 5 | 5 | import vercel from "@astrojs/vercel/serverless"; |
| 6 | 6 | // import netlify from "@astrojs/netlify"; |
| 7 | 7 | |
| 8 | const 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 | |
| 8 | 18 | export default defineConfig({ |
| 9 | 19 | output: 'hybrid', |
| 10 | | integrations: [svelte(), partytown(), sitemap()], |
| 20 | integrations: [svelte(), partytown(), sitemap(siteMapConfig)], |
| 11 | 21 | site: import.meta.env.SITE_URL || 'https://awesome-privacy.xyz', |
| 12 | 22 | adapter: vercel(), |
| 13 | 23 | // 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 { |
| 109 | 109 | a { |
| 110 | 110 | text-decoration: none; |
| 111 | 111 | 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 | } |
| 112 | 130 | } |
| 113 | 131 | .service-count { |
| 114 | 132 | color: var(--accent-3); |
web/src/env.d.ts
+1
| @@ -1 +1,2 @@ |
| 1 | /// <reference path="../.astro/types.d.ts" /> |
| 1 | 2 | /// <reference types="astro/client" /> |
web/src/utils/fetch-data.ts
+4 −2
| @@ -3,13 +3,15 @@ import yaml from 'js-yaml'; |
| 3 | 3 | |
| 4 | 4 | import type { AwesomePrivacy } from '../types/Service'; |
| 5 | 5 | |
| 6 | const awesomePrivacyData = 'https://raw.githubusercontent.com/Lissy93/awesome-privacy/main/awesome-privacy.yml'; |
| 7 | |
| 6 | 8 | export const fetchData = async (): Promise<AwesomePrivacy> => { |
| 7 | | return await fetch('http://localhost:4321/awesome-privacy.yml') |
| 9 | return await fetch(awesomePrivacyData) |
| 8 | 10 | .then((res) => res.text()) |
| 9 | 11 | .then((data) => yaml.load(data)) |
| 10 | 12 | .catch((err) => console.error('ah crap', err)) as AwesomePrivacy; |
| 11 | 13 | } |
| 12 | 14 | |
| 13 | 15 | export const slugify = (title: string) => { |
| 14 | | return title.toLowerCase().replace(/\s/g, '-'); |
| 16 | return title.toLowerCase().replace(/\s/g, '-');z |
| 15 | 17 | }; |