Skip to content

Commit

Permalink
Add plausible.io with partytown
Browse files Browse the repository at this point in the history
  • Loading branch information
timonv committed Aug 13, 2024
1 parent 1b67860 commit 51c4b4e
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 80 deletions.
157 changes: 77 additions & 80 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,96 +1,93 @@
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";

import tailwind from "@astrojs/tailwind";
import starlightLinksValidatorPlugin from "starlight-links-validator";

import partytown from "@astrojs/partytown";

// https://astro.build/config
export default defineConfig({
site: "https://swiftide.rs",
image: {
service: {
entrypoint: "astro/assets/services/sharp",
config: {
limitInputPixels: false,
},
},
limitInputPixels: false
}
}
},
prefetch: {
prefetchAll: true,
prefetchAll: true
},
integrations: [
starlight({
title: "swiftide",
description:
"Blazing fast data pipelines for Retrieval Augmented Generation written in Rust",
editLink: {
baseUrl: "https://github.com/bosun-ai/swiftide-website/edit/master",
},
tableOfContents: {
minHeadingLevel: 2,
},
customCss: [
// Fontsource files for to regular and semi-bold font weights.
"@fontsource/fira-code/400.css",
"@fontsource/fira-code/600.css",
"./src/styles/custom.css",
"./src/tailwind.css",
],
favicon: "favicon32.png",
plugins: [starlightLinksValidatorPlugin()],
logo: {
src: "./src/assets/logo.png",
},
social: {
github: "https://github.com/bosun-ai/swiftide",
linkedin: "https://www.linkedin.com/company/bosun-ai/",
integrations: [starlight({
title: "swiftide",
// <script defer data-domain="swiftide.rs" src="https://plausible.io/js/script.js"></script>
head: [{
tag: "script",
attrs: {
defer: true,
type: "text/partytown",
"data-domain": "swiftide.rs",
src: "https://plausible.io/js/script.js"
}
}],
description: "Blazing fast data pipelines for Retrieval Augmented Generation written in Rust",
editLink: {
baseUrl: "https://github.com/bosun-ai/swiftide-website/edit/master"
},
tableOfContents: {
minHeadingLevel: 2
},
customCss: [
// Fontsource files for to regular and semi-bold font weights.
"@fontsource/fira-code/400.css", "@fontsource/fira-code/600.css", "./src/styles/custom.css", "./src/tailwind.css"],
favicon: "favicon32.png",
plugins: [starlightLinksValidatorPlugin()],
logo: {
src: "./src/assets/logo.png"
},
social: {
github: "https://github.com/bosun-ai/swiftide",
linkedin: "https://www.linkedin.com/company/bosun-ai/"
},
sidebar: [{
label: "What is swiftide?",
link: "/what-is-swiftide/"
}, {
label: "Getting Started",
autogenerate: {
directory: "getting-started"
}
}, {
label: "Concepts",
autogenerate: {
directory: "concepts"
}
}, {
label: "In depth",
autogenerate: {
directory: "in-depth"
}
}, {
label: "Tutorials",
autogenerate: {
directory: "tutorials"
}
}, {
label: "Reference",
link: "https://docs.rs/swiftide/latest/swiftide/",
badge: {
variant: "note",
text: "docs.rs"
},
sidebar: [
{
label: "What is swiftide?",
link: "/what-is-swiftide/",
},
{
label: "Getting Started",
autogenerate: {
directory: "getting-started",
},
},
{
label: "Concepts",
autogenerate: {
directory: "concepts",
},
},
{
label: "In depth",
autogenerate: {
directory: "in-depth",
},
},
{
label: "Tutorials",
autogenerate: {
directory: "tutorials",
},
},

{
label: "Reference",
link: "https://docs.rs/swiftide/latest/swiftide/",
badge: {
variant: "note",
text: "docs.rs",
},

attrs: { target: "_blank" },
},
{
label: "Troubleshooting",
link: "/troubleshooting/",
},
],
}),
tailwind({ applyBaseStyles: false }),
],
});
attrs: {
target: "_blank"
}
}, {
label: "Troubleshooting",
link: "/troubleshooting/"
}]
}), tailwind({
applyBaseStyles: false
}), partytown()]
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"dependencies": {
"@astrojs/check": "^0.7.0",
"@astrojs/partytown": "^2.1.1",
"@astrojs/starlight": "^0.24.4",
"@astrojs/starlight-tailwind": "^2.0.3",
"@astrojs/tailwind": "^5.1.0",
Expand Down
18 changes: 18 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 51c4b4e

Please sign in to comment.