no bug - doc(import-mdn): Update the procedure as it didn't work archived pages r=firefox-source-docs-reviewers,championshuttler DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D104992
This commit is contained in:
Sylvestre Ledru 2021-02-12 14:28:12 +00:00
Родитель 4323e6df02
Коммит fcc9fd2a93
1 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -4,25 +4,28 @@ Importing documentation from MDN
As MDN should not be used for documenting mozilla-central specific code or process, As MDN should not be used for documenting mozilla-central specific code or process,
the documentation should be migrated in this repository. 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. to the firefox source docs.
1. Install https://pandoc.org/ - If you are using packages provided by your distribution, 1. Install https://pandoc.org/ - If you are using packages provided by your distribution,
make sure that the version is not too old. 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: 3. Run pandoc the following way:
.. code-block:: shell .. 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 .. _./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 .. code-block:: shell