Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code blocks in Markdown get actually rendered when wrapping them using html ... #135

Closed
sdellis opened this issue Oct 31, 2018 · 9 comments

Comments

@sdellis
Copy link

sdellis commented Oct 31, 2018

In the /config/docs.config.js file, when exampleMode and usageMode are set to "collapse" the "Vue|HTML" toggle should not display. Here is an example of a custom .md file that I've added.

...
    {
      name: "How to Install",
      content: "../docs/how-to-install.md",
      exampleMode: "collapse",
      usageMode: "collapse",
      sectionDepth: 1,
    },
...

screen shot 2018-10-31 at 2 22 59 pm

@sdellis
Copy link
Author

sdellis commented Oct 31, 2018

I should mention that in a previous version of VueDS one was able to add codeblocks that did not try to render by wrapping them in ````html`. That was helpful for providing installation instructions and other code samples in the docs (that have nothing to do with the components) without having it try to render the code. That is what I'm trying to achieve here, but no matter what I do, I'm not able to include a code block that has JavaScript in it without the system trying to evaluate it. Is this a problem with Vue Styleguidist?

@arielsalminen
Copy link
Owner

@sdellis hmm. let me dig into this. You’re correct that it should be hidden, but probably currently something that isn’t implemented on vueds side.

As for the other matter you mention in the second comment, I’m not sure yet what’s happening there. That should be possible, so need to look into this as well.

@arielsalminen
Copy link
Owner

arielsalminen commented Nov 19, 2018

@sdellis html code blocks don’t seem to be working currently and your original issue is related to that. I think this might be a vue styleguidist issue, but not sure yet. This works:

    ```javascript
         something
    ```

but this seems to cause things to actually render on page and throw vue related errors:

    ```html
         <template>something</template>
    ```

@arielsalminen
Copy link
Owner

@rafaesc Would you have any clue on what’s going on?

@arielsalminen arielsalminen self-assigned this Nov 19, 2018
@arielsalminen arielsalminen changed the title "Vue|HTML" toggle should be hidden when exampleMode/usageMode is set to "collapse" Code blocks in Markdown get actually rendered when wrapping them using html ... Nov 19, 2018
@arielsalminen
Copy link
Owner

@sdellis Edited the title accordingly since I think that is the causing the tab issue as well.

@arielsalminen
Copy link
Owner

@sdellis I’ve created an issue on Styleguidist side about this: vue-styleguidist/vue-styleguidist#234

@sdellis
Copy link
Author

sdellis commented Nov 21, 2018

@viljamis Thank you! Should we leave this issue open until it gets resolved?

@arielsalminen
Copy link
Owner

@sdellis looks like there is a fix now in Styleguidist. If you want you can just update the version in your package.json, but please leave this open for now. I’ll make a new release soon with this and a few other fixes.

@arielsalminen
Copy link
Owner

Fixed in 3.5.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants