mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
fix(v2): DocSearch should keep working after a new release (#3393)
* We should create an alias for searching last version of docs on DocSearch/Algolia, so that on new version publish, search still works even if new version is not already indexed (https://github.com/facebook/docusaurus/issues/3391) * commit missing snapshot * update after algolia changes * put back facetFilters: [`version:${versions[0]}`] until latest facet is indexed
This commit is contained in:
parent
3ace60043b
commit
9c34f68a7a
7 changed files with 57 additions and 22 deletions
|
@ -291,6 +291,7 @@ Object {
|
|||
"version-current-metadata-prop-751.json": "{
|
||||
\\"version\\": \\"current\\",
|
||||
\\"label\\": \\"Next\\",
|
||||
\\"isLast\\": true,
|
||||
\\"docsSidebars\\": {
|
||||
\\"docs\\": [
|
||||
{
|
||||
|
@ -615,6 +616,7 @@ Object {
|
|||
"version-1-0-0-metadata-prop-608.json": "{
|
||||
\\"version\\": \\"1.0.0\\",
|
||||
\\"label\\": \\"1.0.0\\",
|
||||
\\"isLast\\": true,
|
||||
\\"docsSidebars\\": {
|
||||
\\"version-1.0.0/community\\": [
|
||||
{
|
||||
|
@ -631,6 +633,7 @@ Object {
|
|||
"version-current-metadata-prop-751.json": "{
|
||||
\\"version\\": \\"current\\",
|
||||
\\"label\\": \\"Next\\",
|
||||
\\"isLast\\": false,
|
||||
\\"docsSidebars\\": {
|
||||
\\"community\\": [
|
||||
{
|
||||
|
@ -1073,6 +1076,7 @@ Object {
|
|||
"version-1-0-0-metadata-prop-608.json": "{
|
||||
\\"version\\": \\"1.0.0\\",
|
||||
\\"label\\": \\"1.0.0\\",
|
||||
\\"isLast\\": false,
|
||||
\\"docsSidebars\\": {
|
||||
\\"version-1.0.0/docs\\": [
|
||||
{
|
||||
|
@ -1115,6 +1119,7 @@ Object {
|
|||
"version-1-0-1-metadata-prop-e87.json": "{
|
||||
\\"version\\": \\"1.0.1\\",
|
||||
\\"label\\": \\"1.0.1\\",
|
||||
\\"isLast\\": true,
|
||||
\\"docsSidebars\\": {
|
||||
\\"version-1.0.1/docs\\": [
|
||||
{
|
||||
|
@ -1151,6 +1156,7 @@ Object {
|
|||
"version-current-metadata-prop-751.json": "{
|
||||
\\"version\\": \\"current\\",
|
||||
\\"label\\": \\"Next\\",
|
||||
\\"isLast\\": false,
|
||||
\\"docsSidebars\\": {
|
||||
\\"docs\\": [
|
||||
{
|
||||
|
@ -1187,6 +1193,7 @@ Object {
|
|||
"version-with-slugs-metadata-prop-2bf.json": "{
|
||||
\\"version\\": \\"withSlugs\\",
|
||||
\\"label\\": \\"withSlugs\\",
|
||||
\\"isLast\\": false,
|
||||
\\"docsSidebars\\": {
|
||||
\\"version-1.0.1/docs\\": [
|
||||
{
|
||||
|
|
|
@ -15,6 +15,7 @@ declare module '@docusaurus/plugin-content-docs-types' {
|
|||
export type PropVersionMetadata = {
|
||||
version: string;
|
||||
label: string;
|
||||
isLast: boolean;
|
||||
docsSidebars: PropSidebars;
|
||||
permalinkToSidebar: PermalinkToSidebar;
|
||||
};
|
||||
|
|
|
@ -67,6 +67,7 @@ export function toVersionMetadataProp(
|
|||
return {
|
||||
version: loadedVersion.versionName,
|
||||
label: loadedVersion.versionLabel,
|
||||
isLast: loadedVersion.isLast,
|
||||
docsSidebars: toSidebarsProp(loadedVersion),
|
||||
permalinkToSidebar: loadedVersion.permalinkToSidebar,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue