+ {date.format(new Date(post.frontmatter.publishedOn), 'DD/MM/YYYY')} +
++ {blogDescription} +
++ {postPublishedOn} +
++ {post.frontmatter.description} +
+` tag etc.
+
+- [Tailwind CSS](https://tailwindcss.com/)
+
+ Tailwind is a CSS framework to rapidly build modern websites without ever leaving HTML.
diff --git a/styles/global.css b/styles/global.css
new file mode 100644
index 0000000..de98d01
--- /dev/null
+++ b/styles/global.css
@@ -0,0 +1,34 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
+
+#__next {
+ @apply flex flex-col h-screen;
+}
+
+.prose {
+ @apply text-gray dark:text-gray-dark !max-w-4xl;
+}
+
+.prose a {
+ @apply text-yellow dark:text-yellow-dark;
+}
+
+.prose h2,
+.prose h3,
+.prose h4,
+.prose h5,
+.prose h6 {
+ @apply text-gray dark:text-gray-dark mt-1;
+}
+
+.prose code {
+ color: hsl(286, 60%, 67%);
+}
+
+code[class*='language-'],
+pre[class*='language-'] {
+ white-space: pre-wrap !important;
+ word-break: break-word !important;
+ word-wrap: normal;
+}
diff --git a/tailwind.config.js b/tailwind.config.js
index b551c30..b40d91a 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -24,11 +24,25 @@ module.exports = {
},
fontFamily: {
headline: ['Montserrat', 'Arial', 'sans-serif']
+ },
+ typography: {
+ DEFAULT: {
+ css: {
+ fontFamily: ['Montserrat', 'Arial', 'sans-serif'],
+ a: {
+ textDecoration: 'none',
+ '&:hover': {
+ textDecoration: 'underline',
+ fontWeight: 400
+ }
+ }
+ }
+ }
}
}
},
variants: {
extend: {}
},
- plugins: []
+ plugins: [require('@tailwindcss/typography')]
}
diff --git a/utils/blog.ts b/utils/blog.ts
new file mode 100644
index 0000000..27dfb27
--- /dev/null
+++ b/utils/blog.ts
@@ -0,0 +1,70 @@
+import fs from 'node:fs'
+import path from 'node:path'
+
+import type { MDXRemoteSerializeResult } from 'next-mdx-remote'
+import { serialize } from 'next-mdx-remote/serialize'
+import remarkGfm from 'remark-gfm'
+import remarkPrism from 'remark-prism'
+import matter from 'gray-matter'
+
+export const postsPath = path.join(process.cwd(), 'posts')
+
+export type MDXSource = MDXRemoteSerializeResult