How to create and edit pages

Ten artykuł wdraża nowe osoby wspierające do procesu edycji istniejących stron oraz tworzenia nowych.

Edycja istniejącej strony

Aby edytować stronę:

  1. Jeśli znajdujesz się na stronie MDN Web Docs w wersji tylko do odczytu (, kliknij Edit in wiki w nagłówku artykułu. Przeniesiesz się do edytowalnej wersji wiki strony(, ale nie otworzy to jeszcze interfejsu edycji.
  2. Kliknij przycisk Edit w nagłówku artykułu wiki strony.
  3. Strona się odświeży wraz z interfejsem edycji gdzie możesz bezpośrednio dodawać i usuwać zawartość strony.
  4. Dodawaj paragrafy, usuwaj tekst, wstawiaj nagłówki i wykonuj więcej podstawowych operacji związanych z pisaniem i edytowaniem.

Zobacz przewodnik Editor UI elements w MDN Editor guide by uzyskać więcej informacji dotyczących wbudowanego edytora MDN.

Podgląd zmian

Aby zobaczyć zmiany:

  • Kliknij przycisk Podgląd wewnątrz funkcji edycji, na górze lub na dole strony.
  • Otworzy się podgląd strony pokazujący twoje poprawki, w nowym oknie lub karcie.
  • Za każdym razem, kiedy klikniesz ten przycisk, odświeżysz stronę podglądu wraz z ostanimi zmianami.

Uważaj! Podglądanie strony nie zachowa twojego postępu prac. Nie zamykaj karty edycji dopóki nie zapiszesz zmian.

Komentarz do wersji

After previewing your changes, you will want to save your revision. Before you save, look for the revision comment box, below the editing box, leaving a comment to inform other contributors why you made changes. For example, you might have added a new section, changed some words to make the terminology more consistent, rewritten a paragraph to clarify the language, or removed information because it was redundant.

Table of Contents

The 'On this Page' section of an article, is an auto-generated list of links to the headings on the page. The wording of these can be edited via the headings. It's also possible to remove a table of contents or decrease its number of links, by selecting 'Edit Page Title and Properties', changing the value of the "TOC" drop down.


You can add or remove tags, which describe the page content and purpose, below the editing section. See How to properly tag pages, for information on which tags to apply.

Review needed?

If an expert or experienced contributor should review your edits, please request a technical review (for code, API's, or technologies), and/or an editorial review (for prose, grammar, and content), making sure the appropriate box is checked before you save.

Attach files

Attaching files requires a special user privilege. See Attachments in the MDN editor for details, including how to request the upload privilege.

Publish, Discard, or Keep editing

When you finish editing and are happy with your preview, publish your work and comments by clicking the green Publish button, to the right of the page title, or towards the bottom of the page. If you wish to continue working, click Publish and keep editing, which publishes your changes and keeps the edit interface open.

If you change your mind, you can discard edits, by clicking the red Discard button. Note that discarding changes permanently discards them.

Pressing Enter in the Revision Comment field is equivalent to clicking Publish and Keep Editing.

Note: If attempting to save, but changes are rejected as invalid, and you feel the content is appropriate for MDN, email the MDN admin team for assistance.

Getting page-creation permissions

For security reasons, newly-created accounts don't have the ability to create new pages. If you try to do so, you'll see a page instructing you how to get the page created. There are two options:

  • Ask for the page to be created for you. To do this, file a documentation request issue, with the title "Create page: <page title>". Fill out the URL field of the template with the location on MDN where you'd like the page to go if you know where to place it. In the comment text, include information on why this page needs creating.
  • Request page creation privileges. If you request page creation privileges, and they're granted to you, you'll be able to add new pages by following the instructions here. To request these privileges, email the MDN admin team with your request. Include your username, why you would like to have the ability to create new pages. For instance, you're documenting a new API which involves many new pages, or you'd like to add new terms to the glossary. You should also have made useful contributions to this site's content, and been a contributor for some time. This length of time, and the other factors are collectively considered.

Creating a new page

Once you have page-creation permission, you can begin creating pages.

If you do not know where to place a new article, do not worry. Put it anywhere, we will find it, move to where it belongs, or merge it into existing content. Whatever makes the most sense. Do not worry about making it perfect. We have happy helper gnomes who help to make your content clean and rather luscious.

There are a few ways to create a new page:

As with most wikis, it is possible to create a link to a page that is yet to exist. For example, an author might create a list of all the members of an API, before creating the pages for those members. On MDN, links to non-existent pages are typically displayed in red.

To create a page from a 'missing page' link:

  1. Log into MDN, and have page-creation permission. If not logged in, clicking a 'missing page' link results in a 404 (page not found) error.
  2. Click the 'missing page' link. If you have page creation permission, the MDN Editor UI opens, ready for you to create the missing page.
  3. Write the content of the page, and save it.

To create a new page without linking from another page, enter a unique page name in the URL field of your browser. For example, if you enter:

MDN Creates a new page, with the title "FooBar", opening the editor for you to add new content. Refer to the Editing an existing page section of this article, for information on how to use the editor mode.

To create a new page without linking from another page:

  1. Log in, and have page-creation permission.
  2. Enter the following in the URL field of your browser:

MDN Creates a new page, with a place for a title, opening the editor to add new content to this page. Refer to Editing an existing page, for information on using editor mode.

Subpage of an existing page

To create a page you want to be below an existing page, in the page hierarchy:

  1. If needed, navigate to the wiki site by clicking Edit in wiki in the article header.
  2. On the 'parent' page, click the Advanced menu (the gear icon in the toolbar), then click New sub-page.
  3. An editor view opens for creating a new document.
  4. Add a title for this document, in the Title field.
  5. Change the Slug field, if needed. For example, if the title is long, and a shorter URL seems appropriate. This field is automatically filled by the editor, substituting underscores for spaces found in the title, changing only the last part of the URL.
  6. In the TOC field, select heading levels you want to be displayed in the table of contents for the page. Or select 'No table of contents', if one is not needed.
  7. Write content of the page in the editor pane, saving your changes. Refer to Editing an existing page, for further information on using editor mode.

Clone of an existing page

If there is an existing page, whose format you wish to use as a base for your new page, you can 'clone' that page, and then change its content.

  1. If needed, navigate to the wiki site by clicking Edit in wiki in the article header.
  2. On the original page, click the Advanced menu (the gear icon in the toolbar), and click Clone this page. An editor view opens, for creating a new document.
  3. Change the Title of the page, as appropriate for the new content. The Slug field is updated automatically as you change the Title field.
  4. Change the path portion of the Slug field, as needed, to put the new document in a different location in the document hierarchy. In most cases, this is not needed. A cloned page often has similar content to its original, and need to be in a similar location.
  5. In the TOC field, select the heading levels you want to be automatically displayed in the table of contents for this page. Or select 'No table of contents', if one is not needed.
  6. Write your content in the editor pane, saving your changes. Refer to Editing an existing page, for more information on using editor mode.

This is a bit of a hybrid. You can create a link on another page, then click the link you just inserted, to create the new page:

  1. Enter the name of your new page, anywhere that makes sense in the text of an existing page.
  2. Highlight this new name, and click the Link icon () in the editor's toolbar. The 'Update Link' dialog opens, with the highlighted text in the 'Link To' field.
  3. "/en-US/docs/" is inserted by default, to the beginning of the URL field. Enter the name of the page after "/en-US/docs/". The page name does not have to be the same as the link text.
  4. Click OK, to create and insert the link.

If the page does not yet exist, the link is displayed in red. If the page does exist, the link is displayed blue. If you want to create a new page, but the page title you desire is already taken, check if it makes sense helping edit and improve the page already there. Otherwise, think of a unique title for your new page, and create a link for it. Refer to page naming guide for guidelines.

To add content to your new page, click on the red link you just created, after saving and closing the editor. The new page opens in editor mode, enabling you to start writing. Refer to Editing an existing page, for further information on using editor mode.

Refreshing page content

MDN support of KumaScript macros, and integration of content from other pages can sometimes be hampered by the need for caching of pages, for performance reasons. Pages are built from their source, and this output is cached for future requests. From that moment on, any macros (templates), or integrations (using the macroPage), will not reflect later changes made to the macro, its output, or the contents of the integrated material.

  • To manually update a page, force-refresh your Web browser. MDN detects this, triggering a page rebuild, pulling in updated macro output, and integrating page content.
  • You can also configure pages to periodically rebuild, automatically. This should not be done unless you expect the page to update frequently. See Page regeneration, for detailed information.

See also