This is an introductory guide to the Kuma wiki platform that powers MDN. "Kuma" is the Japanese word for "bear;" we chose this name because it's a bigger, more powerful creature than Kitsune, the software on which it's based that powers the SUMO web site.

    Note: Much of this needs to move into the MDN user guide content, and this isn't necessarily well organized.

    Development process


    We have several servers for MDN, based on the state of development of the platform.

    Environment URL Purpose
    Development Newest features and fixes are added immediately after they pass code review.
    Stage Beta features and fixes that will go on the next push to production.
    Production The live MDN server. You're looking at it.

    Tracking development

    You can see information about recent pushes of code updates to the production server on our Changelog page.

    Things that work differently


    The syntax for redirects has changed. You now type the word "REDIRECT" followed by a standard HTML link to the page to redirect to. Switch to source editing mode, then type something like:

    REDIRECT <a class="redirect" href="/destination/url/here">some title text here</a>

    The URL (href) must be a full path from the base of the site, like "/en-US/docs/foo". Relative URLs will not work. However, you can specify a section within the page using a hashmark ("#") character, such as "/destination/url/here#section_name".

    By default, you create links by specifying as the anchor (that is, the part after the hash or "#" symbol) the heading name of the section you want to link to. However, if you're concerned that this might break if headings are changed over time, there's a way to create permanent references for headings. Just add the name attribute to the heading element. Currently you need to do this in the source editor, but in the future we intend to have a user interface for this. Here's an example of what this might look like in the source:

    <h2 name="Doing_foo">All about foo</h2>

    Now how can link to this section, even if the title's text changes, using {{anch("Doing foo")}}, or by using "/en-US/path/to/article#Doing_foo" as the link destination.

    New features of Kuma

    Localization and Translation


    See Introduction to KumaScript

    Live samples

    You can create live samples in Kuma by adding special markup. For example:

    <section id="live-sample">
      <pre class="brush: html"><p class="shadow">text-shadow</p></pre>
      <pre class="brush: css">.shadow { text-shadow: 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em blue; }</pre>
      <pre class="brush: js">window.alert("Alert!")</pre>

    Note: You should wrap the code blocks in a non-fragment element - i.e., <section> instead of <ul>

    To display the sample live, use an iframe with src of http://page-url$samples/{section_id}. E.g.,$samples/live_samples.

    <p class="shadow">text-shadow</p>
    .shadow { text-shadow: 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em blue; }

    Note: See the documentation about this in the MDN editor guide for more information about how to use the built-in tools for more easily building live samples.

    Finding pages

    There are some special search queries you can use to find things:

    Search URL Description Searches for pages whose slug starts with the given term. Searches for pages whose slug contains the given term.


    You can see a list of all attached files.

    Automating and feeds

    Kuma offers an an API for retrieving information and (eventually) automatically updating content. See The Kuma API for details.

    Additionally, Kuma provides a number of RSS feeds that you can use to monitor the site. See Kuma RSS feeds.

    See also


    此页面的贡献者有: xcffl
    最后编辑者: xcffl,