From 78e8dc0de18b8cf7846ced43bd3576e0dadc28df Mon Sep 17 00:00:00 2001
From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com>
Date: Fri, 29 Apr 2022 19:20:41 +0200
Subject: [PATCH 1/2] fix(spec): add more tags
---
specs/abtesting/paths/abtest.yml | 14 ++++---
specs/abtesting/paths/abtests.yml | 12 ++++--
specs/abtesting/paths/stopABTest.yml | 4 +-
specs/abtesting/spec.yml | 8 ++++
.../paths/click/getAverageClickPosition.yml | 4 +-
.../paths/click/getClickPositions.yml | 18 ++++++---
.../paths/click/getClickThroughRate.yml | 4 +-
.../paths/click/getConversionRate.yml | 4 +-
.../analytics/paths/search/getNoClickRate.yml | 4 +-
.../paths/search/getNoResultsRate.yml | 4 +-
.../paths/search/getSearchesCount.yml | 4 +-
.../paths/search/getSearchesNoClicks.yml | 4 +-
.../paths/search/getSearchesNoResults.yml | 4 +-
.../paths/search/getTopCountries.yml | 4 +-
.../paths/search/getTopFilterAttributes.yml | 4 +-
.../paths/search/getTopFilterForAttribute.yml | 4 +-
.../paths/search/getTopFiltersNoResults.yml | 4 +-
specs/analytics/paths/search/getTopHits.yml | 4 +-
.../analytics/paths/search/getTopSearches.yml | 4 +-
.../analytics/paths/search/getUsersCount.yml | 4 +-
specs/analytics/paths/status/getStatus.yml | 4 +-
specs/analytics/spec.yml | 18 +++++++++
.../responses/RequestEntityTooLarge.yml | 5 +++
.../common/responses/UnprocessableEntity.yml | 5 +++
specs/insights/common/enums.yml | 1 -
specs/insights/paths/pushEvents.yml | 38 ++++++++++++++-----
specs/insights/spec.yml | 8 ++++
website/docusaurus.config.js | 2 +-
28 files changed, 155 insertions(+), 42 deletions(-)
create mode 100644 specs/common/responses/RequestEntityTooLarge.yml
create mode 100644 specs/common/responses/UnprocessableEntity.yml
diff --git a/specs/abtesting/paths/abtest.yml b/specs/abtesting/paths/abtest.yml
index 91c4b14e22..22bbfcb4ab 100644
--- a/specs/abtesting/paths/abtest.yml
+++ b/specs/abtesting/paths/abtest.yml
@@ -1,10 +1,10 @@
get:
+ tags:
+ - abtest
operationId: getABTest
+ summary: Get a test.
description: >
- Returns metadata and metrics for A/B test id.
-
- Behaves in the same way as GET /2/abtests however the endpoint will return 403.
- summary: Returns metadata and metrics for A/B test id.
+ Returns metadata and metrics for an A/B test.
parameters:
- $ref: '../common/parameters.yml#/ID'
responses:
@@ -24,9 +24,11 @@ get:
$ref: '../../common/responses/IndexNotFound.yml'
delete:
+ tags:
+ - abtest
operationId: deleteABTest
- description: Deletes the A/B Test and removes all associated metadata & metrics.
- summary: Deletes the A/B Test.
+ summary: Delete a test.
+ description: Delete a test.
parameters:
- $ref: '../common/parameters.yml#/ID'
responses:
diff --git a/specs/abtesting/paths/abtests.yml b/specs/abtesting/paths/abtests.yml
index 8f075a5a86..5080cd202d 100644
--- a/specs/abtesting/paths/abtests.yml
+++ b/specs/abtesting/paths/abtests.yml
@@ -1,10 +1,12 @@
post:
+ tags:
+ - abtest
operationId: addABTests
+ summary: Create a test.
description: >
Creates a new A/B test with provided configuration.
You can set an A/B test on two different indices with different settings, or on the same index with different search parameters by providing a customSearchParameters setting on one of the variants.
- summary: Creates a new A/B test with provided configuration.
requestBody:
required: true
content:
@@ -46,10 +48,14 @@ post:
$ref: '../../common/responses/IndexNotFound.yml'
get:
+ tags:
+ - abtest
operationId: listABTests
+ summary: List all tests.
description: >
- Fetch all existing A/B tests for App that are available for the current API Key. Returns an array of metadata and metrics. When no data has been processed, the metrics will be returned as null.
- summary: Fetch all existing A/B tests for App that are available for the current API Key.
+ Fetch all existing A/B tests for App that are available for the current API Key.
+
+ When no data has been processed, the metrics will be returned as null.
parameters:
- $ref: '../../common/parameters.yml#/Offset'
- $ref: '../../common/parameters.yml#/Limit'
diff --git a/specs/abtesting/paths/stopABTest.yml b/specs/abtesting/paths/stopABTest.yml
index 33cc821b9a..8282c94810 100644
--- a/specs/abtesting/paths/stopABTest.yml
+++ b/specs/abtesting/paths/stopABTest.yml
@@ -1,12 +1,14 @@
post:
+ tags:
+ - abtest
operationId: stopABTest
+ summary: Stop a test.
description: >
Marks the A/B test as stopped.
At this point, the test is over and cannot be restarted.
As a result, your application is back to normal: index A will perform as usual, receiving 100% of all search requests.
Associated metadata and metrics are still stored.
- summary: Marks the A/B test as stopped.
parameters:
- $ref: '../common/parameters.yml#/ID'
responses:
diff --git a/specs/abtesting/spec.yml b/specs/abtesting/spec.yml
index ebe762e0c7..ae9c8f43ac 100644
--- a/specs/abtesting/spec.yml
+++ b/specs/abtesting/spec.yml
@@ -21,6 +21,14 @@ servers:
security:
- appId: []
apiKey: []
+tags:
+ - name: abtest
+ x-displayName: A/B Testing
+ description: Manage A/B Tests.
+x-tagGroups:
+ - name: General
+ tags:
+ - abtest
paths:
# ######################
# ### Custom request ###
diff --git a/specs/analytics/paths/click/getAverageClickPosition.yml b/specs/analytics/paths/click/getAverageClickPosition.yml
index 340719cd40..ffcfc930ea 100644
--- a/specs/analytics/paths/click/getAverageClickPosition.yml
+++ b/specs/analytics/paths/click/getAverageClickPosition.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - click
operationId: getAverageClickPosition
+ summary: Get average click position.
description: Returns the average click position. The endpoint returns a value for the complete given time range, as well as a value per day.
- summary: Returns the average click position.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
diff --git a/specs/analytics/paths/click/getClickPositions.yml b/specs/analytics/paths/click/getClickPositions.yml
index 849be96ce7..0e32f110c2 100644
--- a/specs/analytics/paths/click/getClickPositions.yml
+++ b/specs/analytics/paths/click/getClickPositions.yml
@@ -1,7 +1,13 @@
get:
+ tags:
+ - click
operationId: getClickPositions
- description: Returns the distribution of clicks per range of positions.
- summary: Returns the distribution of clicks per range of positions.
+ summary: Get clicks per positions.
+ description: |
+ Returns the distribution of clicks per range of positions.
+
+ If the groups all have a count of 0, it means Algolia didn’t receive any click events for the queries with the clickAnalytics search parameter set to true.
+ The count is 0 until Algolia receives at least one click event.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
@@ -35,9 +41,11 @@ get:
description: >
Range of positions with the following pattern:
- Positions from 1 to 10 included are displayed in separated groups.
- Positions from 11 to 20 included are grouped together.
- Positions from 21 and up are grouped together.
+ - Positions from 1 to 10 included are displayed in separated groups.
+
+ - Positions from 11 to 20 included are grouped together.
+
+ - Positions from 21 and up are grouped together.
type: array
items:
type: integer
diff --git a/specs/analytics/paths/click/getClickThroughRate.yml b/specs/analytics/paths/click/getClickThroughRate.yml
index 63417ff2b5..6ba98cc8c2 100644
--- a/specs/analytics/paths/click/getClickThroughRate.yml
+++ b/specs/analytics/paths/click/getClickThroughRate.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - click
operationId: getClickThroughRate
+ summary: Get click-through rate (CTR).
description: Returns a click-through rate (CTR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of clicks and searches used to compute the rates.
- summary: Returns a click-through rate (CTR).
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
diff --git a/specs/analytics/paths/click/getConversionRate.yml b/specs/analytics/paths/click/getConversionRate.yml
index d00e345e12..ec5996e6e9 100644
--- a/specs/analytics/paths/click/getConversionRate.yml
+++ b/specs/analytics/paths/click/getConversionRate.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - click
operationId: getConversationRate
+ summary: Get conversion rate (CR).
description: Returns a conversion rate (CR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of conversion and searches used to compute the rates.
- summary: Returns a conversion rate (CR).
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
diff --git a/specs/analytics/paths/search/getNoClickRate.yml b/specs/analytics/paths/search/getNoClickRate.yml
index 70d47b2506..5d0f4ea4c5 100644
--- a/specs/analytics/paths/search/getNoClickRate.yml
+++ b/specs/analytics/paths/search/getNoClickRate.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getNoClickRate
+ summary: Get no click rate.
description: Returns the rate at which searches didn't lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks.
- summary: Returns the rate at which searches didn't lead to any clicks.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
diff --git a/specs/analytics/paths/search/getNoResultsRate.yml b/specs/analytics/paths/search/getNoResultsRate.yml
index da99f3a269..735da83127 100644
--- a/specs/analytics/paths/search/getNoResultsRate.yml
+++ b/specs/analytics/paths/search/getNoResultsRate.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getNoResultsRate
+ summary: Get no results rate.
description: Returns the rate at which searches didn't return any results. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without results used to compute the rates.
- summary: Returns the rate at which searches didn't return any results.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
diff --git a/specs/analytics/paths/search/getSearchesCount.yml b/specs/analytics/paths/search/getSearchesCount.yml
index 7d7a21afcd..c02c764546 100644
--- a/specs/analytics/paths/search/getSearchesCount.yml
+++ b/specs/analytics/paths/search/getSearchesCount.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getSearchesCount
+ summary: Get searches count.
description: Returns the number of searches across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day.
- summary: Returns the number of searches across the given time range.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
diff --git a/specs/analytics/paths/search/getSearchesNoClicks.yml b/specs/analytics/paths/search/getSearchesNoClicks.yml
index 88e9187ed7..f7bf399abd 100644
--- a/specs/analytics/paths/search/getSearchesNoClicks.yml
+++ b/specs/analytics/paths/search/getSearchesNoClicks.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getSearchesNoClicks
+ summary: Get top searches with no clicks.
description: Returns top searches that didn't lead to any clicks. Limited to the 1000 most frequent ones. For each search, also returns the average number of found hits.
- summary: Returns top searches that didn't lead to any clicks.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
diff --git a/specs/analytics/paths/search/getSearchesNoResults.yml b/specs/analytics/paths/search/getSearchesNoResults.yml
index dfc5cfaa94..d549f871e0 100644
--- a/specs/analytics/paths/search/getSearchesNoResults.yml
+++ b/specs/analytics/paths/search/getSearchesNoResults.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getSearchesNoResults
+ summary: Get top searches with no results.
description: Returns top searches that didn't return any results. Limited to the 1000 most frequent ones.
- summary: Returns top searches that didn't return any results.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
diff --git a/specs/analytics/paths/search/getTopCountries.yml b/specs/analytics/paths/search/getTopCountries.yml
index b5ad701065..38a1573ebd 100644
--- a/specs/analytics/paths/search/getTopCountries.yml
+++ b/specs/analytics/paths/search/getTopCountries.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getTopCountries
+ summary: Get top countries.
description: Returns top countries. Limited to the 1000 most frequent ones.
- summary: Returns top countries.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
diff --git a/specs/analytics/paths/search/getTopFilterAttributes.yml b/specs/analytics/paths/search/getTopFilterAttributes.yml
index ab9b8b5a7e..c8081ac052 100644
--- a/specs/analytics/paths/search/getTopFilterAttributes.yml
+++ b/specs/analytics/paths/search/getTopFilterAttributes.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getTopFilterAttributes
+ summary: Get top filter attributes.
description: Returns top filter attributes. Limited to the 1000 most used filters.
- summary: Returns top filter attributes.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../common/parameters.yml#/Search'
diff --git a/specs/analytics/paths/search/getTopFilterForAttribute.yml b/specs/analytics/paths/search/getTopFilterForAttribute.yml
index 2397fb38bd..08b46e0a5c 100644
--- a/specs/analytics/paths/search/getTopFilterForAttribute.yml
+++ b/specs/analytics/paths/search/getTopFilterForAttribute.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getTopFilterForAttribute
+ summary: Get top filters for the an attribute.
description: Returns top filters for the given attribute. Limited to the 1000 most used filters.
- summary: Returns top filters for the given attribute.
parameters:
- $ref: '../../common/parameters.yml#/Attribute'
- $ref: '../../../common/parameters.yml#/Index'
diff --git a/specs/analytics/paths/search/getTopFiltersNoResults.yml b/specs/analytics/paths/search/getTopFiltersNoResults.yml
index d736501a5f..370659005b 100644
--- a/specs/analytics/paths/search/getTopFiltersNoResults.yml
+++ b/specs/analytics/paths/search/getTopFiltersNoResults.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getTopFiltersNoResults
+ summary: Get top filters for a no result search.
description: Returns top filters with no results. Limited to the 1000 most used filters.
- summary: Returns top filters with no results.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../common/parameters.yml#/Search'
diff --git a/specs/analytics/paths/search/getTopHits.yml b/specs/analytics/paths/search/getTopHits.yml
index f6541dbc00..6c90fa1502 100644
--- a/specs/analytics/paths/search/getTopHits.yml
+++ b/specs/analytics/paths/search/getTopHits.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getTopHits
+ summary: Get top hits.
description: Returns top hits. Limited to the 1000 most frequent ones.
- summary: Returns top hits.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../common/parameters.yml#/Search'
diff --git a/specs/analytics/paths/search/getTopSearches.yml b/specs/analytics/paths/search/getTopSearches.yml
index 4ff912fb5b..649d685fd6 100644
--- a/specs/analytics/paths/search/getTopSearches.yml
+++ b/specs/analytics/paths/search/getTopSearches.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getTopSearches
+ summary: Get top searches.
description: Returns top searches. Limited to the 1000 most frequent ones. For each search, also returns the average number of hits returned.
- summary: Returns top searches.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../common/parameters.yml#/ClickAnalytics'
diff --git a/specs/analytics/paths/search/getUsersCount.yml b/specs/analytics/paths/search/getUsersCount.yml
index 0b8e97785c..fcbdd4876e 100644
--- a/specs/analytics/paths/search/getUsersCount.yml
+++ b/specs/analytics/paths/search/getUsersCount.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - search
operationId: getUsersCount
+ summary: Get users count.
description: Returns the distinct count of users across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day.
- summary: Returns the distinct count of users across the given time range.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
- $ref: '../../../common/parameters.yml#/StartDate'
diff --git a/specs/analytics/paths/status/getStatus.yml b/specs/analytics/paths/status/getStatus.yml
index efc0f6b8e9..61b3e281a1 100644
--- a/specs/analytics/paths/status/getStatus.yml
+++ b/specs/analytics/paths/status/getStatus.yml
@@ -1,7 +1,9 @@
get:
+ tags:
+ - advanced
operationId: getStatus
+ summary: Get Analytics API status.
description: Returns the latest update time of the analytics API for a given index. If the index has been recently created and/or no search has been performed yet the updated time will be null.
- summary: Get latest update time of the analytics API.
parameters:
- $ref: '../../../common/parameters.yml#/Index'
responses:
diff --git a/specs/analytics/spec.yml b/specs/analytics/spec.yml
index d75d2e1aa0..59a02136c2 100644
--- a/specs/analytics/spec.yml
+++ b/specs/analytics/spec.yml
@@ -21,6 +21,24 @@ servers:
security:
- appId: []
apiKey: []
+tags:
+ - name: advanced
+ x-displayName: Advanced
+ description: Advanced operations.
+ - name: click
+ x-displayName: Click Analytics
+ description: Get all click analytics.
+ - name: search
+ x-displayName: Search Analytics
+ description: Get all search analytics.
+x-tagGroups:
+ - name: General
+ tags:
+ - search
+ - click
+ - name: Others
+ tags:
+ - advanced
paths:
# ######################
# ### Custom request ###
diff --git a/specs/common/responses/RequestEntityTooLarge.yml b/specs/common/responses/RequestEntityTooLarge.yml
new file mode 100644
index 0000000000..c76cebd7c6
--- /dev/null
+++ b/specs/common/responses/RequestEntityTooLarge.yml
@@ -0,0 +1,5 @@
+description: Request Entity Too Large.
+content:
+ application/json:
+ schema:
+ $ref: '../schemas/ErrorBase.yml'
diff --git a/specs/common/responses/UnprocessableEntity.yml b/specs/common/responses/UnprocessableEntity.yml
new file mode 100644
index 0000000000..70d01ef175
--- /dev/null
+++ b/specs/common/responses/UnprocessableEntity.yml
@@ -0,0 +1,5 @@
+description: Unprocessable Entity.
+content:
+ application/json:
+ schema:
+ $ref: '../schemas/ErrorBase.yml'
diff --git a/specs/insights/common/enums.yml b/specs/insights/common/enums.yml
index 58858615ec..736bf66da4 100644
--- a/specs/insights/common/enums.yml
+++ b/specs/insights/common/enums.yml
@@ -1,4 +1,3 @@
eventType:
type: string
- description: An eventType can be a click, a conversion, or a view.
enum: [click, conversion, view]
diff --git a/specs/insights/paths/pushEvents.yml b/specs/insights/paths/pushEvents.yml
index 135c27f538..26ac6ad080 100644
--- a/specs/insights/paths/pushEvents.yml
+++ b/specs/insights/paths/pushEvents.yml
@@ -1,7 +1,24 @@
post:
+ tags:
+ - events
operationId: pushEvents
- description: This command pushes an array of events.
- summary: Pushes an array of events.
+ summary: Push events.
+ description: |
+ This command pushes an array of events.
+
+ An event is
+ - an action: `eventName`
+ - performed in a context: `eventType`
+ - at some point in time provided: `timestamp`
+ - by an end user: `userToken`
+ - on something: `index`
+
+
+ Notes:
+ - To be accepted, all events sent must be valid.
+ - The size of the body must be *less than 2 MB*.
+ - When an event is tied to an Algolia search, it must also provide a `queryID`. If that event is a `click`, their absolute `positions` should also be passed.
+ - We consider that an `index` provides access to 2 resources: objects and filters. An event can only interact with a single resource type, but not necessarily on a single item. As such an event will accept an array of `objectIDs` or `filters`.
requestBody:
required: true
content:
@@ -22,18 +39,21 @@ post:
type: object
description: Insights event.
additionalProperties: false
+ maximum: 1000
properties:
eventType:
$ref: '../common/enums.yml#/eventType'
eventName:
type: string
+ maximum: 64
description: A user-defined string used to categorize events.
index:
type: string
description: Name of the targeted index.
userToken:
type: string
- description: A user identifier. Depending if the user is logged-in or not, several strategies can be used from a sessionId to a technical identifier.
+ pattern: '[a-zA-Z0-9_-=/+]{1,128}'
+ description: A user identifier. Depending if the user is logged-in or not, several strategies can be used from a sessionId to a technical identifier. You should always send pseudonymous or anonymous userTokens.
timestamp:
type: integer
format: int64
@@ -78,9 +98,9 @@ post:
description: A message confirming the event push.
'400':
$ref: '../../common/responses/BadRequest.yml'
- '402':
- $ref: '../../common/responses/FeatureNotEnabled.yml'
- '403':
- $ref: '../../common/responses/MethodNotAllowed.yml'
- '404':
- $ref: '../../common/responses/IndexNotFound.yml'
+ '401':
+ $ref: '../../common/responses/Unauthorized.yml'
+ '413':
+ $ref: '../../common/responses/UnprocessableEntity.yml'
+ '422':
+ $ref: '../../common/responses/RequestEntityTooLarge.yml'
diff --git a/specs/insights/spec.yml b/specs/insights/spec.yml
index ddc2c53baa..e5092ff185 100644
--- a/specs/insights/spec.yml
+++ b/specs/insights/spec.yml
@@ -21,6 +21,14 @@ servers:
security:
- appId: []
apiKey: []
+tags:
+ - name: events
+ x-displayName: Events
+ description: Events operations.
+x-tagGroups:
+ - name: General
+ tags:
+ - events
paths:
# ######################
# ### Custom request ###
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index e0885a305f..6774e9a6dc 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -123,7 +123,7 @@ function getSpecsForNavBar() {
position: 'left',
},
{
- label: 'API Specs',
+ label: 'Rest API',
position: 'left',
type: 'dropdown',
items: getSpecsForNavBar(),
From 8df9e858a026e5245fa627941f4b689a7edc0a06 Mon Sep 17 00:00:00 2001
From: Samuel Bodin <1637651+bodinsamuel@users.noreply.github.com>
Date: Fri, 29 Apr 2022 19:40:23 +0200
Subject: [PATCH 2/2] docusaurus
---
website/docusaurus.config.js | 27 +++++++++++++++------------
website/src/css/custom.css | 10 ++++++++--
2 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index 6774e9a6dc..dbac4a8eb4 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -42,9 +42,11 @@ function getSpecsForPlugin() {
function getSpecsForNavBar() {
return getSpecFiles().map((specFile) => {
+ /** @type {import('@docusaurus/theme-common').NavbarItem} */
return {
label: specFile.fileName,
href: `/specs/${specFile.fileName}`,
+ className: 'header-restapi',
};
});
}
@@ -52,13 +54,13 @@ function getSpecsForNavBar() {
/** @type {import('@docusaurus/types').Config} */
(
module.exports = {
- title: 'API Clients Automation',
- tagline: 'Documentation for the Algolia autogenerated clients.',
+ title: 'Algolia API',
+ tagline: 'Documentation for the Algolia API and Clients.',
url: 'https://api-clients-automation.netlify.app/',
baseUrl: '/',
favicon: 'img/logo-small.png',
organizationName: 'Algolia',
- projectName: 'API Clients Automation',
+ projectName: 'Algolia API and Clients',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'throw',
@@ -104,7 +106,7 @@ function getSpecsForNavBar() {
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
navbar: {
- title: 'API Clients Automation',
+ title: 'Algolia API',
logo: {
alt: 'Algolia',
src: 'img/logo-small.png',
@@ -113,17 +115,17 @@ function getSpecsForNavBar() {
items: [
// left
{
- label: 'API Clients',
+ label: 'Clients',
to: 'docs/api-clients/introduction',
position: 'left',
},
{
- label: 'Automation',
+ label: 'Contributing',
to: 'docs/automation/introduction',
- position: 'left',
+ position: 'right',
},
{
- label: 'Rest API',
+ label: 'HTTP API',
position: 'left',
type: 'dropdown',
items: getSpecsForNavBar(),
@@ -146,10 +148,11 @@ function getSpecsForNavBar() {
disableSwitch: false,
respectPrefersColorScheme: true,
},
- announcementBar: {
- content:
- '⭐️ If you like our API clients, give them a star on GitHub! ⭐️',
- },
+ // Breaks scrollbar
+ // announcementBar: {
+ // content:
+ // '⭐️ If you like our API clients, give them a star on GitHub! ⭐️',
+ // },
footer: {
style: 'dark',
links: [
diff --git a/website/src/css/custom.css b/website/src/css/custom.css
index 1c2872a627..7666f228f8 100644
--- a/website/src/css/custom.css
+++ b/website/src/css/custom.css
@@ -32,6 +32,13 @@ html[data-theme='dark'] .docusaurus-highlight-code-line {
background-color: rgba(0, 0, 0, 0.3);
}
+/* Font */
+@import url('https://fonts.googleapis.com/css?family=Open+Sans');
+
+/* -------- Navbar */
+.header-restapi {
+ text-transform: capitalize;
+}
/* GitHub */
.header-github-link:hover {
opacity: 0.6;
@@ -51,8 +58,7 @@ html[data-theme='dark'] .header-github-link:before {
no-repeat;
}
-/* Font */
-@import url('https://fonts.googleapis.com/css?family=Open+Sans');
+
/* override italic keywords in code blocks */
code .token.keyword {