diff --git a/docs/app.js b/docs/app.js index 20d11fa8b..dc7338b73 100644 --- a/docs/app.js +++ b/docs/app.js @@ -10,12 +10,12 @@ const configData = { name: 'Alpaca-OwO', category: configCategories[1], website: 'https://github.com/Project-Alpaca/Alpaca-OwO', - desc: 'Arcade controller I/O platform designed by dogtopus.' + desc: 'Arcade controller I/O platform designed by dogtopus.' }, BentoBox: { name: 'ScrubTier BentoBox', category: configCategories[2], - website: 'https://github.com/OpenStickCommunity/GP2040-CE/tree/RP2040-arcade-board/configs/BentoBox', + website: 'https://github.com/OpenStickCommunity/GP2040-CE/tree/main/configs/BentoBox', desc: '' }, DURAL: { @@ -40,19 +40,19 @@ const configData = { name: 'Flatbox Rev 4', category: configCategories[1], website: 'https://github.com/jfedor2/flatbox/tree/master/hardware-rev4', - desc: 'Stickless PCB designed by jfedor2 using an embedded RP2040 chip.' + desc: 'Stickless PCB designed by jfedor2 using an embedded RP2040 chip.' }, FlatboxRev5: { name: 'Flatbox Rev 5', category: configCategories[1], website: 'https://github.com/jfedor2/flatbox/tree/master/hardware-rev5', - desc: 'Stickless PCB designed by jfedor2 using the Waveshare RP2040-Zero.' + desc: 'Stickless PCB designed by jfedor2 using the Waveshare RP2040-Zero.' }, FlatboxRev5RGB: { name: 'Flatbox Rev 5 RGB', category: configCategories[1], website: 'https://github.com/OpenStickCommunity/Hardware/tree/main/Flatbox%20Rev%205%20RGB', - desc: 'Stickless PCB designed by jfedor2 and TheTrain using the Waveshare RP2040-Zero.' + desc: 'Stickless PCB designed by jfedor2 and TheTrain using the Waveshare RP2040-Zero.' }, KB2040: { name: 'Adafruit KB2040', @@ -70,7 +70,7 @@ const configData = { MavercadeKeebfighter: { name: 'Mavercade Keebfighter', category: configCategories[2], - website: 'https://github.com/OpenStickCommunity/GP2040-CE/tree/RP2040-arcade-board/configs/MavercadeKeebfighter', + website: 'https://github.com/OpenStickCommunity/GP2040-CE/tree/main/configs/MavercadeKeebfighter', desc: '' }, Pico: { @@ -91,7 +91,7 @@ const configData = { name: 'Pico Fighting Board', category: configCategories[1], website: 'https://github.com/FeralAI/PicoFightingBoard', - desc: 'Arcade encoder board designed by FeralAI using a Raspberry Pi Pico or pin-equivalent RP2040 board.' + desc: 'Arcade encoder board designed by FeralAI using a Raspberry Pi Pico or pin-equivalent RP2040 board.' }, PicoW: { name: 'Raspberry Pi Pico W', @@ -105,31 +105,31 @@ const configData = { name: 'RP2040 Advanced Breakout', category: configCategories[1], website: 'https://github.com/OpenStickCommunity/Hardware/tree/main/RP2040%20Advanced%20Breakout%20Board', - desc: 'Arcade encoder board designed by TheTrain using an embedded RP2040, and is the official board of the GP2040-CE project.' + desc: 'Arcade encoder board designed by TheTrain using an embedded RP2040, and is the official board of the GP2040-CE project.' }, RP2040MiniBreakoutBoard: { name: 'RP2040 Mini Breakout', category: configCategories[1], website: 'https://github.com/OpenStickCommunity/Hardware/tree/main/RP2040%20Mini%20Breakout%20Board', - desc: 'A reduced-footprint spin off of the RP2040 Advanced Breakout Board designed by TheTrain.' + desc: 'A reduced-footprint spin off of the RP2040 Advanced Breakout Board designed by TheTrain.' }, ReflexEncoder: { name: 'Reflex Arcade Encoder', category: configCategories[1], website: 'https://github.com/misteraddons/ReflexFightingBoard', - desc: 'Arcade encoder board designed and sold by MiSTerAddons using an embedded RP2040 chip.' + desc: 'Arcade encoder board designed and sold by MiSTerAddons using an embedded RP2040 chip.' }, ReflexCtrlSNES: { name: 'Reflex CTRL SNES', category: configCategories[1], website: 'https://github.com/misteraddons/Reflex-CTRL', - desc: 'Reflex Board Open source PCB for SNES Controller replacement PCBs designed and sold by MiSTerAddons using an embedded RP2040 chip.' + desc: 'Reflex Board Open source PCB for SNES Controller replacement PCBs designed and sold by MiSTerAddons using an embedded RP2040 chip.' }, SGFDevices: { name: 'SGF Flatbox', category: configCategories[1], website: 'https://github.com/sgfdevices/SGFlatbox', - desc: 'Configuration for the SGF Flatbox-based controllers, based on the excellent revisions of the Flatbox design by jfedor2 powered by an RP2040 MCU.' + desc: 'Configuration for the SGF Flatbox-based controllers, based on the excellent revisions of the Flatbox design by jfedor2 powered by an RP2040 MCU.' }, SparkFunProMicro: { name: 'SparkFun Pro Micro', @@ -137,13 +137,13 @@ const configData = { pos: 2, pinout: '/#/wiring?id=sparkfun-pro-micro-rp2040', website: 'https://learn.sparkfun.com/tutorials/pro-micro-rp2040-hookup-guide', - desc: 'An RP2040 board in the Pro Micro form factor. This build is a drop-in replacement for the Daemonbite Arcade Encoder.' + desc: 'An RP2040 board in the Pro Micro form factor. This build is a drop-in replacement for the Daemonbite Arcade Encoder.' }, Stress: { name: 'Stress', category: configCategories[1], website: 'https://github.com/GroooveBob/Stress', - desc: 'A small and portable PCB-as-a-controller designed by GroooveBob using the Waveshare RP-2040-Zero.' + desc: 'A small and portable PCB-as-a-controller designed by GroooveBob using the Waveshare RP-2040-Zero.' }, WaveshareZero: { name: 'Waveshare RP2040-Zero', @@ -151,7 +151,7 @@ const configData = { pos: 3, pinout: '/#/wiring?id=waveshare-rp2040-zero', website: 'https://www.waveshare.com/wiki/RP2040-Zero', - desc: 'The Waveshare RP2040-Zero is a small form factor board with castellated pins and USB-C, making this a popular choice for custom built PCBs without the need for SMT assembly.' + desc: 'The Waveshare RP2040-Zero is a small form factor board with castellated pins and USB-C, making this a popular choice for custom built PCBs without the need for SMT assembly.' }, }; @@ -163,6 +163,8 @@ window.$docsify = { loadSidebar: '_sidebar.md', auto2top: true, subMaxLevel: 3, + externalLinkTarget: '_self', + cornerExternalLinkTarget: '_self', themeable: { readyTransition : true, // default responsiveTables: true // default @@ -205,13 +207,13 @@ window.$docsify = {
  • - + Pinout
  • - + Website @@ -312,13 +314,19 @@ window.$docsify = { this.$root.releaseNotes = releaseInfo.body; this.$root.releaseVersion = releaseInfo.name; - if (window.location.hostname === 'localhost') { - this.$root.releases = Object.keys(this.configData) - .map(key => { + + this.$root.releases = releaseInfo.assets + .filter(a => a.name.startsWith('GP2040-CE_')) + .filter(a => { + const key = a.name.substring(a.name.lastIndexOf('_') + 1).replace('.uf2', ''); + return Object.keys(this.configData).indexOf(key) > -1; + }) + .map(a => { + const key = a.name.substring(a.name.lastIndexOf('_') + 1).replace('.uf2', ''); return { key, ...this.configData[key], - url: '', + url: a.browser_download_url, img: `/assets/boards/${key}.jpg`, }; }) @@ -336,41 +344,6 @@ window.$docsify = { values[r.category].push(r); return values; }, { }); - } - else { - this.$root.releases = releaseInfo.assets - .filter(a => a.name.startsWith('GP2040-CE_')) - .filter(a => { - const key = a.name.substring(a.name.lastIndexOf('_') + 1).replace('.uf2', ''); - return Object.keys(this.configData).indexOf(key) > -1; - }) - .map(a => { - const key = a.name.substring(a.name.lastIndexOf('_') + 1).replace('.uf2', ''); - return { - key, - ...this.configData[key], - url: a.browser_download_url, - img: `/assets/boards/${key}.jpg`, - }; - }) - .sort((a, b) => { - if (a.name < b.name) return -1; - if (a.name > b.name) return 1; - return 0; - }) - .sort((a, b) => (a.pos === undefined ? Number.MAX_VALUE : a.pos) - (b.pos === undefined ? Number.MAX_VALUE : b.pos)) - .reduce((p, r) => { - let values = { ...p }; - if (!values[r.category]) - values[r.category] = []; - - values[r.category].push(r); - return values; - }, { }); - } - - - console.log(this.$root.releases); this.fetched = true; }); diff --git a/docs/package.json b/docs/package.json index 38a37a16a..dd5c73c0d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "description": "", "scripts": { - "start": "docsify serve ./" + "start": "docsify serve ./ --open" }, "keywords": [], "author": "",