This PR adds the `/docs` base path to all our guides and tutorials. It
also updates the link checker to verify we always include the base path.
I used the following script to update all the links together with the
manual fixing of some videos:
<details> <summary>Script</summary>
```ts
import { globby } from "globby";
import { readFile, writeFile } from "fs/promises";
export async function updateBrokenLinks(filePath: string): Promise<void> {
let markdown = (await readFile(filePath)).toString();
var regex = new RegExp(`\\]\\(\\/((?!docs\\/)[^\\)]*)\\)`, "g");
markdown = markdown.replaceAll(regex, `\]\(/docs/$1\)`);
await writeFile(filePath, markdown);
}
async function main() {
const globs = [
"docs/{guides,migration-guides,open-source,tutorials}/*.{ipynb,mdx}",
"docs/faq.mdx",
"docs/support.mdx",
"docs/responsible-quantum-computing.mdx",
];
const allGuides = await globby(globs);
for (const guide of allGuides) {
await updateBrokenLinks(guide);
}
}
main().then(() => process.exit());
```
</details>