-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Conversation
When we release v4.1 in the coming weeks (possibly next week, likely week after), we'll have a new docs subfolder to point to. We'll still have the v4.0 docs at the existing URLs though and will link to those through our site's header.
👋 @mdo, You are right, better safe than sorry. You can also use the same index and only add some variables like: {
"index_name": "bootstrap-v4",
"start_urls": [
{
"url": "https://getbootstrap.com/docs/(?P<version>.*?)/",
"variables": {
"version": [
"4.0",
"4.1"
]
}
}
]
[...]
} This variable will also behave as algoliaOptions: { 'facetFilters': ["version:4.1"] }, Let me know what do you think about that. Cheers |
Reminder @mdo |
Hey @s-pace! Sorry for the radio silence here for the last few weeks. We just shipped v4.1 (we have https://getbootstrap.com/docs/4.1/ and https://getbootstrap.com/docs/4.0/ now) and I forgot to check in here to see what else I had to do to update our docsearch setup. Can you confirm that I should only make some changes to filter by version, or should it be a new index? Is there anything I can do to kick off a new index? Thanks! |
Sure thing: Let's use this index for testing purposes and we will populate it into Congratulations, your search is now ready! You're now a few steps away from having it working on your website:
<!-- at the end of the HEAD -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<!-- at the end of the BODY -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript"> docsearch({
apiKey: '7010a93e8b7e97e40e5cadfbaa9e9f04',
indexName: 'bootstrap-v4_temp',
inputSelector: '### REPLACE ME ####',
algoliaOptions: { 'facetFilters': ["version:$VERSION"] },
debug: false // Set debug to true if you want to inspect the dropdown
});
</script>
For example if you want to refine the search to the version "4.0" just specify: 'facetFilters': ["version:4.0"]
Feel free to get back to us if you have any issues or questions regarding the integration. We'd also be happy to get your feedback and thoughts about DocSearch - so we can continue to improve it. Have a nice day :) |
Thanks for the reply @s-pace. I had already made twbs/bootstrap#26247. I tested just now with the test index and works as expected. Now, the thing is, we have old content which can be tricky to rebuild. Can we use a new index for 4.1.0 and on, with the version solution? This way the old search would still work and we'll just need to update our latest release's docs only. |
👋 @XhmikosR , It looks like twbs/bootstrap#26247 was enough. Anyway, I have made you a new index <!-- at the end of the HEAD -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" />
<!-- at the end of the BODY -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script type="text/javascript"> docsearch({
apiKey: '### REPLACE ME ####',
indexName: 'bootstrap',
inputSelector: '### REPLACE ME ####',
algoliaOptions: { 'facetFilters': ["version:$VERSION"] },
debug: false // Set debug to true if you want to inspect the dropdown
});
</script> |
👋 @XhmikosR , Let us know if you need any help :) Have a nice week end |
👋 If you want to update the index, it will be made within 24h. Otherwise I can trigger it for you before the release. Everything is ready on our side. Hope you will manage to be ready too :) Break a leg |
Closing it, feel free to reopen if required |
Hey, @s-pace! So, we are about to release 3.4.0. We are using the config where we pass the docs version in |
👋 @XhmikosR , Sorry for the delay, In order to avoid any confusion here, does the your 3.4 pages will keep the same layout than the https://getbootstrap.com/docs/4.1/* ones ?
If these selectors can be used, we will only update the configuration we want you to use We would like to avoid having multiple DocSearch indices to make it easier. Pages https://getbootstrap.com/docs/4.0/ can now be updated with the indexName: 'bootstrap', Replace $VERSION with the version you want to search on. The list of possible version is hardcoded in the config. So as of today you have: 4.0, 4.1. (You can tried it out, it is live) For example if you want to refine the search to the version "4.0" just specify: 'facetFilters': ["version:4.0"]. 3.4 will be added as soon as pages https://getbootstrap.com/docs/3.4/ will be available and crawled (within 24h). Please ping us as soon as these pages are available and let us know if you have any other question / pain point. |
@s-pace: I don't think we will touch 4.0, so please keep that index. It's not updated so maybe we will do the switch to later.
|
Alright @XhmikosR Do you have an available version of your 3.4 pages (e.g. netlify)? I would like to tailor the selectors. Otherwise we could use the same as the old index |
The selectors should be the same, yeah. Only thing I'd change is switch to https. We will eventually enforce this. (I know we are already late :/) |
Alright, do you have any temporary version available? I would like to test a crawl first. Otherwise we will provide you a dedicated DocSearch index for this version |
Try this one https://epic-goldstine-3a9d25.netlify.com/ |
Alright, please submit a PR of the newest configuration with the final URLs. Ping us as soon as the new version is live, we will merge and deploy it asap. The credential to use for this version would be:
You can already give it a try with the staging environment. Feel free to apply with the email addresses you want us to invite in order to provide you the algolia analytics we provide for your indices. |
@s-pace: so, we don't need to pass I was under the impression that we pass the version so that we can use the same index? |
@XhmikosR you do not need to pass this parameter since we have created a new index for this version. We would rather use the same index for every versions but since you want to keep one dedicated index for the v4, we will wait for you to be ready and merge them later on. |
@s-pace: ah, makes sense now, thanks. One last thing. Is the |
@XhmikosR you are welcome, This index is now working but populated with your staging website. You will need to submit a PR on this repo in order to update the URL. We will merge and deploy it as soon as your production will be live. Let us know if you want to change anything. |
The thing is that it doesn't work for me locally unless I pass the version, which contradicts with what you said above :) So, using |
Ah, nvm it's our problem :) |
@s-pace: I think 3.4 is wrong here https://github.com/algolia/docsearch-configs/blob/master/configs/bootstrap.json#L8 since the selectors we have there won't be present in 3.4. |
@XhmikosR please use these two credentials for the v3.4:
You will only have the version 3.4 stored in this index We will only use the I have removed the confusing version that was set before you told us you do not want to use one index only. |
When we release v4.1 in the coming weeks (possibly next week, likely week after), we'll have a new docs subfolder to point to. We'll still have the v4.0 docs at the existing URLs though and will link to those through our site's header.
I'm unsure what else needs modifying here, but we'll need a fresh index of the new docs I imagine.