Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add algolia search functionality to docs #196

Merged
merged 2 commits into from
Oct 20, 2023
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

# Misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local
Expand All @@ -18,3 +19,7 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*


# custom
config.json
211 changes: 103 additions & 108 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,126 +1,126 @@
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/dracula");

/** @type {import('@docusaurus/types').DocusaurusConfig} */
module.exports = {
title: 'OpenSauced',
tagline: 'The path to your next Open Source contribution',
url: 'https://docs.opensauced.pizza',
baseUrl: '/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'open-sauced', // Usually your GitHub org/user name.
projectName: 'docs.opensauced.pizza', // Usually your repo name.
title: "OpenSauced",
tagline: "The path to your next Open Source contribution",
url: "https://docs.opensauced.pizza",
baseUrl: "/",
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
favicon: "img/favicon.ico",
organizationName: "open-sauced", // Usually your GitHub org/user name.
projectName: "docs.opensauced.pizza", // Usually your repo name.
trailingSlash: true,
themeConfig: {
algolia: {
appId: 'bh4d9od16a',
apiKey: '1691a4a5b06166984397aa30153f663c',
indexName: 'opensauced',
algoliaOptions: { 'facetFilters': ["type:$TYPE"] },
appId: "RH1WG3CUDK",
apiKey: "ea723aba7d69f2f36feac9292f2d2fe9",
indexName: "dev_docs_index",
OgDev-01 marked this conversation as resolved.
Show resolved Hide resolved
algoliaOptions: { facetFilters: ["type:$TYPE"] },
debug: false,
placeholder: 'Search OpenSauced Docs',
placeholder: "Search OpenSauced Docs",
},
navbar: {
logo: {
alt: 'OpenSauced Logo',
src: 'img/logo_lightmode.png',
srcDark: 'img/logo_darkmode.png',
href: 'https://opensauced.pizza/'
alt: "OpenSauced Logo",
src: "img/logo_lightmode.png",
srcDark: "img/logo_darkmode.png",
href: "https://opensauced.pizza/",
},
items: [
{
type: 'doc',
docId: 'introduction',
label: 'Docs',
position: 'left',
type: "doc",
docId: "introduction",
label: "Docs",
position: "left",
},
{
alt: 'OpenSauced Logo',
src: 'img/logo.svg',
href: 'https://opensauced.pizza/'
alt: "OpenSauced Logo",
src: "img/logo.svg",
href: "https://opensauced.pizza/",
},
{
href: 'https://dev.to/opensauced',
label: 'Blog',
position: 'left',
href: "https://dev.to/opensauced",
label: "Blog",
position: "left",
},
{
href: 'https://github.com/open-sauced/docs.opensauced.pizza',
label: 'GitHub',
position: 'left',
href: "https://github.com/open-sauced/docs.opensauced.pizza",
label: "GitHub",
position: "left",
},
{
href: 'https://discord.gg/U2peSNf23P',
label: 'Discord',
position: 'left',
href: "https://discord.gg/U2peSNf23P",
label: "Discord",
position: "left",
},
{
href: 'https://opensauced.pizza/',
label: 'OpenSauced',
position: 'right',
href: "https://opensauced.pizza/",
label: "OpenSauced",
position: "right",
},
],
},
colorMode: {
defaultMode: 'light',
defaultMode: "light",
disableSwitch: false,
respectPrefersColorScheme: false,
},
footer: {
logo: {
alt: 'OpenSauced Logo',
src: 'img/logo.svg',
href: 'https://opensauced.pizza/'
alt: "OpenSauced Logo",
src: "img/logo.svg",
href: "https://opensauced.pizza/",
},
style: 'dark',
style: "dark",
links: [
{
title: 'Docs',
title: "Docs",
items: [
{
label: 'Contributing guide',
to: '/contributing/introduction-to-contributing/',
label: "Contributing guide",
to: "/contributing/introduction-to-contributing/",
},
{
label: 'Maintainer guide',
to: '/maintainers/setting-up-a-new-repository/',
label: "Maintainer guide",
to: "/maintainers/setting-up-a-new-repository/",
},
{
label: 'Chrome Extension Usage',
to: '/chrome-extension/introduction-to-the-chrome-extension/',
}
label: "Chrome Extension Usage",
to: "/chrome-extension/introduction-to-the-chrome-extension/",
},
],
},
{
title: 'Community',
title: "Community",
items: [
{
label: 'GitHub',
href: 'https://github.com/orgs/open-sauced/discussions',
label: "GitHub",
href: "https://github.com/orgs/open-sauced/discussions",
},
{
label: 'Discord',
href: 'https://discord.com/invite/U2peSNf23P',
label: "Discord",
href: "https://discord.com/invite/U2peSNf23P",
},
{
label: 'Twitter',
href: 'https://twitter.com/saucedopen',
}
label: "Twitter",
href: "https://twitter.com/saucedopen",
},
],
},
{
title: 'More',
title: "More",
items: [
{
label: 'Blog',
href: 'https://dev.to/opensauced',
label: "Blog",
href: "https://dev.to/opensauced",
},
{
label: 'Download book',
href: 'https://docs.opensauced.pizza/open-sauced-docs.pdf',
}
label: "Download book",
href: "https://docs.opensauced.pizza/open-sauced-docs.pdf",
},
],
},
],
Expand All @@ -133,84 +133,79 @@ module.exports = {
},
presets: [
[
'@docusaurus/preset-classic',
"@docusaurus/preset-classic",
{
docs: {
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl:
'https://github.com/open-sauced/docs.opensauced.pizza/edit/main/',
lastVersion: 'current',
editUrl: "https://github.com/open-sauced/docs.opensauced.pizza/edit/main/",
lastVersion: "current",
showLastUpdateAuthor: true,
showLastUpdateTime: true,
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
customCss: require.resolve("./src/css/custom.css"),
},
sitemap: {
changefreq: 'weekly',
changefreq: "weekly",
priority: 0.5,
},
},
],
],
plugins: [
[
'@docusaurus/plugin-pwa',
"@docusaurus/plugin-pwa",
{
debug: true,
offlineModeActivationStrategies: [
'appInstalled',
'standalone',
'queryString',
],
offlineModeActivationStrategies: ["appInstalled", "standalone", "queryString"],
pwaHead: [
{
tagName: 'link',
rel: 'icon',
href: '/img/logo.svg',
tagName: "link",
rel: "icon",
href: "/img/logo.svg",
},
{
tagName: 'link',
rel: 'manifest',
href: '/manifest.json', // your PWA manifest
tagName: "link",
rel: "manifest",
href: "/manifest.json", // your PWA manifest
},
{
tagName: 'meta',
name: 'theme-color',
content: '#313d3e',
tagName: "meta",
name: "theme-color",
content: "#313d3e",
},
{
tagName: 'meta',
name: 'apple-mobile-web-app-capable',
content: 'yes',
tagName: "meta",
name: "apple-mobile-web-app-capable",
content: "yes",
},
{
tagName: 'meta',
name: 'apple-mobile-web-app-status-bar-style',
content: '#000',
tagName: "meta",
name: "apple-mobile-web-app-status-bar-style",
content: "#000",
},
{
tagName: 'link',
rel: 'apple-touch-icon',
href: '/apple-touch-icon.png',
tagName: "link",
rel: "apple-touch-icon",
href: "/apple-touch-icon.png",
},
{
tagName: 'link',
rel: 'mask-icon',
href: '/img/logo.svg',
color: 'rgb(37, 194, 160)',
tagName: "link",
rel: "mask-icon",
href: "/img/logo.svg",
color: "rgb(37, 194, 160)",
},
{
tagName: 'meta',
name: 'msapplication-TileImage',
content: '/img/logo.svg',
tagName: "meta",
name: "msapplication-TileImage",
content: "/img/logo.svg",
},
{
tagName: 'meta',
name: 'msapplication-TileColor',
content: '#000',
tagName: "meta",
name: "msapplication-TileColor",
content: "#000",
},
],
},
Expand Down
Loading