Upgrade Docusaurus to 3.0 (#179)

This commit is contained in:
Piotr Rogowski 2023-11-01 11:15:16 +01:00 committed by GitHub
parent 273ad5c62d
commit ba72da355e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 7108 additions and 2887 deletions

1
.npmrc Normal file
View File

@ -0,0 +1 @@
legacy-peer-deps=true

View File

@ -24,12 +24,14 @@
"devcontainers",
"DFCO",
"dyno",
"easyops",
"FOME",
"footwell",
"GPPMW",
"GPPWM",
"Highside",
"IACV",
"katex",
"Lowside",
"Miata",
"Motorsports",
@ -40,6 +42,7 @@
"Polygonus",
"powerband",
"pushrod",
"rehype",
"standardised",
"togethor",
"UEGO",

View File

@ -22,7 +22,7 @@ Within the idle settings, the first set of parameters to configure are the idle
### Idle Air Control Valve Offsets
Load can vary during idle and AC is the most significant factor that can significantly impact the engine load at idle. For engines equipped with an automatic transmission, the load in park/neutral is significantly different from that in drive. It is usually necessary to add IAC duty cycle/air to compensate for the torque required to spin the AC compressor. Again, it is crucial to ensure that AFRs don't swing excessively when moving between different idle operational areas. In the idle settings, start with about 10-15% for the _A/C adder (%)_ parameter. As the AC increases the alternator load, the engine torque also needs to increase when the AC is enabled so it is recommended to do this by increasing the engine RPM by 100-200 with the _A/C target adder (RPM)_. The cooling fans also have associated adders (_Fan #x adder(%)_) although these don't usually need to be increased unless you notice a significant drop in RPM when the fans come on.
Load can vary during idle and AC is the most significant factor that can significantly impact the engine load at idle. For engines equipped with an automatic transmission, the load in park/neutral is significantly different from that in drive. It is usually necessary to add IAC duty cycle/air to compensate for the torque required to spin the AC compressor. Again, it is crucial to ensure that AFRs don't swing excessively when moving between different idle operational areas. In the idle settings, start with about 10-15% for the _AC adder (%)_ parameter. As the AC increases the alternator load, the engine torque also needs to increase when the AC is enabled so it is recommended to do this by increasing the engine RPM by 100-200 with the _AC target adder (RPM)_. The cooling fans also have associated adders (_Fan #x adder(%)_) although these don't usually need to be increased unless you notice a significant drop in RPM when the fans come on.
## Open Loop Idle
@ -46,7 +46,7 @@ The first step of tuning the idle RPM is to set up the open loop idle airflow. S
Closed loop idle control uses a combination of closed loop timing adjustments and idle air control valve adjustments to achieve a stable idle. Achieving a stable idle can be difficult as it requires tuning two separate controllers which operate in parallel to control the engine RPM. The best way to achieve a good idle is to use the closed loop idle timing for the larger and quicker corrections with the idle air controller acting to compensate for slower changes.
Before tuning the closed loop idle, you need to have properly tuned the idle VE, idle ignition table and open loop idle control. To tune the closed loop controllers, you also need some understanding of a closed loop controller called a PID controller. [This video by RC Model Reviews] (<https://youtu.be/0vqWyramGy8>) perfectly explains PID controllers in basic terms.
Before tuning the closed loop idle, you need to have properly tuned the idle VE, idle ignition table and open loop idle control. To tune the closed loop controllers, you also need some understanding of a closed loop controller called a PID controller. [This video by RC Model Reviews](https://youtu.be/0vqWyramGy8) perfectly explains PID controllers in basic terms.
### Closed Loop Timing

View File

@ -47,7 +47,7 @@ Save your work and proceed to testing of change.
### Prerequisites for local test
- [Node.js](https://nodejs.org/en/download/) version 16.14 or above:
- [Node.js](https://nodejs.org/en/download/) version 18 or above:
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
### run Docusaurus locally

View File

@ -1,10 +1,12 @@
// Note: type annotations allow type checking and IDEs autocompletion
import type { Options, ThemeConfig } from '@docusaurus/preset-classic';
import type { Config } from '@docusaurus/types';
import { themes } from 'prism-react-renderer';
const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
import crypto from 'crypto';
import fs from 'fs';
const fs = require('fs');
const crypto = require('crypto');
const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;
const url = 'https://wiki.fome.tech';
const isBuild = process.env.NODE_ENV === 'production';
@ -18,8 +20,7 @@ const pdfChecksum = () => {
const pdfUrl = `${isBuild ? url : 'http://localhost:3000'}/pdf/${pdfName}?v=${pdfChecksum()}`;
/** @type {import('@docusaurus/types').Config} */
const config = {
const config: Config = {
title: 'FOME Wiki',
tagline: 'Free Open Motorsports ECU',
url,
@ -51,11 +52,10 @@ const config = {
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
{
docs: {
routeBasePath: '/', // Serve the docs at the site's root
sidebarPath: require.resolve('./sidebars.js'),
sidebarPath: require.resolve('./sidebars.ts'),
// Remove this to remove the "edit this page" links.
editUrl: 'https://github.com/FOME-Tech/wiki/tree/master',
remarkPlugins: [require('remark-math')],
@ -65,7 +65,7 @@ const config = {
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
}),
} satisfies Options,
],
],
@ -81,12 +81,11 @@ const config = {
themes: [
[
require.resolve('@easyops-cn/docusaurus-search-local'),
/** @type {import('@easyops-cn/docusaurus-search-local').PluginOptions} */
({
{
hashed: true, // `hashed` is recommended as long-term-cache of index file is possible.
indexBlog: false,
docsRouteBasePath: '/',
}),
},
],
],
@ -134,84 +133,82 @@ const config = {
],
],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'img/icons/android-chrome-512x512.png',
colorMode: {
defaultMode: 'dark',
respectPrefersColorScheme: true,
},
navbar: {
title: '',
logo: {
alt: 'FOME Logo',
src: 'img/logo-transparent.png',
style: {
height: 30,
marginTop: -2,
},
themeConfig: {
image: 'img/icons/android-chrome-512x512.png',
colorMode: {
defaultMode: 'dark',
respectPrefersColorScheme: true,
},
navbar: {
title: '',
logo: {
alt: 'FOME Logo',
src: 'img/logo-transparent.png',
style: {
height: 30,
marginTop: -2,
},
items: [
{
href: pdfUrl,
label: 'PDF',
position: 'right',
target: '_blank',
},
{
href: 'https://github.com/FOME-Tech/wiki',
label: 'GitHub',
position: 'right',
},
{
type: 'search',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.gg/5FQj4DMz',
},
{
label: 'Facebook',
href: 'https://www.facebook.com/profile.php?id=100088049271157',
},
],
},
{
title: 'More',
items: [
{
to: pdfUrl,
label: 'PDF version',
target: '_blank',
},
{
label: 'FOME.tech',
href: 'https://www.fome.tech',
},
{
label: 'GitHub',
href: 'https://github.com/FOME-Tech',
},
],
},
],
// copyright: `Copyright © ${new Date().getFullYear()} FOME`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
}),
items: [
{
href: pdfUrl,
label: 'PDF',
position: 'right',
target: '_blank',
},
{
href: 'https://github.com/FOME-Tech/wiki',
label: 'GitHub',
position: 'right',
},
{
type: 'search',
position: 'right',
},
],
},
footer: {
style: 'dark',
links: [
{
title: 'Community',
items: [
{
label: 'Discord',
href: 'https://discord.gg/5FQj4DMz',
},
{
label: 'Facebook',
href: 'https://www.facebook.com/profile.php?id=100088049271157',
},
],
},
{
title: 'More',
items: [
{
to: pdfUrl,
label: 'PDF version',
target: '_blank',
},
{
label: 'FOME.tech',
href: 'https://www.fome.tech',
},
{
label: 'GitHub',
href: 'https://github.com/FOME-Tech',
},
],
},
],
// copyright: `Copyright © ${new Date().getFullYear()} FOME`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
},
} satisfies ThemeConfig,
};
module.exports = config;

9774
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -23,22 +23,25 @@
"pdf": "docusaurus-prince-pdf -u http://localhost:3000 -o static/pdf/wiki.fome.pdf"
},
"dependencies": {
"@docusaurus/core": "^2.4.3",
"@docusaurus/plugin-client-redirects": "^2.4.3",
"@docusaurus/preset-classic": "^2.4.3",
"@docusaurus/core": "^3.0.0",
"@docusaurus/plugin-client-redirects": "^3.0.0",
"@docusaurus/preset-classic": "^3.0.0",
"@easyops-cn/docusaurus-search-local": "^0.36.0",
"@mdx-js/react": "^1.6.22",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rehype-katex": "^5.0.0",
"remark-math": "^3.0.1"
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rehype-katex": "^7.0.0",
"remark-math": "^6.0.0"
},
"devDependencies": {
"@biomejs/biome": "1.3.3",
"@docusaurus/module-type-aliases": "^2.4.3",
"@docusaurus/module-type-aliases": "^3.0.0",
"@docusaurus/tsconfig": "^3.0.0",
"@docusaurus/types": "^3.0.0",
"@tsconfig/docusaurus": "^2.0.2",
"@types/node": "^20.8.10",
"docusaurus-prince-pdf": "^1.2.1",
"typescript": "^5.2.2"
},
@ -55,6 +58,6 @@
]
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}

View File

@ -1,3 +1,5 @@
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
@ -9,10 +11,7 @@
Create as many sidebars as you want.
*/
// @ts-check
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
const sidebars: SidebarsConfig = {
// By default, Docusaurus generates a sidebar from the docs folder structure
mainSidebar: [{ type: 'autogenerated', dirName: '.' }],

View File

@ -1,5 +1,5 @@
{
"extends": "@tsconfig/docusaurus/tsconfig.json",
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}