バナーと通知

この翻訳は不完全です。英語から この記事を翻訳 してください。

場合によっては、記事に特別な通知が必要になることがあります。これは、プロダクションコードで使用すべきではない古い技術やその他の資料がページに含まれている場合に発生する可能性があります。この記事では最も一般的なケースについて説明します。

How to add notice boxes

In most cases, you apply these notices by adding a macro call to inject an appropriate banner into the page content, and by adding a tag to the page's list of tags. Also, if the page includes a compatibility table (most API reference pages do, for example), you should update that table to reflect any compatibility changes.

To do this, you open the editor, then insert the macro call at the top of the article, and change the browser compatibility table (if any); the table should be near the end of the article. Once that's done, scroll to the bottom of the article to find the tag list, and add the new tag to the list. Once you've done that, click the Save Changes button near the top of the window to commit your updates. From then on, an appropriate banner will appear on the page, and any macros that reference page tags when looking for up-to-date articles will know that the page you've updated is obsolete.

Sometimes, you might want to flag just a single item in a list of items, or in a table, as obsolete, deprecated, or the like. There are special versions of each of the following macros for that; simply change "_header" to "_inline" to the end of the macro's name.

Obsolete content

If you come across an article whose content is obsolete -- meaning that everything on that page is out of date and shouldn't be used -- you can mark the page as such by adding the obsolete_header macro at the top of the article. Just open the page's editor and insert this at the top of the article:

{{obsolete_header}}

You should also add the tag "Obsolete" to the tag list at the bottom of the page.

Note: If the article covers a Mozilla-specific technology, you can add the Gecko version in which the technology was removed from Gecko as a parameter to the obsolete_header macro, like this:

{{obsolete_header(21)}}

This will make the banner specificy that the technology became obsolete in Gecko 21, with a link to the article Firefox 21 for developers.

Eventually, once something is very, very obsolete (that is, it's so obsolete that reading the material might actually cause serious problems), we can move content into our Archive section. If you see material that you think should be archived, contact an MDN administrator.

Deprecated content

Deprecated content is content that covers a technology or idea that is in the process of becoming obsolete. It's no longer recommended, and is expected to be removed from browsers in the relatively near future. You can mark pages as deprecated using the deprecated_header macro. Just like with obsolete content, you can specify the Gecko version in which the technology was deprecated as a parameter, if the technology is Gecko-specific.

You should also add the tag "Deprecated" to the page.

Non-standard content

Non-standard content is any content not yet part of a Web standard; this includes any technology that isn't even proposed as a draft specification, even if it's implemented by multiple browsers. You should use the non-standard_header macro on these pages, and tag the pages with "Non-standard".

ドキュメントのタグと貢献者

このページの貢献者: mdnwebdocs-bot, silverskyvicto
最終更新者: mdnwebdocs-bot,