Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-classic/codeTranslations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"theme.SearchPage.existingResultsTitle": "Rechercher des résultats pour \"{query}\"",
"theme.SearchPage.fetchingNewResults": "Chargement de nouveaux résultats...",
"theme.SearchPage.inputLabel": "Chercher",
"theme.SearchPage.inputPlaceholder": "Tapez vôtre recherche ici",
"theme.SearchPage.inputPlaceholder": "Tapez votre recherche ici",
"theme.SearchPage.noResultsText": "Aucun résultat trouvé",
"theme.blog.paginator.navAriaLabel": "Pagination de la liste des posts du blog",
"theme.blog.paginator.newerEntries": "Nouvelles entrées",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ const SearchVersionSelectList = ({docsSearchVersionsHelpers}) => {

function SearchPage() {
const {
siteConfig: {themeConfig: {algolia: {appId, apiKey, indexName} = {}}} = {},
siteConfig: {
themeConfig: {
algolia: {appId, apiKey, indexName},
},
},
i18n: {currentLocale},
} = useDocusaurusContext();
const documentsFoundPlural = useDocumentsFoundPlural();

Expand Down Expand Up @@ -172,7 +177,7 @@ function SearchPage() {
const algoliaHelper = algoliaSearchHelper(algoliaClient, indexName, {
hitsPerPage: 15,
advancedSyntax: true,
disjunctiveFacets: ['docusaurus_tag'],
disjunctiveFacets: ['language', 'docusaurus_tag'],
});

algoliaHelper.on(
Expand Down Expand Up @@ -268,6 +273,7 @@ function SearchPage() {

const makeSearch = (page = 0) => {
algoliaHelper.addDisjunctiveFacetRefinement('docusaurus_tag', 'default');
algoliaHelper.addDisjunctiveFacetRefinement('language', currentLocale);

Object.entries(docsSearchVersionsHelpers.searchVersions).forEach(
([pluginId, searchVersion]) => {
Expand Down Expand Up @@ -425,7 +431,7 @@ function SearchPage() {
{breadcrumbs.length > 0 && (
<span className={styles.searchResultItemPath}>
{breadcrumbs.map((html, index) => (
<>
<React.Fragment key={index}>
{index !== 0 && (
<span
className={styles.searchResultItemPathSeparator}>
Expand All @@ -437,7 +443,7 @@ function SearchPage() {
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{__html: html}}
/>
</>
</React.Fragment>
))}
</span>
)}
Expand Down