1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 12:58:28 -04:00

update constants

This commit is contained in:
Jake Jarvis 2022-02-26 12:06:41 -05:00
parent f6627580eb
commit f2fb718d0f
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
7 changed files with 24 additions and 15 deletions

View File

@ -60,8 +60,15 @@ const Video = ({ src, thumbnail, subs, autoplay, className, ...rest }: VideoProp
return (
<div className={classNames(styles.wrapper, className)}>
{/* @ts-ignore */}
<ReactPlayer width="100%" height="100%" url={url} config={config} controls={!autoplay} {...rest} />
<ReactPlayer
width="100%"
height="100%"
url={url}
controls={!autoplay}
// @ts-ignore
config={config}
{...rest}
/>
</div>
);
};

2
lib/config/constants.ts Normal file
View File

@ -0,0 +1,2 @@
// Next.js constants (not needed in frontend)
export const NOTES_DIR = "./notes";

View File

@ -41,7 +41,4 @@ module.exports = {
linkedin: "jakejarvis",
instagram: "jakejarvis",
},
// Next.js constants
NOTES_DIR: "./notes",
};

View File

@ -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";

View File

@ -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 },
],

View File

@ -53,8 +53,11 @@ const Note = ({ frontMatter, source }: NoteType) => {
<NoteMeta {...frontMatter} />
<Content>
{/* @ts-ignore */}
<MDXRemote {...source} components={{ ...mdxComponents }} />
<MDXRemote
{...source}
// @ts-ignore
components={{ ...mdxComponents }}
/>
</Content>
{/* comments can be disabled for an individual post via `noComments: true` in its front matter */}

View File

@ -78,12 +78,7 @@ const Privacy = () => (
is completely public, too!)
</p>
<IFrame
src="https://app.usefathom.com/share/wbgnqukw/jarv.is"
title="Fathom Analytics dashboard"
height={500}
allowScripts
/>
<IFrame src="/stats/" title="Fathom Analytics dashboard" height={500} allowScripts />
<H2 id="third-party">Third-Party Content</H2>