From 9185db6df979b12a6691d4258e4ae40c0fc3fc81 Mon Sep 17 00:00:00 2001 From: lifehackerhansol Date: Mon, 23 Sep 2024 17:17:37 -0700 Subject: [PATCH] config: add support for `default` keyword in tabs Specifying `tab default` will allow defaulting to this tab on page load. --- docs/.vitepress/config.mjs | 5 ++++- docs/homebrew/edizon.md | 2 +- docs/homebrew/nxtheme-installer.md | 2 +- docs/user_guide/all/launching_cfw.md | 2 +- docs/user_guide/rcm/entering_rcm.md | 2 +- docs/user_guide/rcm/sending_payload.md | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs index 179e9712..d23bd7f4 100644 --- a/docs/.vitepress/config.mjs +++ b/docs/.vitepress/config.mjs @@ -67,7 +67,10 @@ export default defineConfig({ render: (tokens, idx) => { const token = tokens[idx]; if (token.nesting === 1) { - return ``; + let tokenData = token.info.match(/^ ?tab\s(default\s)?(.*)$/); + let isDefault = typeof tokenData[1] !== 'undefined'; + let name = tokenData[2]; + return ``; } else { return `\n`; } diff --git a/docs/homebrew/edizon.md b/docs/homebrew/edizon.md index 92f4444a..7e19a965 100644 --- a/docs/homebrew/edizon.md +++ b/docs/homebrew/edizon.md @@ -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. diff --git a/docs/homebrew/nxtheme-installer.md b/docs/homebrew/nxtheme-installer.md index e22fbbb7..0b403799 100644 --- a/docs/homebrew/nxtheme-installer.md +++ b/docs/homebrew/nxtheme-installer.md @@ -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: diff --git a/docs/user_guide/all/launching_cfw.md b/docs/user_guide/all/launching_cfw.md index 835c4c2c..e434b354 100644 --- a/docs/user_guide/all/launching_cfw.md +++ b/docs/user_guide/all/launching_cfw.md @@ -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: diff --git a/docs/user_guide/rcm/entering_rcm.md b/docs/user_guide/rcm/entering_rcm.md index 6cb0b762..7651694e 100644 --- a/docs/user_guide/rcm/entering_rcm.md +++ b/docs/user_guide/rcm/entering_rcm.md @@ -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. diff --git a/docs/user_guide/rcm/sending_payload.md b/docs/user_guide/rcm/sending_payload.md index 4f8bfe1c..073d67a4 100644 --- a/docs/user_guide/rcm/sending_payload.md +++ b/docs/user_guide/rcm/sending_payload.md @@ -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: