From c60c1005ae999fd5f267b8390b2bc5c9bcb91109 Mon Sep 17 00:00:00 2001 From: Laszlo Rafael <rlacko99@gmail.com> Date: Mon, 14 Feb 2022 12:07:58 +0100 Subject: [PATCH] Add Algolia search --- app/docusaurus.config.js | 14 +++++++ app/i18n/hu/code.json | 38 ++++++++++++++++++- .../options.json | 2 +- .../current.json | 2 +- 4 files changed, 53 insertions(+), 3 deletions(-) diff --git a/app/docusaurus.config.js b/app/docusaurus.config.js index b92b29b..ed889cb 100644 --- a/app/docusaurus.config.js +++ b/app/docusaurus.config.js @@ -72,6 +72,20 @@ const config = { darkTheme: darkCodeTheme, additionalLanguages: ["java"], }, + algolia: { + // The application ID provided by Algolia + appId: "BC1WGBH3GB", + + // Public API key: it is safe to commit it + apiKey: "df03651e55fff0ec2b5040e933940f8e", + + indexName: "kszk-b-hu", + + // Optional: see doc section below + contextualSearch: false, + + debug: false, + }, }), plugins: ["plugin-image-zoom"], diff --git a/app/i18n/hu/code.json b/app/i18n/hu/code.json index ae790c9..d019102 100644 --- a/app/i18n/hu/code.json +++ b/app/i18n/hu/code.json @@ -194,5 +194,41 @@ "theme.tags.tagsPageTitle": { "message": "Címkék", "description": "The title of the tag list page" + }, + "theme.SearchBar.label": { + "message": "Keresés", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "Egy találat|{count} találat", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Találatok a \"{query}\" kifejezésre", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Keresés", + "description": "The search page title for empty query" + }, + "theme.SearchPage.inputPlaceholder": { + "message": "Keresés", + "description": "The placeholder for search page input" + }, + "theme.SearchPage.inputLabel": { + "message": "Keresés", + "description": "The ARIA label for search page input" + }, + "theme.SearchPage.algoliaLabel": { + "message": "Algolia keresés", + "description": "The ARIA label for Algolia mention" + }, + "theme.SearchPage.noResultsText": { + "message": "Nincs találat", + "description": "The paragraph for empty search result" + }, + "theme.SearchPage.fetchingNewResults": { + "message": "Új találatok betöltése...", + "description": "The paragraph for fetching new search results" } -} \ No newline at end of file +} diff --git a/app/i18n/hu/docusaurus-plugin-content-blog/options.json b/app/i18n/hu/docusaurus-plugin-content-blog/options.json index 57add53..31e1fde 100644 --- a/app/i18n/hu/docusaurus-plugin-content-blog/options.json +++ b/app/i18n/hu/docusaurus-plugin-content-blog/options.json @@ -11,4 +11,4 @@ "message": "Legfrissebb posztok", "description": "The label for the left sidebar" } -} \ No newline at end of file +} diff --git a/app/i18n/hu/docusaurus-plugin-content-docs/current.json b/app/i18n/hu/docusaurus-plugin-content-docs/current.json index 64cfbdf..12c2a34 100644 --- a/app/i18n/hu/docusaurus-plugin-content-docs/current.json +++ b/app/i18n/hu/docusaurus-plugin-content-docs/current.json @@ -7,4 +7,4 @@ "message": "Szolgáltatásaink", "description": "The label for category Szolgáltatásaink in sidebar guidesSidebar" } -} \ No newline at end of file +} -- GitLab