docsify icon indicating copy to clipboard operation
docsify copied to clipboard

Feature: Support vue template in sidebar

Open 2jun0 opened this issue 3 years ago • 3 comments

Summary

Bugfix

  • If section name is weird just like --, dom.find('#--') cause error. so, It has to be changed. 7060fccad18bca0f22838a29a16fef740646ee80

changed const section = dom.find('#' + id); to const section = dom.find(`[id='${id}']`);

  • When only using {{ 1 + 1 }} syntax, It doesn't necessarily have to exists vueGlobalOptions and vueComponents. c24a7f76b3e864b3af78db31f532903cb0bac76a

I removed the sentence below so that we can use vue into simple template(such as {{ 1+1}} without vueGlobalOptions or vueComponentName, etc.... if (docsifyConfig.vueGlobalOptions || vueComponentNames.length)

New Feature

  • Support vue template in sidebar. 14cf64639a52ef34648e7f60252f039e0656eef6

Previously, when the title of the markup document uses vue, there was an error that did not apply to sidebar.

# TEST

## Hello World!

## {{ message }} 

## {{ "re:" + message }} 

Before

Before image

After

After image

So finally, I request this commits that support vue in sidebar

What kind of change does this PR introduce?

Bugfix, Feature

For any code change,

  • [ ] Related documentation has been updated if needed
  • [x] Related tests have been updated or tests have been added

Does this PR introduce a breaking change? (check one)

  • [ ] Yes
  • [X] No

If yes, please describe the impact and migration path for existing applications:

Related issue, if any:

#1550

Tested in the following browsers:

  • [x] Chrome
  • [x] Firefox
  • [ ] Safari
  • [x] Edge
  • [ ] IE

2jun0 avatar Oct 26 '21 10:10 2jun0

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/6Kg6tBK6zeg15zjJdPLc3KE7gAw4
✅ Preview: https://docsify-preview-git-fork-2jun0-vue-sidebar-docsify-core.vercel.app

vercel[bot] avatar Oct 26 '21 10:10 vercel[bot]

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 43ed9379ec96e19b8f84f7aa792316104200befb:

Sandbox Source
docsify-template Configuration

codesandbox-ci[bot] avatar Oct 26 '21 10:10 codesandbox-ci[bot]

This commits support sidebar, but probably you can solve #1550 with a little change,

2jun0 avatar Oct 26 '21 10:10 2jun0

@2jun0 sorry we hadn't gotten to this. Thank you for the idea. We're working on simplifying and modernizing things. Eventually I'd like to make it possible to swap Docsify templates entirely, which would allow anything like sidebars with Vue, React, Svelte, etc.

trusktr avatar Jul 21 '23 01:07 trusktr