Skip to content

Commit

Permalink
Add Astro DB and Web Vitals integration (#1107)
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed May 24, 2024
1 parent 113ca5a commit 362174a
Show file tree
Hide file tree
Showing 4 changed files with 395 additions and 3 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,16 @@ Integration data is updated weekly by a [GitHub Action](/.github/workflows/weekl
The [blog collection](/src/content/blog/) is setup to support MDX blog posts with all images being pulled from the collection's [\_images directory](/src/content/blog/_images/). Images should be a `webp` format of a reasonable width, something in the 800-1600px range is ideal.

Blog post cover and social images are set as frontmatter properties and should point reference the `_images` directory, ex: `coverImage: "/src/content/blog/_images/post-1/cover.webp"`.

## Web Vitals monitoring

Site performance is tracked using [`@astrojs/web-vitals`](https://www.npmjs.com/package/@astrojs/web-vitals) and Astro Studio.

There are two separate projects in Astro Studio to separate production and development/preview data:

- Production: `astrobuild`
- Development: `astrobuild-preview-deploys`

These are both part of the `Astro` team in Studio.

If table schema changes need to be pushed, remember to push them to each of these Studio projects.
4 changes: 4 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import db from "@astrojs/db";
import mdx from "@astrojs/mdx";
import sitemap from "@astrojs/sitemap";
import solid from "@astrojs/solid-js";
import tailwind from "@astrojs/tailwind";
import vercel from "@astrojs/vercel/serverless";
import webVitals from "@astrojs/web-vitals";
import astroExpressiveCode from "astro-expressive-code";
import { defineConfig } from "astro/config";
import houston from "./houston.theme.json";
Expand All @@ -27,6 +29,8 @@ export default defineConfig({
}),
mdx(),
sitemap(),
db(),
webVitals(),
],
image: {
domains: ["v1.screenshot.11ty.dev", "storage.googleapis.com"],
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"preinstall": "npx only-allow pnpm",
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"build": "astro build --remote",
"preview": "astro preview",
"lint": "biome lint .",
"format": "biome check . --apply",
Expand All @@ -19,11 +19,13 @@
},
"dependencies": {
"@astro-community/astro-embed-youtube": "^0.4.3",
"@astrojs/db": "^0.11.4",
"@astrojs/mdx": "^2.1.1",
"@astrojs/rss": "^4.0.5",
"@astrojs/sitemap": "^3.1.1",
"@astrojs/solid-js": "^4.0.1",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/web-vitals": "^0.2.1",
"@fontsource-variable/inter": "^5.0.16",
"@iconify-json/ri": "^1.1.20",
"astro": "^4.4.15",
Expand Down
Loading

0 comments on commit 362174a

Please sign in to comment.