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

Full text search on different version #572

Closed
patrickboulay opened this issue Jul 9, 2018 · 3 comments
Closed

Full text search on different version #572

patrickboulay opened this issue Jul 9, 2018 · 3 comments
Labels

Comments

@patrickboulay
Copy link

Hi,

I have several version of my documentation and I would like to let user to see older doc.
I have this structure:
/docs/v1.0
/docs/v1.1

I have index.html in both folders.
But when I search something in the v1.0, I can see the stuff in my v1.1.

If I look the cache in Chrome using this url: chrome://settings/
I can see the address of my docsify server without any /v1.0 or /v1.1.

How can I make my search independent?

In my index.html, I only have search: 'auto', in the window.$docsify parameters.

Thanks for help.

@billhennessy
Copy link

Try specifying your search files instead of auto. example:

search : [
      '/',            // => /README.md
      '/guide',       // => /guide.md
      '/get-started', // => /get-started.md
      '/zh-cn/',      // => /zh-cn/README.md
    ],

Read more here: https://docsify.js.org/#/plugins?id=full-text-search

@patrickboulay
Copy link
Author

I understand but if you navigate on different versions of the documentation, the indexes are saved at the same place:

function saveData(maxAge) {
  localStorage.setItem('docsify.search.expires', Date.now() + maxAge)
  localStorage.setItem('docsify.search.index', JSON.stringify(INDEXS))
}

I think we should have the option to save the index at 'docsify.search.index.v1' for example.

@stale
Copy link

stale bot commented Feb 4, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

2 participants