Skip to content
Open
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
185 changes: 0 additions & 185 deletions docusaurus.config.js

This file was deleted.

189 changes: 189 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
import math from "remark-math";
import katex from "rehype-katex";
import { Config } from "@docusaurus/types";
import type * as Preset from "@docusaurus/preset-classic";

const config: Config = {
title: "Rapier",
tagline: "Fast 2D and 3D physics engine for the Rust programming language.",
url: "https://rapier.rs",
baseUrl: "/",
onBrokenLinks: "throw",
favicon: "img/favicon.png",
organizationName: "dimforge", // Usually your GitHub org/user name.
projectName: "rapier", // Usually your repo name.
themeConfig: {
colorMode: {
respectPrefersColorScheme: true,
},
algolia: {
apiKey: "00969eabbf113aa543d1be16629dd663",
appId: "MDOZU7PTCV",
indexName: "rapier",
},
prism: {
additionalLanguages: ["toml", "rust"],
},
// announcementBar: {
// id: 'supportus',
// content:
// '⭐️ If you like Rapier, support us on <a target="_blank" rel="noopener noreferrer" href="https://github.com/sponsors/dimforge">GitHub Sponsor</a>! ⭐️',
// },
navbar: {
title: "Rapier",
logo: {
alt: "Rapier Logo",
src: "img/rapier_logo_color_small.svg",
},
hideOnScroll: true,
items: [
{
to: "docs/",
activeBasePath: "docs",
label: "Docs",
position: "left",
},
{
label: "Demos",
position: "left",
items: [
{
href: "https://rapier.rs/demos2d/index.html", // FIXME: should depend on the base url.
label: "2D Demos",
},
{
href: "https://rapier.rs/demos3d/index.html", // FIXME: should depend on the base url.
label: "3D Demos",
},
],
},
{
to: "/community",
position: "left",
activeBaseRegex: `/community/`,
label: "Community",
},
{
href: "https://dimforge.com/blog",
label: "Blog",
position: "left",
},
{
value:
'<a class="header-button-donate" href="https://github.com/sponsors/dimforge" target="_blank" rel="noopener noreferrer">Donate ♥</a>',
className: "header-button-donate",
position: "right",
type: "html",
},
{
href: "https://dimforge.com",
label: "Dimforge",
position: "right",
},
{
href: "https://github.com/dimforge/rapier",
position: "right",
className: "header-github-link",
"aria-label": "GitHub repository",
},
],
},
footer: {
style: "dark",
logo: {
alt: "Dimforge EURL Logo",
src: "https://www.dimforge.com/img/logo/logo_dimforge_small_rect.svg",
href: "https://www.dimforge.com/",
},
copyright: `Built by <a href="https://www.dimforge.com">Dimforge, EURL</a>.`,
links: [
{
title: "Resources",
items: [
{
label: "Documentation",
to: "docs/",
},
{
label: "Demos 2D",
href: "https://rapier.rs/demos2d/index.html",
},
{
label: "Demos 3D",
href: "https://rapier.rs/demos3d/index.html",
},
],
},
{
title: "Community",
items: [
{
label: "Stack Overflow",
href: "https://stackoverflow.com/questions/tagged/rapier",
},
{
label: "Discord",
href: "https://discord.gg/vt9DJSW",
},
// {
// label: 'Twitter',
// href: 'https://twitter.com/dimforge',
// },
],
},
{
title: "More",
items: [
// {
// label: 'Blog',
// to: 'blog',
// },
{
label: "GitHub",
href: "https://github.com/dimforge/rapier",
},
],
},
],
// copyright: `Copyright © ${new Date().getFullYear()} Dimforge EURL. Website built with Docusaurus.`,
},
} satisfies Preset.ThemeConfig,
plugins: [
[
"@docusaurus/plugin-content-docs",
{
id: "community",
path: "community",
routeBasePath: "community",
sidebarPath: require.resolve("./sidebar_community.js"),
showLastUpdateTime: false,
},
],
],
presets: [
[
"@docusaurus/preset-classic",
{
docs: {
sidebarPath: require.resolve("./sidebar_docs.ts"),
showLastUpdateTime: false,
remarkPlugins: [math],
rehypePlugins: [katex],
editUrl: "https://github.com/dimforge/rapier.rs/blob/master/",
},
blog: {
showReadingTime: true,
// Please change this to your repo.
editUrl:
"https://github.com/dimforge/rapier.rs/edit/master/website/blog/",
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
},
} satisfies Preset.Options,
],
],
stylesheets: ["https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"],
};

export default config;
Loading