Importing documentation from MDN¶
As MDN should not be used for documenting mozilla-central specific code or process, the documentation should be migrated in this repository.
Fortunately, there is an easy way to import the doc from MDN using GitHub to the firefox source docs.
Install https://pandoc.org/ - If you are using packages provided by your distribution, make sure that the version is not too old.
Identify where your page is located on the GitHub repository ( https://github.com/mdn/archived-content/tree/main/files/en-us/mozilla ). Get the raw URL
Run pandoc the following way:
$ pandoc -t rst https://github.com/mdn/archived-content/tree/main/files/en-us/mozilla/firefox/performance_best_practices_for_firefox_fe_engineers > doc.rst
In the new doc.rst, identify the images and wget/curl them into img/.
Verify the rst syntax using ./mach lint -l rst
If relevant, remove unbreakable spaces (rendered with a “!” on Phabricator)
$ sed -i -e 's/\xc2\xa0/ /g' doc.rst