qiskit-documentation/docs/open-source
Arnau Casau 9bde9ce888
Update guides' links to add the `/docs` base path (#2958)
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>
2025-04-22 13:31:45 +00:00
..
_toc.json Update guides' links to add the `/docs` base path (#2958) 2025-04-22 13:31:45 +00:00
code-of-conduct.mdx
create-a-provider.mdx Fix CSpell being overly permissive (#2954) 2025-04-08 18:37:40 +00:00
index.mdx Fix CSpell being overly permissive (#2954) 2025-04-08 18:37:40 +00:00
qiskit-sdk-version-strategy.mdx Update guides' links to add the `/docs` base path (#2958) 2025-04-22 13:31:45 +00:00