From 3d74e66b488d69465db935a1027336dabb0a0662 Mon Sep 17 00:00:00 2001 From: Yangshun Tay Date: Thu, 5 Mar 2020 04:58:46 -0800 Subject: [PATCH] [infer][PR] [website] add Algolia search Summary: Add Algolia Search. Fixes https://github.com/facebook/infer/issues/1228. Pull Request resolved: https://github.com/facebook/infer/pull/1231 Test Plan: Search bar and results appear. Screen Shot 2020-03-05 at 8 32 52 PM Differential Revision: D20281049 Pulled By: jvillard fbshipit-source-id: e253a1147 --- website/docusaurus.config.js | 98 +++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 47 deletions(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index e13bb9354..be635a983 100755 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -6,75 +6,79 @@ */ module.exports = { - title: "Infer", + title: 'Infer', tagline: - "A tool to detect bugs in Java and C/C++/Objective-C code before it ships", - url: "https://fbinfer.com", - baseUrl: "/", - favicon: "img/favicon.png", - organizationName: "facebook", - projectName: "infer", + 'A tool to detect bugs in Java and C/C++/Objective-C code before it ships', + url: 'https://fbinfer.com', + baseUrl: '/', + favicon: 'img/favicon.png', + organizationName: 'facebook', + projectName: 'infer', themeConfig: { + algolia: { + apiKey: 'aac9e661e851db0d4b6e74802c3df9de', + indexName: 'infer', + }, navbar: { - title: "Infer", - logo: { alt: "Infer Logo", src: "img/logo.png" }, + title: 'Infer', + logo: { alt: 'Infer Logo', src: 'img/logo.png' }, links: [ - { label: "Docs", to: "docs/getting-started" }, - { label: "Support", to: "docs/support" }, - { label: "Blog", to: "blog" }, + { label: 'Docs', to: 'docs/getting-started' }, + { label: 'Support', to: 'docs/support' }, + { label: 'Blog', to: 'blog' }, { - href: "https://twitter.com/fbinfer", - label: "Twitter", - position: "right" + href: 'https://twitter.com/fbinfer', + label: 'Twitter', + position: 'right', }, { - href: "https://www.facebook.com/inferstaticanalyzer", - label: "Facebook", - position: "right" + href: 'https://www.facebook.com/inferstaticanalyzer', + label: 'Facebook', + position: 'right', }, { - href: "https://github.com/facebook/infer", - label: "GitHub", - position: "right" - } - ] + href: 'https://github.com/facebook/infer', + label: 'GitHub', + position: 'right', + }, + ], }, footer: { - style: "light", + style: 'light', links: [ { - title: "Docs", + title: 'Docs', items: [ - { label: "Quick Start", to: "docs/getting-started" }, - { label: "User Guide", to: "docs/infer-workflow" }, - { label: "Foundations", to: "docs/about-Infer" }, - { label: "Bug Types Reference", to: "docs/checkers-bug-types" }, - { label: "Contribute", to: "docs/absint-framework" } - ] + { label: 'Quick Start', to: 'docs/getting-started' }, + { label: 'User Guide', to: 'docs/infer-workflow' }, + { label: 'Foundations', to: 'docs/about-Infer' }, + { label: 'Bug Types Reference', to: 'docs/checkers-bug-types' }, + { label: 'Contribute', to: 'docs/absint-framework' }, + ], }, { - title: "Community", - items: [{ label: "Support", to: "docs/support" }] + title: 'Community', + items: [{ label: 'Support', to: 'docs/support' }], }, { - title: "Social", + title: 'Social', items: [ - { label: "Blog", to: "blog" }, - { label: "GitHub", href: "https://github.com/facebook/infer" }, - { label: "Twitter", href: "https://twitter.com/fbinfer" } - ] - } + { label: 'Blog', to: 'blog' }, + { label: 'GitHub', href: 'https://github.com/facebook/infer' }, + { label: 'Twitter', href: 'https://twitter.com/fbinfer' }, + ], + }, ], - copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc. Built with Docusaurus.` - } + copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc. Built with Docusaurus.`, + }, }, presets: [ [ - "@docusaurus/preset-classic", + '@docusaurus/preset-classic', { - docs: { sidebarPath: require.resolve("./sidebars.js") }, - theme: { customCss: require.resolve("./src/css/custom.css") } - } - ] - ] + docs: { sidebarPath: require.resolve('./sidebars.js') }, + theme: { customCss: require.resolve('./src/css/custom.css') }, + }, + ], + ], };