From f2fb718d0f90e8fe282404cf447e89d3d3d0837d Mon Sep 17 00:00:00 2001
From: Jake Jarvis
Date: Sat, 26 Feb 2022 12:06:41 -0500
Subject: [PATCH] update constants
---
components/Video/Video.tsx | 11 +++++++++--
lib/config/constants.ts | 2 ++
lib/config/index.js | 3 ---
lib/parse-notes.ts | 3 ++-
next.config.js | 6 +++++-
pages/notes/[slug].tsx | 7 +++++--
pages/privacy.tsx | 7 +------
7 files changed, 24 insertions(+), 15 deletions(-)
create mode 100644 lib/config/constants.ts
diff --git a/components/Video/Video.tsx b/components/Video/Video.tsx
index a3970e96..c7d9e6be 100644
--- a/components/Video/Video.tsx
+++ b/components/Video/Video.tsx
@@ -60,8 +60,15 @@ const Video = ({ src, thumbnail, subs, autoplay, className, ...rest }: VideoProp
return (
- {/* @ts-ignore */}
-
+
);
};
diff --git a/lib/config/constants.ts b/lib/config/constants.ts
new file mode 100644
index 00000000..ea3ca2b3
--- /dev/null
+++ b/lib/config/constants.ts
@@ -0,0 +1,2 @@
+// Next.js constants (not needed in frontend)
+export const NOTES_DIR = "./notes";
diff --git a/lib/config/index.js b/lib/config/index.js
index d9411da1..b193b419 100644
--- a/lib/config/index.js
+++ b/lib/config/index.js
@@ -41,7 +41,4 @@ module.exports = {
linkedin: "jakejarvis",
instagram: "jakejarvis",
},
-
- // Next.js constants
- NOTES_DIR: "./notes",
};
diff --git a/lib/parse-notes.ts b/lib/parse-notes.ts
index 61682202..ff455fd5 100644
--- a/lib/parse-notes.ts
+++ b/lib/parse-notes.ts
@@ -8,7 +8,8 @@ import { compiler } from "markdown-to-jsx";
import removeMarkdown from "remove-markdown";
import sanitizeHtml from "sanitize-html";
import readingTime from "reading-time";
-import { NOTES_DIR, baseUrl } from "./config";
+import { baseUrl } from "./config";
+import { NOTES_DIR } from "./config/constants";
// remark/rehype markdown plugins
import remarkGfm from "remark-gfm";
diff --git a/next.config.js b/next.config.js
index d69c13a8..43af993a 100644
--- a/next.config.js
+++ b/next.config.js
@@ -122,7 +122,11 @@ module.exports = (phase, { defaultConfig }) => {
// misc. crap:
{ source: "/resume/", destination: "/static/resume.pdf", permanent: false },
{ source: "/resume.pdf", destination: "/static/resume.pdf", permanent: false },
- { source: "/stats/", destination: "https://app.usefathom.com/share/wbgnqukw/jarv.is", permanent: false },
+ {
+ source: "/stats/",
+ destination: `https://app.usefathom.com/share/${config.fathomSiteId}/${config.siteDomain}`,
+ permanent: false,
+ },
{ source: "/jarvis.asc", destination: "/pubkey.asc", permanent: true },
{ source: "/scrabble/:path*", destination: "https://jakejarvis.github.io/scrabble/:path*", permanent: false },
],
diff --git a/pages/notes/[slug].tsx b/pages/notes/[slug].tsx
index 75ddb663..fcdc686e 100644
--- a/pages/notes/[slug].tsx
+++ b/pages/notes/[slug].tsx
@@ -53,8 +53,11 @@ const Note = ({ frontMatter, source }: NoteType) => {
- {/* @ts-ignore */}
-
+
{/* comments can be disabled for an individual post via `noComments: true` in its front matter */}
diff --git a/pages/privacy.tsx b/pages/privacy.tsx
index b379fe69..c3865744 100644
--- a/pages/privacy.tsx
+++ b/pages/privacy.tsx
@@ -78,12 +78,7 @@ const Privacy = () => (
is completely public, too!)
-
+
Third-Party Content