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

@@ -6,8 +6,9 @@ import { defineConfig, type UserConfig } from "vite";
import { qwikVite } from "@builder.io/qwik/optimizer";
import { qwikCity } from "@builder.io/qwik-city/vite";
import tsconfigPaths from "vite-tsconfig-paths";
import pkg from "./package.json";
import { qwikReact } from "@builder.io/qwik-react/vite";
import pkg from "./package.json";
type PkgDep = Record<string, string>;
const { dependencies = {}, devDependencies = {} } = pkg as any as {
dependencies: PkgDep;
@@ -19,9 +20,14 @@ errorOnDuplicatesPkgDeps(devDependencies, dependencies);
* Note that Vite normally starts from `index.html` but the qwikCity plugin makes start at `src/entry.ssr.tsx` instead.
*/
export default defineConfig(({ command, mode }): UserConfig => {
export default defineConfig((): UserConfig => {
return {
plugins: [qwikCity({ trailingSlash: false }), qwikVite(), tsconfigPaths(), qwikReact()],
plugins: [
qwikCity({ trailingSlash: false }),
qwikVite(),
tsconfigPaths(),
qwikReact(),
],
// This tells Vite which dependencies to pre-build in dev mode.
optimizeDeps: {
// Put problematic deps that break bundling here, mostly those with binaries.