canonical/open-documentation-academy

Ubuntu Core: replace Markdown links with MyST references

Ouverte

#243 ouverte le 19 juin 2025

 (21 commentaires) (0 réaction) (1 personne assignée)Python (99 forks)auto 404
editgood first issuesize 1workshop

Métriques du dépôt

Stars
 (119 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

ℹ This issue has been created specifically for the UbuCon CODA workshop. It is suitable for people making their first documentation contributions. If the task isn't completed as part of the workshop, it will become available generally.

Unlike the majority of our tasks, this task can be worked on by more than one person at a time. You do not need to be the sole assignee to work on this task, but we do ask that you leave a comment to say which page you're working on to help others who may be interested.

Background

The Ubuntu Core documentation has recently undergone a migration from Discourse to its own GitHub repository. It's now being built from the source Mardown files with Canonical's Sphinx Starter Pack.

The current documentation maintains the original Markdown links that were used on Discourse. These are incredibly brittle and will break when pages are moved or renamed. It's far better to use MyST's {ref} links, as these don't break when pages move, and they also insert titles directly from the destination link, rather than manually.

Task

Choose any page in the Ubuntu Core documentation and replace whatever Markdown links you find with MyST's {ref} links.

A Markdown link looks like this:

See [Build an Ubuntu Core image](/tutorials/build-your-first-image/index).

To create a {ref} link from the above example, you need to edit both the source page and the destination page.

Source: 	replace link with {ref}`unique-reference-name`
Destination:	add `(unique-reference-name)=` before the target heading

For example, the source link in the previous example would become:

See {ref}`build-your-first-image`.

On the destination page, just before the target Build your first image title, we would add:

(build-your-first-image)=
# Build your first image

Thank you!

Working on this is hugely appreciated, and we'll add our thanks both here and in the Ubuntu Core documentation project.

Guide contributeur