abhishekkr / qwik-simple-blog

Simple Markdown Blog in QwikJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Qwik Simple Blog ⚡️ Markdown with MDX

For help on qwik, check here; for info specific to MDX that enables Markdown rendering check here & here.

Project Structure

Inside your project, you'll see the following directory structure:

└── src/
    └── routes/
        └── blogs
            └── Name of the Blog
                └── index.mdx

just add new blog markdowns like ./src/routes/blogs//index.mdx

  • Blog Index will auto-create; item sorting is based on created_at: data field for MDX in index.mdx files. Can check index.mdx for Markdown data structure.

Development

Development mode uses Vite's development server. The dev command will server-side render (SSR) the output during development.

npm start # or `yarn start`

Note: during dev mode, Vite may request a significant number of .js files. This does not represent a Qwik production build.

Preview

The preview command will create a production build of the client modules, a production build of src/entry.preview.tsx, and run a local server. The preview server is only for convenience to preview a production build locally and should not be used as a production server.

npm run preview # or `yarn preview`

Static Site Generator (Node.js)

npm run build.server

Production

  • Build Static Site & deploy it from dist. Update origin value in ./adapters/static/vite.config.ts to your blog's URL.

OR

The production build will generate client and server modules by running both client and server build commands. The build command will use Typescript to run a type check on the source code.

npm run build # or `yarn build`

About

Simple Markdown Blog in QwikJS


Languages

Language:TypeScript 73.2%Language:JavaScript 13.6%Language:MDX 11.0%Language:CSS 2.2%