Skip to content

Commit

Permalink
analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
dietrichmax committed Feb 3, 2024
1 parent 8f8631e commit cbecb97
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dev": "next",
"start": "next start",
"build": "next build",
"analyze": "--env ANALYZE=true next build",
"analyze": "set ANALYZE=true && next build",
"format": "prettier --write .",
"count": "cloc --exclude-ext=svg --exclude-dir=node_modules,.next --json src/ pages/ styles/ public/ . > src/data/count_total.json",
"webmention": "webmention https://mxd.codes/feed.xml --limit 0 --send"
Expand Down
9 changes: 4 additions & 5 deletions pages/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ export default function Custom404({ pages }) {
const router = useRouter()

const pathname = router.pathname
const result = findBestMatch(pathname, pages).bestMatch
const goodMatch = result.rating > 0.7
console.log(pathname)
//const result = findBestMatch(pathname, pages).bestMatch
//const goodMatch = result.rating > 0.7

return (
<Layout>
<SEO title="404 - Page Not Found" slug="" />
<Title>404 - Page Not Found</Title>
<SubTitle>
{goodMatch
? `You were probably looking for ${goodMatch}`
: `Seems like you got lost. Sorry for that...`}
{ `Seems like you got lost. Sorry for that...`}
</SubTitle>
<Container>
<Image
Expand Down
4 changes: 0 additions & 4 deletions pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

import { ServerStyleSheet } from "styled-components"
import Document, { Html, Head, Main, NextScript } from "next/document";
import { Analytics } from '@vercel/analytics/react';
import { SpeedInsights } from "@vercel/speed-insights/next"

export default class MyDocument extends Document {
static async getInitialProps(ctx) {
Expand Down Expand Up @@ -37,8 +35,6 @@ export default class MyDocument extends Document {
<body>
<Main />
<NextScript />
<Analytics />
<SpeedInsights />
</body>
</Html>
);
Expand Down
2 changes: 0 additions & 2 deletions pages/articles/[slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,6 @@ export async function getStaticProps({ params }) {
const content = await serialize(markdownContent)
const toc = getToc(markdownContent)
const readingTime = getReadTime(markdownContent)

console.log(data.posts[0].excerpt)
return {
revalidate: 86400,
props: {
Expand Down
Binary file modified public/wallpaper/backgroundImage.webp
Binary file not shown.
4 changes: 2 additions & 2 deletions src/utils/renderers.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ const renderers = {
</h5>
)
},
code: ({ node, inline, className, children, ...props }) => {
/*code: ({ node, inline, className, children, ...props }) => {
const match = /language-(\w+)/.exec(className || "")
return !inline && match ? (
<SyntaxHighlighter
Expand All @@ -189,7 +189,7 @@ const renderers = {
{children}
</code>
)
},
},*/
ul: ({ children }) => {
return <MDX.UL>{children}</MDX.UL>
},
Expand Down

0 comments on commit cbecb97

Please sign in to comment.