Skip to content

Commit

Permalink
Fix multiple errors during build (#495)
Browse files Browse the repository at this point in the history
* Fix: invalid links

* Fix: purify incorrect import

* Fix: specify Node16 to module option

* Feature: Netlify-native redirects over hard-coded redirects
  • Loading branch information
VitroidFPV authored Dec 9, 2024
1 parent 57c6664 commit b70852e
Show file tree
Hide file tree
Showing 27 changed files with 47 additions and 183 deletions.
2 changes: 1 addition & 1 deletion docs/development/Battery.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Notes:

### Sparky

See the [Sparky board chapter](/docs/wiki/boards/SPARKY).
See the [Sparky board chapter](/docs/wiki/boards/legacy/SPARKY).

## Configuration

Expand Down
4 changes: 2 additions & 2 deletions docs/development/FrSky-SPI-RX.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ FrSky X and X_LBT protocol:
## Boards with FrSky SPI RX

- [Matek F411-ONE](http://www.mateksys.com/?portfolio=f411-one);
- [CrazyBee F3 FR](/docs/wiki/boards/CRAZYBEEF3FR);
- [CrazyBee F4 FR Pro](/docs/wiki/boards/CRAZYBEEF4FRPRO);
- [CrazyBee F3 FR](/docs/wiki/boards/legacy/CRAZYBEEF3FR);
- [CrazyBee F4 FR Pro](/docs/wiki/boards/archive/CRAZYBEEF4FRPRO);
- [BetaFPV F4]
- more to come...
2 changes: 1 addition & 1 deletion docs/wiki/boards/archive/Missing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

If you can't find your board here, please see if it is listed in the [Betaflight Github configs list](https://github.com/betaflight/config/tree/master/configs)

F1, F3 and other older boards are in the [board archive](/docs/wiki/boards/archive/)
F1, F3 and other older boards are in the [board archive](/docs/category/archive-1)

If a current board is not listed here, please ask the manufacturer to make a pull request as described in our [manufacturer design guidelines](/docs/development/manufacturer/manufacturer-design-guidelines)
2 changes: 1 addition & 1 deletion docs/wiki/boards/archive/OMNIBUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ _(add your name here if you help test or contribute code for this board)_

_(add links board descriptions here that are similar in features or function, but have a separate target)_

- [SirinFPV](SIRINFPV)
- [SirinFPV](/docs/wiki/boards/legacy/SIRINFPV)

## Variants

Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/boards/archive/OMNIBUSF4SD.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Description

This is a variant of the other [OmnibusF4](/docs/wiki/boards/OMNIBUSF4SD) boards with a slightly different configuration.
This is a variant of the other [OmnibusF4](/docs/wiki/boards/archive/OMNIBUSF4) boards with a slightly different configuration.

This target applies to many variants, including 20x20 boards without an SD reader.

Expand Down
2 changes: 1 addition & 1 deletion docs/wiki/boards/legacy/SIRINFPV.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ _(add your name here if you help test or contribute code for this board)_

_(add links board descriptions here that are similar in features or function, but have a separate target)_

- [OMNIBUS](OMNIBUS)
- [OMNIBUS](/docs/wiki/boards/archive/OMNIBUS)

## Variants

Expand Down
6 changes: 3 additions & 3 deletions docs/wiki/guides/archive/DSHOT-ESC-Protocol-3-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ See: [AlienFlightNG Support](https://www.alienflightng.com/wiki/)
##### MOTOLAB - (MotoF3, Cyclone & Tempest)

Move motor 1 from Output #1 header pin to the PPM input header pin.
[See MOTOLAB board for wiring detail ](/docs/wiki/boards/MOTOLAB)
[See MOTOLAB board for wiring detail ](/docs/wiki/boards/legacy/MOTOLAB)
Follow above and to re-map output type in CLI:

```
Expand All @@ -228,7 +228,7 @@ resource motor 1 A07
save
```

See the [MOTOLAB](/docs/wiki/boards/MOTOLAB) Wiki page for other Remapping info.
See the [MOTOLAB](/docs/wiki/boards/legacy/MOTOLAB) Wiki page for other Remapping info.

##### PIKOBLX - Re-map motor 1 to the PPM pin (same as MotoLab). Solder motor 1 signal to the PPM pad leaving the SBUS jumper 'shorted'.

Expand Down Expand Up @@ -339,7 +339,7 @@ See Github Issue #2282 [Emax Femto (SPRACING F3EVO) - DSHOT 600 Motor 4 not spin
`resource motor 6 B08`
`save`

##### AIR32 - [instructions](/docs/wiki/boards/AIR32#faq-and-known-issues)
##### AIR32 - [instructions](/docs/wiki/boards/legacy/AIR32#faq-and-known-issues)

#### FC Target reported NOT working

Expand Down
31 changes: 31 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[[redirects]]
from = "/about"
to = "/docs/wiki/getting-started"

[[redirects]]
from = "/baro"
to = "/docs/wiki/guides/current/barometer"

[[redirects]]
from = "/development"
to = "/docs/development"

[[redirects]]
from = "/failsafe"
to = "/docs/wiki/guides/current/Failsafe"

[[redirects]]
from = "/guides"
to = "/docs/wiki/guides"

[[redirects]]
from = "/releases"
to = "/docs/category/release-notes"

[[redirects]]
from = "/setup"
to = "/docs/wiki/getting-started/setup-guide"

[[redirects]]
from = "/wiki"
to = "/docs/wiki"
4 changes: 2 additions & 2 deletions src/components/Sponsors/PartnerOverview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import { useColorMode } from '@docusaurus/theme-common';
import { sanitize } from 'dompurify';
import DOMPurify from 'dompurify';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faSpinner } from '@fortawesome/free-solid-svg-icons';

Expand All @@ -26,5 +26,5 @@ export default function PartnerOverview(): React.JSX.Element {
);
}

return <div id="partner_overview" className="min-h-[54px]" dangerouslySetInnerHTML={{ __html: sanitize(data) }} />;
return <div id="partner_overview" className="min-h-[54px]" dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(data) }} />;
}
4 changes: 2 additions & 2 deletions src/components/Sponsors/SponsorBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useState, useEffect } from 'react';
import { useColorMode } from '@docusaurus/theme-common';
import { sanitize } from 'dompurify';
import DOMPurify from 'dompurify';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faSpinner } from '@fortawesome/free-solid-svg-icons';

Expand Down Expand Up @@ -45,7 +45,7 @@ export default function SponsorBanner(): React.JSX.Element {
return (
<div>
{data ? (
<div className={`transition-opacity duration-1000 min-h-[99px] ${loading ? 'opacity-0' : 'opacity-100'}`} dangerouslySetInnerHTML={{ __html: sanitize(data) }} />
<div className={`transition-opacity duration-1000 min-h-[99px] ${loading ? 'opacity-0' : 'opacity-100'}`} dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(data) }} />
) : (
<div className="min-h-[99px] text-2xl flex justify-center items-center">
<FontAwesomeIcon className="mr-2" icon={faSpinner} spin />
Expand Down
18 changes: 0 additions & 18 deletions src/pages/about.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/about.md

This file was deleted.

18 changes: 0 additions & 18 deletions src/pages/baro.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/baro.md

This file was deleted.

18 changes: 0 additions & 18 deletions src/pages/development.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/development.md

This file was deleted.

18 changes: 0 additions & 18 deletions src/pages/failsafe.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/failsafe.md

This file was deleted.

18 changes: 0 additions & 18 deletions src/pages/guides.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/guides.md

This file was deleted.

18 changes: 0 additions & 18 deletions src/pages/releases.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/releases.md

This file was deleted.

18 changes: 0 additions & 18 deletions src/pages/setup.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/setup.md

This file was deleted.

18 changes: 0 additions & 18 deletions src/pages/wiki.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/pages/wiki.md

This file was deleted.

3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"extends": "@tsconfig/docusaurus/tsconfig.json",
"compilerOptions": {
"baseUrl": "."
"baseUrl": ".",
"module": "Node16"
}
}

0 comments on commit b70852e

Please sign in to comment.