content icon indicating copy to clipboard operation
content copied to clipboard

Missing crucials components, doc, stuff...

Open kogratte opened this issue 1 year ago • 4 comments

This ticket does not intend to suggest a new feature, more to list all painful point met using this module, as they're unfortunately plenty and diverses (but I think almost all of them are tied to the doc rather than codebase).

  • Use md content from a vue file, and get formatting right:
<template>
    <ContentRenderer>
        ```sh
            echo "Hello world"
        ```
        ```js
            const foo = 'bar';
        ```
   </ContentRenderer>
</template>

Should be able to produce a formatted markdown. How the hell a network call is required to fetch content? Seriously guys?!

  • Raw content is missing from context

Various hacks have been suggested, but it shouldn't be a pain in the ass to extend the base context. Whatever you can copy / paste, it's a mess :)

  • Composables

How is this possible to provide such powerful feature without related composable to allow the user to tackle specific scenarios?

It should be possible to get:

  • The raw markdown (getRawMarkdown)

  • The formatted markdown (getPrettyMd)

  • Context args: (getMdContext)

I'm truly sorry but I'm moving from a pain to another for a week, and I'm a little bit frustrated by the lack of informations and methods to get the job done..

kogratte avatar Nov 08 '23 11:11 kogratte

I think this issue is for this repo : https://github.com/nuxt-modules/mdc

maximepvrt avatar Nov 08 '23 13:11 maximepvrt

I think this issue is for this repo : nuxt-modules/mdc

Yes but no because we could not take a look at every documentation around Nuxt Content. I couldn't agree more that there is missing api and documentation.

@kogratte could you please develop the missing points and I will be a pleasure to create a PR to improve docs!

Barbapapazes avatar Nov 09 '23 13:11 Barbapapazes

I can, of course, share what I found.

According to the suggestion, I open a ticket in nuxtjs/mdc repo (https://github.com/nuxt-modules/mdc/issues/91), and continue to deep dive.

As suggested there, I try to use directly the MDCcomponent, supposed to be shipped by @nuxt/content, but the second you try to use it, you got an error in the console related to stylesheet. Resolutions paths are suddenly invalid and you can't move forward.

Screenshot 2023-11-09 at 15 06 44

kogratte avatar Nov 09 '23 14:11 kogratte