diff --git a/tools/moztreedocs/docs/mdn-import.rst b/tools/moztreedocs/docs/mdn-import.rst index f3efcf431311..3d42f9a3c9c3 100644 --- a/tools/moztreedocs/docs/mdn-import.rst +++ b/tools/moztreedocs/docs/mdn-import.rst @@ -4,25 +4,28 @@ 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. -Fortunatelly, there is an easy way to import the doc from MDN +Fortunately, there is an easy way to import the doc from MDN using GitHub to the firefox source docs. 1. Install https://pandoc.org/ - If you are using packages provided by your distribution, make sure that the version is not too old. -2. Add a ``?raw=1`` add the end of the MDN URL +2. 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 3. Run pandoc the following way: .. code-block:: shell - $ pandoc -t rst https://wiki.developer.mozilla.org/docs/Web/JavaScript?raw\=1 > doc.rst + $ 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 -4. Verify the rst syntax using `./mach lint -l rst`_ +4. In the new doc.rst, identify the images and wget/curl them into `img/`. + +5. Verify the rst syntax using `./mach lint -l rst`_ .. _./mach lint -l rst: /tools/lint/linters/rstlinter.html -5. If relevant, remove unbreakable spaces (rendered with a "!" on Phabricator) +6. If relevant, remove unbreakable spaces (rendered with a "!" on Phabricator) .. code-block:: shell