Banners and notices - The MDN project 编辑

Sometimes, an article needs a special notice added to it. This might happen if the page covers obsolete technology or other material that shouldn't be used in production code. This article covers the most common such cases and what to do.

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; 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 specify 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".

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:98 次

字数:5335

最后编辑:7年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文