Skip to content

Commit

Permalink
feat: redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
chronark committed Feb 27, 2023
1 parent 9398052 commit e57c102
Show file tree
Hide file tree
Showing 72 changed files with 5,541 additions and 421 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// contentlayer.config.js
import { defineDocumentType, makeSource } from "contentlayer/source-files";
import remarkGfm from "remark-gfm";
import rehypePrettyCode from "rehype-pretty-code";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
var computedFields = {
path: {
type: "string",
resolve: (doc) => `/${doc._raw.flattenedPath}`,
},
slug: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.split("/").slice(1).join("/"),
},
};
var Project = defineDocumentType(() => ({
name: "Project",
filePathPattern: "./projects/**/*.mdx",
contentType: "mdx",
fields: {
title: {
type: "string",
required: true,
},
description: {
type: "string",
},
date: {
type: "date",
required: true,
},
url: {
type: "string",
required: true,
},
repository: {
type: "string",
required: true,
},
},
computedFields,
}));
var Page = defineDocumentType(() => ({
name: "Page",
filePathPattern: "pages/**/*.mdx",
contentType: "mdx",
fields: {
title: {
type: "string",
required: true,
},
description: {
type: "string",
},
},
computedFields,
}));
var contentlayer_config_default = makeSource({
contentDirPath: "./content",
documentTypes: [Page, Project, Author, Tech],
mdx: {
remarkPlugins: [remarkGfm],
rehypePlugins: [
rehypeSlug,
[
rehypePrettyCode,
{
theme: "github-dark",
onVisitLine(node) {
if (node.children.length === 0) {
node.children = [{ type: "text", value: " " }];
}
},
onVisitHighlightedLine(node) {
node.properties.className.push("line--highlighted");
},
onVisitHighlightedWord(node) {
node.properties.className = ["word--highlighted"];
},
},
],
[
rehypeAutolinkHeadings,
{
properties: {
className: ["subheading-anchor"],
ariaLabel: "Link to section",
},
},
],
],
},
});
export { Page, Project, contentlayer_config_default as default };
//# sourceMappingURL=compiled-contentlayer-config-45X2WG6B.mjs.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../contentlayer.config.js"],
"sourcesContent": ["import { defineDocumentType, makeSource } from \"contentlayer/source-files\";\nimport remarkGfm from \"remark-gfm\";\nimport rehypePrettyCode from \"rehype-pretty-code\";\nimport rehypeSlug from \"rehype-slug\";\nimport rehypeAutolinkHeadings from \"rehype-autolink-headings\";\n\n/** @type {import('contentlayer/source-files').ComputedFields} */\nconst computedFields = {\n\tpath: {\n\t\ttype: \"string\",\n\t\tresolve: (doc) => `/${doc._raw.flattenedPath}`,\n\t},\n\tslug: {\n\t\ttype: \"string\",\n\t\tresolve: (doc) => doc._raw.flattenedPath.split(\"/\").slice(1).join(\"/\"),\n\t},\n};\n\nexport const Project = defineDocumentType(() => ({\n\tname: \"Project\",\n\tfilePathPattern: \"./projects/**/*.mdx\",\n\tcontentType: \"mdx\",\n\n\tfields: {\n\t\ttitle: {\n\t\t\ttype: \"string\",\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: \"string\",\n\t\t},\n\t\tdate: {\n\t\t\ttype: \"date\",\n\t\t\trequired: true,\n\t\t},\n\t\turl: {\n\t\t\ttype: \"string\",\n\t\t\trequired: true,\n\t\t},\n\t\trepository: {\n\t\t\ttype: \"string\",\n\t\t\trequired: true,\n\t\t},\n\t},\n\tcomputedFields,\n}));\n\nexport const Page = defineDocumentType(() => ({\n\tname: \"Page\",\n\tfilePathPattern: \"pages/**/*.mdx\",\n\tcontentType: \"mdx\",\n\tfields: {\n\t\ttitle: {\n\t\t\ttype: \"string\",\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: \"string\",\n\t\t},\n\t},\n\tcomputedFields,\n}));\n\nexport default makeSource({\n\tcontentDirPath: \"./content\",\n\tdocumentTypes: [Page, Project, Author, Tech],\n\tmdx: {\n\t\tremarkPlugins: [remarkGfm],\n\t\trehypePlugins: [\n\t\t\trehypeSlug,\n\t\t\t[\n\t\t\t\trehypePrettyCode,\n\t\t\t\t{\n\t\t\t\t\ttheme: \"github-dark\",\n\t\t\t\t\tonVisitLine(node) {\n\t\t\t\t\t\t// Prevent lines from collapsing in `display: grid` mode, and allow empty\n\t\t\t\t\t\t// lines to be copy/pasted\n\t\t\t\t\t\tif (node.children.length === 0) {\n\t\t\t\t\t\t\tnode.children = [{ type: \"text\", value: \" \" }];\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonVisitHighlightedLine(node) {\n\t\t\t\t\t\tnode.properties.className.push(\"line--highlighted\");\n\t\t\t\t\t},\n\t\t\t\t\tonVisitHighlightedWord(node) {\n\t\t\t\t\t\tnode.properties.className = [\"word--highlighted\"];\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\t[\n\t\t\t\trehypeAutolinkHeadings,\n\t\t\t\t{\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tclassName: [\"subheading-anchor\"],\n\t\t\t\t\t\tariaLabel: \"Link to section\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t],\n\t},\n});\n"],
"mappings": ";AAAA,SAAS,oBAAoB,kBAAkB;AAC/C,OAAO,eAAe;AACtB,OAAO,sBAAsB;AAC7B,OAAO,gBAAgB;AACvB,OAAO,4BAA4B;AAGnC,IAAM,iBAAiB;AAAA,EACtB,MAAM;AAAA,IACL,MAAM;AAAA,IACN,SAAS,CAAC,QAAQ,IAAI,IAAI,KAAK;AAAA,EAChC;AAAA,EACA,MAAM;AAAA,IACL,MAAM;AAAA,IACN,SAAS,CAAC,QAAQ,IAAI,KAAK,cAAc,MAAM,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG;AAAA,EACtE;AACD;AAEO,IAAM,UAAU,mBAAmB,OAAO;AAAA,EAChD,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,aAAa;AAAA,EAEb,QAAQ;AAAA,IACP,OAAO;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,MAAM;AAAA,IACP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// contentlayer.config.js
import { defineDocumentType, makeSource } from "contentlayer/source-files";
import remarkGfm from "remark-gfm";
import rehypePrettyCode from "rehype-pretty-code";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
var computedFields = {
path: {
type: "string",
resolve: (doc) => `/${doc._raw.flattenedPath}`
},
slug: {
type: "string",
resolve: (doc) => doc._raw.flattenedPath.split("/").slice(1).join("/")
}
};
var Project = defineDocumentType(() => ({
name: "Project",
filePathPattern: "./projects/**/*.mdx",
contentType: "mdx",
fields: {
title: {
type: "string",
required: true
},
description: {
type: "string",
required: true
},
date: {
type: "date"
},
url: {
type: "string"
},
repository: {
type: "string"
}
},
computedFields
}));
var Page = defineDocumentType(() => ({
name: "Page",
filePathPattern: "pages/**/*.mdx",
contentType: "mdx",
fields: {
title: {
type: "string",
required: true
},
description: {
type: "string"
}
},
computedFields
}));
var contentlayer_config_default = makeSource({
contentDirPath: "./content",
documentTypes: [Page, Project],
mdx: {
remarkPlugins: [remarkGfm],
rehypePlugins: [
rehypeSlug,
[
rehypePrettyCode,
{
theme: "github-dark",
onVisitLine(node) {
if (node.children.length === 0) {
node.children = [{ type: "text", value: " " }];
}
},
onVisitHighlightedLine(node) {
node.properties.className.push("line--highlighted");
},
onVisitHighlightedWord(node) {
node.properties.className = ["word--highlighted"];
}
}
],
[
rehypeAutolinkHeadings,
{
properties: {
className: ["subheading-anchor"],
ariaLabel: "Link to section"
}
}
]
]
}
});
export {
Page,
Project,
contentlayer_config_default as default
};
//# sourceMappingURL=compiled-contentlayer-config-KFUTZ636.mjs.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../contentlayer.config.js"],
"sourcesContent": ["import { defineDocumentType, makeSource } from \"contentlayer/source-files\";\nimport remarkGfm from \"remark-gfm\";\nimport rehypePrettyCode from \"rehype-pretty-code\";\nimport rehypeSlug from \"rehype-slug\";\nimport rehypeAutolinkHeadings from \"rehype-autolink-headings\";\n\n/** @type {import('contentlayer/source-files').ComputedFields} */\nconst computedFields = {\n\tpath: {\n\t\ttype: \"string\",\n\t\tresolve: (doc) => `/${doc._raw.flattenedPath}`,\n\t},\n\tslug: {\n\t\ttype: \"string\",\n\t\tresolve: (doc) => doc._raw.flattenedPath.split(\"/\").slice(1).join(\"/\"),\n\t},\n};\n\nexport const Project = defineDocumentType(() => ({\n\tname: \"Project\",\n\tfilePathPattern: \"./projects/**/*.mdx\",\n\tcontentType: \"mdx\",\n\n\tfields: {\n\t\ttitle: {\n\t\t\ttype: \"string\",\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: \"string\",\n\t\t\trequired: true,\n\t\t},\n\t\tdate: {\n\t\t\ttype: \"date\",\n\t\t},\n\t\turl: {\n\t\t\ttype: \"string\",\n\t\t},\n\t\trepository: {\n\t\t\ttype: \"string\",\n\t\t},\n\t},\n\tcomputedFields,\n}));\n\nexport const Page = defineDocumentType(() => ({\n\tname: \"Page\",\n\tfilePathPattern: \"pages/**/*.mdx\",\n\tcontentType: \"mdx\",\n\tfields: {\n\t\ttitle: {\n\t\t\ttype: \"string\",\n\t\t\trequired: true,\n\t\t},\n\t\tdescription: {\n\t\t\ttype: \"string\",\n\t\t},\n\t},\n\tcomputedFields,\n}));\n\nexport default makeSource({\n\tcontentDirPath: \"./content\",\n\tdocumentTypes: [Page, Project],\n\tmdx: {\n\t\tremarkPlugins: [remarkGfm],\n\t\trehypePlugins: [\n\t\t\trehypeSlug,\n\t\t\t[\n\t\t\t\trehypePrettyCode,\n\t\t\t\t{\n\t\t\t\t\ttheme: \"github-dark\",\n\t\t\t\t\tonVisitLine(node) {\n\t\t\t\t\t\t// Prevent lines from collapsing in `display: grid` mode, and allow empty\n\t\t\t\t\t\t// lines to be copy/pasted\n\t\t\t\t\t\tif (node.children.length === 0) {\n\t\t\t\t\t\t\tnode.children = [{ type: \"text\", value: \" \" }];\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonVisitHighlightedLine(node) {\n\t\t\t\t\t\tnode.properties.className.push(\"line--highlighted\");\n\t\t\t\t\t},\n\t\t\t\t\tonVisitHighlightedWord(node) {\n\t\t\t\t\t\tnode.properties.className = [\"word--highlighted\"];\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t\t[\n\t\t\t\trehypeAutolinkHeadings,\n\t\t\t\t{\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tclassName: [\"subheading-anchor\"],\n\t\t\t\t\t\tariaLabel: \"Link to section\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t],\n\t},\n});\n"],
"mappings": ";AAAA,SAAS,oBAAoB,kBAAkB;AAC/C,OAAO,eAAe;AACtB,OAAO,sBAAsB;AAC7B,OAAO,gBAAgB;AACvB,OAAO,4BAA4B;AAGnC,IAAM,iBAAiB;AAAA,EACtB,MAAM;AAAA,IACL,MAAM;AAAA,IACN,SAAS,CAAC,QAAQ,IAAI,IAAI,KAAK;AAAA,EAChC;AAAA,EACA,MAAM;AAAA,IACL,MAAM;AAAA,IACN,SAAS,CAAC,QAAQ,IAAI,KAAK,cAAc,MAAM,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG;AAAA,EACtE;AACD;AAEO,IAAM,UAAU,mBAAmB,OAAO;AAAA,EAChD,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,aAAa;AAAA,EAEb,QAAQ;AAAA,IACP,OAAO;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IACA,MAAM;AAAA,MACL,MAAM;AAAA,IACP;AAAA,IACA,KAAK;AAAA,MACJ,MAAM;AAAA,IACP;AAAA,IACA,YAAY;AAAA,MACX,MAAM;AAAA,IACP;AAAA,EACD;AAAA,EACA;AACD,EAAE;AAEK,IAAM,OAAO,mBAAmB,OAAO;AAAA,EAC7C,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,QAAQ;AAAA,IACP,OAAO;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,IACA,aAAa;AAAA,MACZ,MAAM;AAAA,IACP;AAAA,EACD;AAAA,EACA;AACD,EAAE;AAEF,IAAO,8BAAQ,WAAW;AAAA,EACzB,gBAAgB;AAAA,EAChB,eAAe,CAAC,MAAM,OAAO;AAAA,EAC7B,KAAK;AAAA,IACJ,eAAe,CAAC,SAAS;AAAA,IACzB,eAAe;AAAA,MACd;AAAA,MACA;AAAA,QACC;AAAA,QACA;AAAA,UACC,OAAO;AAAA,UACP,YAAY,MAAM;AAGjB,gBAAI,KAAK,SAAS,WAAW,GAAG;AAC/B,mBAAK,WAAW,CAAC,EAAE,MAAM,QAAQ,OAAO,IAAI,CAAC;AAAA,YAC9C;AAAA,UACD;AAAA,UACA,uBAAuB,MAAM;AAC5B,iBAAK,WAAW,UAAU,KAAK,mBAAmB;AAAA,UACnD;AAAA,UACA,uBAAuB,MAAM;AAC5B,iBAAK,WAAW,YAAY,CAAC,mBAAmB;AAAA,UACjD;AAAA,QACD;AAAA,MACD;AAAA,MACA;AAAA,QACC;AAAA,QACA;AAAA,UACC,YAAY;AAAA,YACX,WAAW,CAAC,mBAAmB;AAAA,YAC/B,WAAW;AAAA,UACZ;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD,CAAC;",
"names": []
}
111 changes: 111 additions & 0 deletions .contentlayer/.cache/v0.3.0/data-4T6LNXCP.json

Large diffs are not rendered by default.

214 changes: 214 additions & 0 deletions .contentlayer/.cache/v0.3.0/data-5GE3IMM2.json

Large diffs are not rendered by default.

162 changes: 162 additions & 0 deletions .contentlayer/.cache/v0.3.0/data-IGZ3LN4S.json

Large diffs are not rendered by default.

Loading

0 comments on commit e57c102

Please sign in to comment.