Skip to content

Commit

Permalink
Add improvements (#4)
Browse files Browse the repository at this point in the history
* Add cloudflare integration

* set cf to 0.0.0-cf-deps-chunk-20240407053056

* Add netlify integration

* Deprecated dockerfile

* Remove vite config

* Formatting

* Remove jxl support temporarly

* Try to use edge functions

* Try to fix contentful

* Upgrade deps

* Update website

* Add floating action buttons & cookie banner

* Fix blog page
  • Loading branch information
deeprobin authored May 6, 2024
1 parent 105bba6 commit 6e2c590
Show file tree
Hide file tree
Showing 113 changed files with 7,692 additions and 6,456 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ pnpm-debug.log*
/test-results/
/playwright-report/
/playwright/.cache/

# netlify
.netlify/
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# DEPRECATED, we use serverless functions now
FROM node:20-alpine3.18 AS build
ENV NODE_ENV=production

Expand Down
62 changes: 24 additions & 38 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
import { defineConfig } from 'astro/config';
import solid from "@astrojs/solid-js";
import sitemap from "@astrojs/sitemap";
import compressor from "astro-compressor";
import compress from "astro-compress";
import critters from "astro-critters";
import rome from "astro-rome";
//import webmanifest from 'astro-webmanifest'; // TODO

//import deno from '@astrojs/deno';
import nodejs from '@astrojs/node';
import partytown from "@astrojs/partytown";
import sentry from "@sentry/astro";
import spotlightjs from "@spotlightjs/astro";
//import sentry from "@sentry/astro";
//import spotlightjs from "@spotlightjs/astro";

//import cloudflare from "@astrojs/cloudflare";
//import netlify from "@astrojs/netlify";
import netlify from '@astrojs/netlify/functions';

// https://astro.build/config
export default defineConfig({
//adapter: deno(),
adapter: nodejs({
mode: 'standalone'
/*adapter: cloudflare({
platformProxy: {
enabled: true
},
imageService: 'cloudflare',
}),*/
adapter: netlify({
edgeMiddleware: true
}),
prefetch: true,
integrations: [solid(), sitemap({
Expand All @@ -30,38 +31,23 @@ export default defineConfig({
},
lastmod: new Date(),
changefreq: 'monthly'
}), critters(), rome(), partytown({
}), partytown({
config: {
forward: ["dataLayer.push"]
}
}), compress(), compressor({
brotli: true,
gzip: true,
fileExtensions: [".html", ".xml", ".css", ".js", ".json", ".png", ".jpg", ".jpeg", ".webp", ".avif", ".ico", ".svg", ".jxl", ".xsl", ".woff2", ".woff", ".ttf", ".eot", ".otf", ".txt", ".md", ".webmanifest", ".mp4", ".webm", ".ogg", ".mp3", ".wav", ".flac", ".aac", ".m4a", ".oga", ".opus", ".svgz", ".zip", ".gz", ".tgz", ".tar", ".rar", ".7z", ".bz2", ".pdf", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".odt", ".ods", ".odp", ".csv", ".rtf", ".epub", ".mobi", ".apk", ".exe", ".swf", ".jar", ".gif", ".bmp", ".ico", ".tif", ".tiff", ".psd", ".ai", ".indd", ".webp", ".avif", ".svg", ".mpg", ".mp2", ".mpeg", ".mpe", ".mpv", ".ogg", ".m4p", ".m4v", ".avi", ".wmv", ".mov", ".qt", ".flv", ".swf", ".avchd", ".mkv", ".webm", ".mng", ".asf", ".wmv", ".avi", ".mp4", ".m4v", ".mpg", ".mpeg", ".mov", ".webm", ".flv", ".mng", ".asx", ".asf", ".wmv", ".avi", ".mp4", ".m4v", ".mpg", ".mpeg", ".mov", ".webm", ".flv", ".mng", ".asx", ".asf", ".wmv", ".avi", ".mp4", ".m4v", ".mpg", ".mpeg", ".mov", ".webm", ".flv", ".mng", ".asx", ".asf", ".wmv", ".avi", ".mp4", ".m4v", ".mpg", ".mpeg", ".mov", ".webm", ".flv", ".mng", ".asx", ".asf", ".wmv", ".svg", ".svgz", ".webp", ".avif", ".png", ".jpg", ".jpeg", ".gif", ".webp", ".avif", ".ico", ".tif", ".tiff", ".psd", ".raw", ".bmp"]
}), sentry({
dsn: "https://f69d7d9f1a48aecc94b3c4ef7a45aa77@o4506350384906240.ingest.sentry.io/4506350397489152",
sourceMapsUploadOptions: {
project: "website",
authToken: process.env.SENTRY_AUTH_TOKEN
},
environment: process.env.NODE_ENV?.toLowerCase()
}), spotlightjs()],
experimental: {
optimizeHoistedScript: true
//assets: true,
//viewTransitions: true
},
}) /*sentry({
dsn: "https://f69d7d9f1a48aecc94b3c4ef7a45aa77@o4506350384906240.ingest.sentry.io/4506350397489152",
sourceMapsUploadOptions: {
project: "website",
authToken: process.env.SENTRY_AUTH_TOKEN
},
environment: process.env.NODE_ENV?.toLowerCase()
}), spotlightjs()*/],
//image: {
// service: sharpImageService(),
//},
//output: "hybrid",
output: "server",
site: "https://lindnerit.io/",
compressHTML: true,
vite: {
build: {
modulePreload: true,
minify: "terser"
}
}
compressHTML: true
});
3 changes: 3 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build]
command = "pnpm run build"
publish = "dist"
60 changes: 29 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,52 @@
{
"name": "website",
"type": "module",
"version": "2.0.0",
"version": "2.1.0",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"oldpreview": "astro preview",
"preview": "wrangler pages dev ./dist",
"deploy": "wrangler deploy ./dist/_worker.js",
"astro": "astro"
},
"dependencies": {
"@astrojs/deno": "^5.0.1",
"@astrojs/node": "^7.0.0",
"@astrojs/partytown": "^2.0.2",
"@astrojs/rss": "^4.0.1",
"@astrojs/sitemap": "^3.0.3",
"@astrojs/solid-js": "^3.0.2",
"@contentful/rich-text-html-renderer": "^16.3.0",
"@contentful/rich-text-plain-text-renderer": "^16.0.7",
"@contentful/rich-text-types": "^16.3.0",
"@fontsource/mitr": "^5.0.8",
"@kobalte/core": "^0.9.8",
"@motionone/solid": "^10.16.4",
"@nanostores/persistent": "^0.9.1",
"@astrojs/cloudflare": "^10.2.5",
"@astrojs/netlify": "^5.2.0",
"@astrojs/partytown": "^2.1.0",
"@astrojs/rss": "^4.0.5",
"@astrojs/sitemap": "^3.1.4",
"@astrojs/solid-js": "^4.1.0",
"@contentful/rich-text-html-renderer": "^16.3.5",
"@contentful/rich-text-plain-text-renderer": "^16.0.13",
"@contentful/rich-text-types": "^16.3.5",
"@fontsource/mitr": "^5.0.13",
"@kobalte/core": "^0.12.6",
"@nanostores/persistent": "^0.10.1",
"@nanostores/solid": "^0.4.2",
"@sentry/astro": "^7.86.0",
"@spotlightjs/astro": "^1.0.0",
"@sentry/astro": "^7.113.0",
"@spotlightjs/astro": "^1.0.20",
"@swup/a11y-plugin": "^3.0.0",
"@swup/debug-plugin": "^3.0.0",
"@swup/fade-theme": "^1.0.5",
"@swup/ga-plugin": "^1.1.0",
"@swup/gtm-plugin": "^1.0.2",
"@swup/head-plugin": "^1.3.0",
"astro": "^4.0.3",
"astro-compress": "^2.2.3",
"astro-compressor": "^0.4.1",
"astro-critters": "^2.0.11",
"astro-rome": "^2.0.9",
"astro-webmanifest": "^0.6.0",
"clarity-js": "^0.7.20",
"contentful": "^10.6.14",
"lucide-solid": "^0.241.0",
"nanostores": "^0.9.5",
"sass": "^1.69.5",
"sharp": "^0.32.6",
"astro": "^4.7.1",
"axios": "^1.6.8",
"clarity-js": "^0.7.32",
"contentful": "^10.9.2",
"lucide-solid": "^0.365.0",
"nanostores": "^0.10.3",
"sass": "^1.76.0",
"sharp": "^0.33.3",
"solid-icons": "^1.1.0",
"solid-js": "^1.8.7",
"solid-js": "^1.8.17",
"solid-motionone": "^1.0.0",
"swup": "^3.1.1"
},
"devDependencies": {
"@playwright/test": "^1.40.1"
"@playwright/test": "^1.43.1"
}
}
Loading

0 comments on commit 6e2c590

Please sign in to comment.