Ready for deploy

This commit is contained in:
Alicia Sykes 2024-02-25 15:27:58 +00:00
parent 4d6da96d4d
commit 6a6ba907fc
6 changed files with 58 additions and 3 deletions

View file

@ -5,9 +5,19 @@ import sitemap from '@astrojs/sitemap';
import vercel from "@astrojs/vercel/serverless";
// import netlify from "@astrojs/netlify";
const siteMapConfig = {
entryLimit: 10000,
changefreq: 'weekly',
priority: 0.7,
lastmod: new Date(),
filter: (page) => { // Exclude search result pages
return !page.url.startsWith('/search/') && page.url.split('/').length > 2;
},
};
export default defineConfig({
output: 'hybrid',
integrations: [svelte(), partytown(), sitemap()],
integrations: [svelte(), partytown(), sitemap(siteMapConfig)],
site: import.meta.env.SITE_URL || 'https://awesome-privacy.xyz',
adapter: vercel(),
// adapter: netlify(),

0
web/security.txt.html Normal file
View file

View file

@ -0,0 +1,24 @@
<svelte:head>
<script async lang="javascript">
var remark_config = {
host: "https://comments.as93.net",
site_id: "awesome-privacy",
components: ["embed"],
show_rss_subsription: true,
theme: "dark",
};
!(function (e, n) {
for (var o = 0; o < e.length; o++) {
var r = n.createElement("script"),
c = ".js",
d = n.head || n.body;
"noModule" in r ? ((r.type = "module"), (c = ".mjs")) : (r.async = !0),
(r.defer = !0),
(r.src = remark_config.host + "/web/" + e[o] + c),
d.appendChild(r);
}
})(remark_config.components || ["embed"], document);
</script>
</svelte:head>
<div id="remark42" />

View file

@ -109,6 +109,24 @@ ul {
a {
text-decoration: none;
color: var(--foreground);
position: relative;
&:after {
background: none repeat scroll 0 0 transparent;
bottom: 0;
content: "";
display: block;
height: 2px;
left: 50%;
position: absolute;
background: var(--accent-3);
transition: width 0.15s ease 0s, left 0.15s ease 0s;
width: 0;
}
&:hover:after {
text-decoration: underline;
width: 80%;
left: 0;
}
}
.service-count {
color: var(--accent-3);

1
web/src/env.d.ts vendored
View file

@ -1 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />

View file

@ -3,13 +3,15 @@ import yaml from 'js-yaml';
import type { AwesomePrivacy } from '../types/Service';
const awesomePrivacyData = 'https://raw.githubusercontent.com/Lissy93/awesome-privacy/main/awesome-privacy.yml';
export const fetchData = async (): Promise<AwesomePrivacy> => {
return await fetch('http://localhost:4321/awesome-privacy.yml')
return await fetch(awesomePrivacyData)
.then((res) => res.text())
.then((data) => yaml.load(data))
.catch((err) => console.error('ah crap', err)) as AwesomePrivacy;
}
export const slugify = (title: string) => {
return title.toLowerCase().replace(/\s/g, '-');
return title.toLowerCase().replace(/\s/g, '-');z
};