Giter VIP home page Giter VIP logo

nuxt-markdown-render's Introduction

Sandros94 Nuxter profile

My name is Sandro Circi, formally a photographer, insanely curious and passioned optimizer.

Both my passion and work splits up evenly in Media Creation and Software Development. With a particular focus on technical reproduction for the first, while Nuxt for the latter.

My EDC

Softwares I use everyday

What I'm still learning

Softwares I need to know better

Other Favourites

UnJS · Directus · SurrealDB

github contribution grid snake animation

repositories · websiteWIP · mastodon · X · sponsor

nuxt-markdown-render's People

Contributors

sandros94 avatar stefanobartoletti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nuxt-markdown-render's Issues

bug: `vueRuntimeCompiler` compiles code blocks

<script setup>
const md = ref(`# Nuxt module playground!

Welcome to the example of <a href="https://github.com/sandros94/nuxt-markdown-render" target="_blank">nuxt-markdown-render</a>.

This should render
<TestComponent/>

This should not
\`\`\`vue
<TestComponent/>
\`\`\`
`)
</script>

How to add markdown-it plugins

I attempted to add the Shikiji code highlighting plugin, but encountered a failure as the content is not rendering on the page. Below is my usage method:

import Shikiji from 'markdown-it-shikiji'

export default defineNuxtConfig({
  modules: [
    // others
    'nuxt-markdown-render',
  ],

  nuxtMarkdownRender: {
    as: 'article',
    componentName: 'NotNuxtMarkdown',
    options: {
      html: true,
    },
    plugins: ['pluginMdc', Shikiji({
      themes: {
        light: 'vitesse-light',
        dark: 'vitesse-dark',
      },
    })],
    global: true,
  },
const md = '#hello world'
<NuxtMarkdown class="prose" :source="md" />

Could you please provide guidance on the correct usage or any additional steps needed to successfully add the Shikiji code highlighting plugin to my project? Thank you for your assistance!

performance regression since `1.7.0`

Since #4 and the release of 1.7.0 there has been a performance regression. I guess it should have been expected.

This should be caused by me because I'm re-instancing markdown-it at each component/composable use

fix: final bundle size

So, while testing out Nuxt Hub, I've noticed that this module alone boosts the size of at least 1.4MB, exceeding Cloudflare's free Worker's Plan.

mdc support

In the main readme I do reference to antfu's markdown-it-mdc work, but I don't actually understand how to make it to work, although the plugin is correctly loaded and the tag rendered in html code.

bug: I should not use `ref`s that aren't top-level

It has been pointed to me that I should not use refs inside plugins, and indeed this breaks a number of functionalities I wanted to implement in the future. I'm considering to revert the plugin idea and go back to square one with only composable + component.

I guess I should start working on pre-releases instead of creating non-working majors

const md: Ref<MarkdownIt> = ref<MarkdownIt>(new MarkdownIt(options))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.