Skip to content

Commit

Permalink
docs: update Docusaurus to v2.2 (solana-labs#29563)
Browse files Browse the repository at this point in the history
* build: update docusaurus

* fix: algolia keys

* fix: frontmatter keywords array

* build: clsx version

* fix: card layout and pages

* fix: invalid internal link
  • Loading branch information
nickfrosty authored Jan 18, 2023
1 parent 9bd0ce4 commit 1345e89
Show file tree
Hide file tree
Showing 18 changed files with 4,073 additions and 8,808 deletions.
3 changes: 3 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
/static/img/*.png
vercel.json

# use npm and package-lock.json
yarn.lock

# Misc
.DS_Store
.env
Expand Down
8 changes: 6 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ module.exports = {
},
},
themeConfig: {
prism: {
additionalLanguages: ["rust"],
},
navbar: {
logo: {
alt: "Solana Logo",
Expand Down Expand Up @@ -89,7 +92,6 @@ module.exports = {
{
href: "https://spl.solana.com",
label: "Solana Program Library »",
position: "left",
},
],
},
Expand All @@ -115,7 +117,8 @@ module.exports = {
},
algolia: {
// This API key is "search-only" and safe to be published
apiKey: "d58e0d68c875346d52645d68b13f3ac0",
apiKey: "011e01358301f5023b02da5db6af7f4d",
appId: "FQ12ISJR4B",
indexName: "solana",
contextualSearch: true,
},
Expand Down Expand Up @@ -199,6 +202,7 @@ module.exports = {
{
docs: {
path: "src",
breadcrumbs: false,
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
remarkPlugins: [math],
Expand Down
9 changes: 5 additions & 4 deletions docs/layouts/CardLayout.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from "react";
import Layout from "@theme/Layout";
import DocSidebar from "@theme/DocSidebar";
import ThemeClassNames from "@docusaurus/theme-classic/lib/theme/DocPage/styles.module.css";
import SidebarStyles from "@docusaurus/theme-classic/lib/theme/DocPage/Layout/Sidebar/styles.module.css";
import DocPageStyles from "@docusaurus/theme-classic/lib/theme/DocPage/Layout/styles.module.css";
import sidebar from "../sidebars";

function CardLayout({
Expand All @@ -20,14 +21,14 @@ function CardLayout({
// return the page layout, ready to go
return (
<Layout title={title} description={description}>
<div className={ThemeClassNames.docPage}>
<div className={DocPageStyles.docPage}>
{sidebarItems?.length > 0 && (
<aside className={ThemeClassNames.docSidebarContainer}>
<aside className={SidebarStyles.docSidebarContainer}>
<DocSidebar sidebar={sidebarItems} path={path}></DocSidebar>
</aside>
)}

<main className={ThemeClassNames.docPage}>{children}</main>
<main className={DocPageStyles.docPage}>{children}</main>
</div>
</Layout>
);
Expand Down
Loading

0 comments on commit 1345e89

Please sign in to comment.