diff --git a/typescript/generate.js b/typescript/generate.js
index df81b5d6f..f3a336609 100644
--- a/typescript/generate.js
+++ b/typescript/generate.js
@@ -62,7 +62,14 @@ function get(key, obj, isGlobal) {
.replace(/<\/?ul>/g, "")
.replace(/
/g, "- ")
.replace(/<\/li>/g, "")
- .replace(/([^\n]*)<\/a>/g, "[$2]($1)")
+ .replace(
+ /([^\n]*)<\/a>/g,
+ (_, address, name) => {
+ if (address.startsWith("/"))
+ address = "https://espruino.com/" + address;
+ return `[${name}](${address})`;
+ }
+ )
)
.concat([`@url ${obj["!url"]}`])
.map((line) => " * " + line)
diff --git a/typescript/types/main.d.ts b/typescript/types/main.d.ts
index 447fe115c..698b8a4b5 100644
--- a/typescript/types/main.d.ts
+++ b/typescript/types/main.d.ts
@@ -10,7 +10,7 @@ declare function neopixel(): void;
/**
* This library provides TV out capability on the Espruino and Espruino Pico.
- * See the [Television](/Television) page for more information.
+ * See the [Television](https://espruino.com//Television) page for more information.
* @url http://www.espruino.com/Reference#l_tv_undefined
*/
declare function tv(): void;
@@ -1319,7 +1319,7 @@ declare namespace Microbit {
function accel(): any;
/**
- * **Note:** This function is only available on the [BBC micro:bit](/MicroBit) board
+ * **Note:** This function is only available on the [BBC micro:bit](https://espruino.com//MicroBit) board
* Write the given value to the accelerometer
* @url http://www.espruino.com/Reference#l_Microbit_accelWr
*/
@@ -2039,7 +2039,7 @@ declare namespace ESP8266 {
/**
* This library allows you to create http servers and make http requests
- * In order to use this, you will need an extra module to get network connectivity such as the [WIZnet W5500](/CC3000">TI CC3000 or TI CC3000 or node.js library. Please see the