-
Notifications
You must be signed in to change notification settings - Fork 49
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
Update Docusaurus 3 #111
Update Docusaurus 3 #111
Changes from all commits
276487d
f33fc97
d7cc295
9daa9b0
a8999c0
b7911bd
c2646a3
939ef52
eff6873
784d87f
731feef
4d1946a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. changes have been made to this script to make it more cross platform friendly. I tested on mac, windows, linux. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
const math = require('remark-math') | ||
const katex = require('rehype-katex') | ||
|
||
module.exports = { | ||
const config = { | ||
title: 'Rapier', | ||
tagline: 'Fast 2D and 3D physics engine for the Rust programming language.', | ||
url: 'https://rapier.rs', | ||
baseUrl: '/', | ||
onBrokenLinks: 'error', // 'throw', | ||
onBrokenLinks: 'throw', | ||
favicon: 'img/favicon.png', | ||
organizationName: 'dimforge', // Usually your GitHub org/user name. | ||
projectName: 'rapier', // Usually your repo name. | ||
themeConfig: { | ||
algolia: { | ||
apiKey: '2fb2392fe420e3f9cd94004bda27a775', | ||
appId: 'rapier', | ||
indexName: 'rapier', | ||
}, | ||
prism: { | ||
theme: require('prism-react-renderer/themes/github'), | ||
theme: require('prism-react-renderer').themes.github, | ||
additionalLanguages: ['toml', 'rust'], | ||
}, | ||
// announcementBar: { | ||
|
@@ -44,13 +45,11 @@ module.exports = { | |
items: [ | ||
{ | ||
href: 'https://rapier.rs/demos2d/index.html', // FIXME: should depend on the base url. | ||
label: '2D Demos ↪', | ||
position: 'left', | ||
label: '2D Demos', | ||
}, | ||
{ | ||
href: 'https://rapier.rs/demos3d/index.html', // FIXME: should depend on the base url. | ||
label: '3D Demos ↪', | ||
position: 'left', | ||
label: '3D Demos', | ||
} | ||
], | ||
}, | ||
|
@@ -62,18 +61,18 @@ module.exports = { | |
}, | ||
{ | ||
href: 'https://dimforge.com/blog', | ||
label: 'Blog ↪', | ||
label: 'Blog', | ||
position: 'left', | ||
}, | ||
{ | ||
href: 'https://github.com/sponsors/dimforge', | ||
label: 'Donate ♥', | ||
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', | ||
className: 'header-button-donate' | ||
type: 'html' | ||
}, | ||
{ | ||
href: 'https://dimforge.com', | ||
label: 'Dimforge ↪', | ||
label: 'Dimforge', | ||
position: 'right', | ||
}, | ||
{ | ||
|
@@ -101,11 +100,11 @@ module.exports = { | |
to: 'docs/', | ||
}, | ||
{ | ||
label: 'Demos 2D ↪', | ||
label: 'Demos 2D', | ||
href: 'https://rapier.rs/demos2d/index.html', | ||
}, | ||
{ | ||
label: 'Demos 3D ↪', | ||
label: 'Demos 3D', | ||
href: 'https://rapier.rs/demos3d/index.html', | ||
}, | ||
], | ||
|
@@ -182,3 +181,5 @@ module.exports = { | |
'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css' | ||
] | ||
}; | ||
|
||
export default config; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
#!/bin/bash | ||
set -v | ||
|
||
if [ gsed -v ]; then | ||
gsed=gsed | ||
else | ||
# Hopefully installed sed is the gnu one. | ||
# note: aliases work poorly with xargs. | ||
gsed=sed | ||
fi | ||
Comment on lines
+4
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. using |
||
|
||
mkdir -p docs/user_guides/rust/ | ||
mkdir -p docs/user_guides/bevy_plugin/ | ||
mkdir -p docs/user_guides/javascript/ | ||
|
@@ -12,28 +20,28 @@ cp -r docs/user_guides/templates_injected/* docs/user_guides/bevy_plugin/. | |
cp -r docs/user_guides/templates_injected/* docs/user_guides/javascript/. | ||
|
||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 gawk -i inplace -v RS='<rapier>[^<]*</rapier>' -v ORS= '1' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 sed -i '/<rapier>/,/<\/rapier>/d' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 $gsed -i '/<rapier>/,/<\/rapier>/d' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 gawk -i inplace -v RS='<js>[^<]*</js>' -v ORS= '1' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 sed -i '/<js>/,/<\/js>/d' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 sed -i 's\<bevy>\\g' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 sed -i 's\</bevy>\\g' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 sed -i 's\<notjs>\\g' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 sed -i 's\</notjs>\\g' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 $gsed -i '/<js>/,/<\/js>/d' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 $gsed -i 's\<bevy>\\g' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 $gsed -i 's\</bevy>\\g' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 $gsed -i 's\<notjs>\\g' | ||
find docs/user_guides/bevy_plugin/ -type f -print0 | xargs -0 $gsed -i 's\</notjs>\\g' | ||
|
||
find docs/user_guides/rust/ -type f -print0 | xargs -0 gawk -i inplace -v RS='<bevy>[^<]*</bevy>' -v ORS= '1' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 sed -i '/<bevy>/,/<\/bevy>/d' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 $gsed -i '/<bevy>/,/<\/bevy>/d' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 gawk -i inplace -v RS='<js>[^<]*</js>' -v ORS= '1' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 sed -i '/<js>/,/<\/js>/d' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 sed -i 's\<rapier>\\g' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 sed -i 's\</rapier>\\g' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 sed -i 's\<notjs>\\g' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 sed -i 's\</notjs>\\g' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 $gsed -i '/<js>/,/<\/js>/d' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 $gsed -i 's\<rapier>\\g' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 $gsed -i 's\</rapier>\\g' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 $gsed -i 's\<notjs>\\g' | ||
find docs/user_guides/rust/ -type f -print0 | xargs -0 $gsed -i 's\</notjs>\\g' | ||
|
||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 gawk -i inplace -v RS='<rapier>[^<]*</rapier>' -v ORS= '1' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 sed -i '/<rapier>/,/<\/rapier>/d' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 $gsed -i '/<rapier>/,/<\/rapier>/d' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 gawk -i inplace -v RS='<bevy>[^<]*</bevy>' -v ORS= '1' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 sed -i '/<bevy>/,/<\/bevy>/d' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 $gsed -i '/<bevy>/,/<\/bevy>/d' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 gawk -i inplace -v RS='<notjs>[^<]*</notjs>' -v ORS= '1' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 sed -i '/<notjs>/,/<\/notjs>/d' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 sed -i 's\<js>\\g' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 sed -i 's\</js>\\g' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 $gsed -i '/<notjs>/,/<\/notjs>/d' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 $gsed -i 's\<js>\\g' | ||
find docs/user_guides/javascript/ -type f -print0 | xargs -0 $gsed -i 's\</js>\\g' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn build
tested on CI is great, it currently outputs some warning concerning links, which might be related to #41A good follow up Pull Request would be to eliminate these warnings. From my testing these warnings don´t indicate regressions.