Skip to content

Commit

Permalink
feat(docs): add plausible to docs (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
cstrnt authored Nov 3, 2023
1 parent 135e547 commit f01da3a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const withNextra = require("nextra")({
defaultShowCopyCode: true,
});

const { withPlausibleProxy } = require("next-plausible");

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
Expand All @@ -15,4 +17,4 @@ const nextConfig = {
},
};

module.exports = withNextra(nextConfig);
module.exports = withPlausibleProxy()(withNextra(nextConfig));
1 change: 1 addition & 0 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"eslint": "8.29.0",
"eslint-config-next": "13.0.6",
"next": "13.4.8",
"next-plausible": "^3.11.3",
"nextra": "2.2.18",
"nextra-theme-docs": "2.2.18",
"react": "18.2.0",
Expand Down
12 changes: 12 additions & 0 deletions apps/docs/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { type AppType } from "next/app";
import { type Session } from "next-auth";
import PlausibleProvider from "next-plausible";
const MyApp: AppType<{ session: Session | null }> = ({ Component, pageProps }) => {
return (
<PlausibleProvider domain="docs.tryabby.com">
<Component {...pageProps} />
</PlausibleProvider>
);
};

export default MyApp;
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

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

1 comment on commit f01da3a

@vercel
Copy link

@vercel vercel bot commented on f01da3a Nov 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.