Skip to content

Commit

Permalink
chore(docs): add algolia search index (#390)
Browse files Browse the repository at this point in the history
This PR couples the Algolia crawler with the docs site search box. It configures the docs site header `url` and commits an `appID` for the crawler and an `apiKey` which is read-only and [safe to commit](https://docusaurus.io/docs/search#connecting-algolia).

This PR also adds the omni banner to the docusaurus site static images as it is used in `themeConfig` and the home page.

task: none
  • Loading branch information
idea404 authored Feb 24, 2024
1 parent 86517dc commit 49147fa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/site/docs/home.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ id: home

# Home

![omni banner](../../images/omni_banner.png)
![omni banner](../static/img/omni-banner.png)

_Welcome to the documentation portal for all things Omni!_

Expand Down
12 changes: 7 additions & 5 deletions docs/site/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const config: Config = {
favicon: "img/favicon.svg",

// Set the production url of your site here
url: "https://your-docusaurus-site.example.com",
url: "https://docs.omni.network/",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/",
Expand Down Expand Up @@ -60,7 +60,7 @@ const config: Config = {

themeConfig: {
// Replace with your project's social card
image: "img/docusaurus-social-card.jpg",
image: "img/omni-banner.png",
navbar: {
title: "Omni Docs",
logo: {
Expand Down Expand Up @@ -131,9 +131,11 @@ const config: Config = {
additionalLanguages: ["solidity", "bash"],
},
algolia: {
appId: "<NEW_APP_ID>", // pragma: allowlist secret
apiKey: "<NEW_API_KEY>", // pragma: allowlist secret
indexName: "index-name",
// The application ID provided by Algolia
appId: "YGLZ6VW4T5", // pragma: allowlist secret
// Public API key: it is safe to commit it
apiKey: "b2cac1111a5f723ffcc9b11008094448", // pragma: allowlist secret
indexName: "omni",
contextualSearch: true,
searchParameters: {
clickAnalytics: true,
Expand Down
Binary file added docs/site/static/img/omni-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 49147fa

Please sign in to comment.