Skip to content

Commit

Permalink
config: add support for default keyword in tabs
Browse files Browse the repository at this point in the history
Specifying `tab default` will allow defaulting to this tab on page
load.
  • Loading branch information
lifehackerhansol committed Oct 23, 2024
1 parent ae0f3e5 commit d7acc48
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ export default defineConfig({
render: (tokens, idx) => {
const token = tokens[idx];
if (token.nesting === 1) {
return `<Tab name="${token.info.match(/^ ?tab\s+(.*)$/)[1]}">`;
let tokenData = token.info.match(/^ ?tab\s(default\s)?(.*)$/);
let isDefault = typeof tokenData[1] !== 'undefined';
let name = tokenData[2];
return `<Tab name="${name}" ${isDefault ? "default=true" : ""}>`;
} else {
return `</Tab>\n`;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/homebrew/edizon.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The maintained EdiZon overlay can be found [here](https://github.com/proferabg/E

::::: tabs

:::: tab Installation instructions (EdiZon):
:::: tab default Installation instructions (EdiZon):

1. Boot into Hekate and go to `Tools` > `USB Tools` > `SD Card`, then plug your Switch into your PC via USB.
1. Your microSD card should now be accessible on your PC, open it.
Expand Down
2 changes: 1 addition & 1 deletion docs/homebrew/nxtheme-installer.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ If you want to use community made themes, for example from the [r/NXThemes](http

::::: tabs

:::: tab Windows
:::: tab default Windows

### What you need:

Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/all/launching_cfw.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Your emuMMC (emuNAND) should never connect to Nintendo. For online play, eShop b

::::: tabs

:::: tab Instructions for emuMMC
:::: tab default Instructions for emuMMC

### Instructions:

Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/rcm/entering_rcm.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The order of methods on this page is in the order of ease. The easiest method to

::::: tabs

:::: tab RCM Jig
:::: tab default RCM Jig

Some jig designs use paperclips, inheriting the same risks as the "metal bridge" / "paperclip method" and should not be done.

Expand Down
2 changes: 1 addition & 1 deletion docs/user_guide/rcm/sending_payload.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Now that the device is in RCM, we will need to send it a payload. The methods ar

::::: tabs

:::: tab Windows
:::: tab default Windows

### What you need:

Expand Down

0 comments on commit d7acc48

Please sign in to comment.