Skip to content

Commit

Permalink
add google analytics, fix to key prop on writing/index
Browse files Browse the repository at this point in the history
  • Loading branch information
rvilgalys committed Feb 4, 2025
1 parent 96cba17 commit 958c19d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
18 changes: 18 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"@mdx-js/loader": "^3.1.0",
"@mdx-js/react": "^3.1.0",
"@next/mdx": "^9.5.5",
"@next/third-parties": "^15.1.6",
"@tailwindcss/postcss": "^4.0.0",
"@types/mdx": "^2.0.13",
"motion": "^12.0.5",
Expand Down
2 changes: 2 additions & 0 deletions pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Html, Head, Main, NextScript } from "next/document";
import { GoogleAnalytics } from "@next/third-parties/google";

export default function Document() {
return (
Expand All @@ -8,6 +9,7 @@ export default function Document() {
rel="stylesheet"
href="https://use.typekit.net/zdk0lrz.css"
></link>
<GoogleAnalytics gaId="G-KZHRMR7BVH"></GoogleAnalytics>
</Head>
<body>
<Main />
Expand Down
2 changes: 1 addition & 1 deletion pages/writing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const Index = ({ posts }) => {
</button>
{allCategories.map((category) => (
<button
key={category}
type="button"
onClick={() => setSelectedCategory(category)}
className={
Expand Down Expand Up @@ -72,7 +73,6 @@ const Index = ({ posts }) => {
export const getStaticProps = async () => {
// using require here since it lets us parse exports
const postContent = require.context("./", true, /\.mdx$/);
console.log("postContent: " + postContent);
const postPromises = postContent.keys().map(async (post) => {
const link = post.substr(2).split(".")[0];
const content = await postContent(post);
Expand Down
1 change: 0 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
purge: [],

variants: {},
plugins: [],
};

0 comments on commit 958c19d

Please sign in to comment.