feat: Add markdown support plus /blog (#107)

Adds `/blog` page with support for `.md` and `.mdx` files.

What we learnt in setting this up will be packages in a package `@nestri/mdx` and used to set up the `/docs` and the `/terms` and `/privacy` routes
This commit is contained in:
Wanjohi
2024-09-08 20:16:56 +03:00
committed by GitHub
parent 8cc5a8b9e6
commit 5b4ea64b94
24 changed files with 515 additions and 131 deletions

View File

@@ -1,27 +0,0 @@
{
"name": "@nestri/mdx",
"version": "0.0.0",
"private": true,
"sideEffects": false,
"files": [
"tailwind.config.ts",
"postcss.config.js"
],
"scripts": {
"lint": "eslint . --max-warnings 0"
},
"devDependencies": {
"@builder.io/qwik": "^1.8.0",
"@builder.io/qwik-city": "^1.8.0",
"@builder.io/qwik-react": "0.5.0",
"@nestri/eslint-config": "*",
"@nestri/typescript-config": "*",
"@nestri/core": "*",
"@types/eslint": "^8.56.5",
"@types/node": "^20.11.24",
"autoprefixer": "^10.4.20",
"eslint": "^8.57.0",
"tailwindcss": "^3.4.9",
"typescript": "^5.3.3"
}
}

View File

@@ -1,13 +0,0 @@
{
"extends": "@nestri/typescript-config/base.json",
"compilerOptions": {
"outDir": "tmp",
"rootDir": ".",
"allowImportingTsExtensions": true,
"paths": {
"@/*": ["./src/*"]
}
},
"files": [".eslintrc.js"],
"include": ["src", "./*.d.ts"]
}

View File

@@ -1,16 +0,0 @@
module.exports = {
root: true,
extends: [
"@nestri/eslint-config/qwik.js",
],
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
ecmaVersion: 2021,
sourceType: "module",
ecmaFeatures: {
jsx: true,
},
}
};

View File

@@ -9,6 +9,7 @@
html * {
scrollbar-color: theme("colors.gray.700") theme("colors.gray.300");
scrollbar-width: thin;
scroll-behavior: smooth;
}
*::selection {

View File

@@ -29,7 +29,6 @@
"@nestri/eslint-config": "*",
"@nestri/typescript-config": "*",
"@nestri/core": "*",
"@turbo/gen": "^1.12.4",
"@types/eslint": "^8.56.5",
"@types/node": "^20.11.24",
"@types/nprogress": "^0.2.3",

View File

@@ -1,4 +1,4 @@
export default {
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},

View File

@@ -10,7 +10,7 @@ export const GithubBanner = component$(() => {
viewport={{ once: true }}
transition={transition}
client:load
class="flex items-center justify-center w-full py-10"
class="flex items-center justify-center w-full px-4 py-10"
as="div"
>
<section class="w-full flex flex-col items-center justify-center">

View File

@@ -1,7 +1,7 @@
/** @jsxImportSource react */
import { qwikify$ } from '@builder.io/qwik-react';
import { motion, type MotionProps } from 'framer-motion';
import { type ReactNode } from 'react';
import React, { type ReactNode } from 'react';
interface MotionComponentProps extends MotionProps {
as?: keyof JSX.IntrinsicElements;
@@ -27,9 +27,7 @@ export const ReactMotionComponent = ({
const MotionTag = motion[as as keyof typeof motion] as React.ComponentType<any>;
return (
<MotionTag
className={className}
{...(motionProps as any)}>
<MotionTag className={className} {...(motionProps as any)}>
{children}
</MotionTag>
);

View File

@@ -5,6 +5,6 @@
"rootDir": ".",
"allowImportingTsExtensions": true
},
"files": [".eslintrc.js"],
"files": [".eslintrc.cjs"],
"include": ["src", "./*.d.ts"]
}