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

Vue Press dynamic heading not searchable rendered in component using interpolation #1423

Closed
kims901 opened this issue Mar 10, 2019 · 3 comments

Comments

@kims901
Copy link

kims901 commented Mar 10, 2019

Hi,

I'm using default VuePress search, all the static headings are searchable but the headings rendered in vue component not searchable.

I tried 2 different approaches,

  1. Add h2 in vue component:

{{prod.Name}}

  1. Adding a slot in vue component and add heading using ### in markdown file

{{prod.Name}}

both the appraoches didn't work,

really appreciate your help on this issue. Thank you.

@ulivz
Copy link
Member

ulivz commented Mar 10, 2019

All the dynamic headings will be resolved at client runtime but built-in search is based on data generated at build time.

@ulivz ulivz closed this as completed Mar 10, 2019
@JStumpp
Copy link

JStumpp commented Apr 9, 2019

@ulivz same Problem here. We render most of our content with components but the headings do not appear in the sidebar and search e.g.
https://docs.movisens.com/movisensXS/mobile_sensing/#features-library-version-version

This is really problematic for us. I see two possibilities:

  1. Is there an API where we can programmatically add headings during build time?
  2. The headings are resolved at build time after ssr
    I could help in implementing, if what you think is the best approach. Thanks!

@ptandler
Copy link

ptandler commented Nov 6, 2019

I ran into the same issue. I'd like to have an API I could use in Vue components to add headings during build time / ssr. Any news here?

I'd vote to reopen this issue -> #2002

I found a related question on stackoverflow: https://stackoverflow.com/questions/55328002/how-to-generate-headings-from-within-vue-components-in-vuepress

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

No branches or pull requests

4 participants