Skip to content

Feature: Support vue template in sidebar #1657

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

Closed
wants to merge 7 commits into from
Closed

Feature: Support vue template in sidebar #1657

wants to merge 7 commits into from

Conversation

2jun0
Copy link
Contributor

@2jun0 2jun0 commented Oct 26, 2021

Summary

Bugfix

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

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. c24a7f7

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. 14cf646

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
  • Related tests have been updated or tests have been added

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

  • Yes
  • No

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

Related issue, if any:

#1550

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

2jun0 added 3 commits October 26, 2021 14:41
When only using {{ 1 + 1 }} syntax,
It doesn't necessarily have to exists vueGlobalOptions and vueComponents.
@vercel
Copy link

vercel bot commented Oct 26, 2021

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 26, 2021

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 43ed937:

Sandbox Source
docsify-template Configuration

@2jun0
Copy link
Contributor Author

2jun0 commented Oct 26, 2021

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

I updated it according to the vue-related modifications in the commitment. 14cf646
This reverts commit 793f675.
I think vue.js should be update.
@sy-records sy-records requested review from jhildenbiddle, trusktr and a team October 27, 2021 00:06
@2jun0 2jun0 closed this by deleting the head repository Jul 20, 2023
@trusktr
Copy link
Member

trusktr commented Jul 21, 2023

@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.

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

Successfully merging this pull request may close these issues.

2 participants