Socket
Book a DemoInstallSign in
Socket

@md-plugins/quasar-app-extension-vite-md-plugin

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@md-plugins/quasar-app-extension-vite-md-plugin

A Quasar app-ext for @md-plugins/viteMdPlugin

latest
npmnpm
Version
0.1.0-alpha.29
Version published
Maintainers
0
Created
Source

viteMdPluginAppExt

The viteMdPluginAppExt is a Quasar App Extension that integrates the viteMdPlugin into your Quasar project. This extension allows you to use Markdown files as Vue components, enabling a seamless integration of Markdown content into your Quasar application.

Table of Contents

  • Overview
  • Installation
  • Usage
  • Configuration
  • Contributing
  • License

Overview

The viteMdPluginAppExt extension provides a convenient way to use Markdown files in your Quasar project. It leverages the viteMdPlugin to transform Markdown content into Vue components, allowing you to write and manage content in Markdown while benefiting from the power of Vue and Quasar.

This App-Extension (app-ext) is for convenience only. For more granular control, you can use the viteMdPlugin directly in your Vite configuration. For more information, refer to the viteMdPlugin documentation.

Installation

To install the viteMdPluginAppExt extension, use the following command:

pnpm add @md-plugins/vite-md-plugin-app-ext

What It Does

The viteMdPluginAppExt extension does the following:

  • Integrates the viteMdPlugin into your Quasar project.
  • Allows you to use Markdown files as Vue components.
  • Provides a convenient way to manage and render Markdown content in your Quasar application.
  • Provides quasar.config changes so you don't have to manage the small things. Here is what it changes:
build: {
  vueRouterMode: 'history', // Required for proper hash link handling
  viteVuePluginOptions.include: [/\.(vue|md)$/], // Include Markdown files
},
framework: {
  framework.autoImportVueExtensions: ['md', 'vue'], // Include Markdown files
}

Usage

After installing the extension, you need to configure it in your Quasar project. Here are the steps to get started:

  • Import @md-plugins/vite-md-plugin:

    Update your quasar.config.js or quasar.config.ts to include the @md-plugins/vite-md-plugin extension:

import { viteMdPlugin, type MenuItem } from '@md-plugins/vite-md-plugin'
  • Import Your Sidebar Menu:
import siteConfig from './src/siteConfig'
const { sidebar } = siteConfig
  • Add the viteMdPlugin to the vitePlugins array:
      vitePlugins: [
        viteMdPlugin(ctx.appPaths.srcDir + '/markdown', sidebar as MenuItem[]),
        // ...

Configuration

The viteMdPluginAppExt extension can be customized through various options. Here are some of the key configuration options:

  • vueRouterMode: Set to 'history' for proper hash link handling.
  • viteVuePluginOptions.include: Include Markdown files for Vite to transpile.
  • framework.autoImportVueExtensions: Enable auto-import for Markdown extensions.

Documentation

In case this README falls out of date, please refer to the documentation for the latest information.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Keywords

quasar

FAQs

Package last updated on 13 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts