The page-type front matter key
The page-type
front matter key describes the type of an MDN page.
This allows MDN content tools to better automate content checking and sidebar organization.
Like any other front matter key, the page-type
key is specified in the YAML at the start of "index.md":
---
title: Geolocation.getCurrentPosition()
slug: Web/API/Geolocation/getCurrentPosition
page-type: web-api-instance-method
browser-compat: api.Geolocation.getCurrentPosition
---
Each main area of the site — JavaScript, CSS, and so on — has a set of domain-specific page-type
values, and there is also a set of generic values that can appear in any area of the site.
This project is a work in progress: so far we have only defined page-type
values for CSS, JavaScript, and Web API.
Generic page types
These page types are not specific to a particular MDN technology area:
guide
: a generic guide page with no specific structure. See Conceptual page.landing-page
: a page that acts primarily as a navigation aid, listing links to other pages. See Landing page.
Domain-specific page types
This section lists page types that are specific to a single area of MDN.
CSS page types
This section lists page-type
values for pages under Web/CSS. Every page in that part of the tree must have a page-type
, and its value must be one of those listed below or one of the generic page type values.
css-at-rule
: an at-rule, like@charset
.css-at-rule-descriptor
: an at-rule descriptor, like@counter-style/prefix
.css-combinator
: a combinator, like the descendant combinator.css-function
: a function, likemax()
.css-keyword
: a keyword, likeinherit
.css-media-feature
: a media feature, likehover
.css-module
: a module, like CSS Animations.css-property
: a property, likebackground-color
.css-pseudo-class
: a pseudo-class, like:enabled
.css-pseudo-element
: a pseudo-element, like::before
.css-selector
: a basic selector, like the class selector.css-shorthand-property
: a shorthand property, likebackground
.css-type
: a data type, like<color>
.
Glossary page types
This section lists page-type
values for pages under Glossary. Every page in that part of the tree must have a page-type
, and its value must be one of those listed below.
glossary-definition
: a page defining a term, like Bézier curve.glossary-disambiguation
: a page providing links to two or more definition pages for an ambiguous term, like Node.
HTML page types
This section lists page-type
values for pages under Web/HTML. Every page in that part of the tree must have a page-type
, and its value must be one of those listed below or one of the generic page type values.
html-attribute
: an HTML attribute, likeautocomplete
.html-attribute-value
: a single value for an HTML attribute, likedns-prefetch
.html-element
: an HTML element, like<button>
.
JavaScript page types
This section lists page-type
values for pages under Web/JavaScript. Every page in that part of the tree must have a page-type
, and its value must be one of those listed below or one of the generic page type values.
javascript-class
: a definition of a built-in object, likeArray
.javascript-constructor
: an object constructor, likeArray()
.javascript-error
: an error, like RangeError: invalid array length.javascript-function
: a built-in function that isn't an object method, likeencodeURI()
.javascript-global-property
: a global property likeNaN
.javascript-instance-accessor-property
: an accessor property on an object instance, likeMap.prototype.size
.javascript-instance-data-property
: a data property on an object instance, like thelength
property ofArray
.javascript-instance-method
: a method on an object instance, likeArray.prototype.at()
.javascript-language-feature
: a part of JavaScript syntax not fitting into another category, like rest parameters.javascript-namespace
: an object that is not instantiable and has only static members, likeMath
.javascript-operator
: an operator, like Addition (+).javascript-statement
: a statement, likeswitch
.javascript-static-accessor-property
: a static accessor property, likeRegExp.lastMatch
.javascript-static-data-property
: a static data property, likeMath.E
.javascript-static-method
: a static method, likeArray.from()
.
SVG page types
This section lists page-type
values for pages under Web/SVG. Every page in that part of the tree must have a page-type
, and its value must be one of those listed below or one of the generic page type values.
svg-attribute
: an SVG attribute, likecrossorigin
.svg-element
: an SVG element, like<circle>
.
Web API page types
This section lists page-type
values for pages under Web/API. Every page in that part of the tree must have a page-type
, and its value must be one of those listed below or one of the generic page type values.
web-api-overview
: gives an overview of a Web API, like the Fetch API.web-api-global-function
: a global function, likefetch()
.web-api-global-property
: a global property, likeorigin
.web-api-interface
: a Web API interface, likeRequest
.web-api-constructor
: a constructor, likeRequest()
.web-api-instance-method
: an instance method, likecache.add()
.web-api-instance-property
: an instance property, likerequest.headers
.web-api-static-method
: a static method, likeResponse.error()
.web-api-static-property
: a static property, likeNotification.permission
.web-api-event
: an event, likeNotification.click
. See API reference subpage.webgl-extension
: a WebGL extension, likeWEBGL_draw_buffers
.webgl-extension-method
: a WebGL extension method, likeOES_vertex_array_object.bindVertexArrayOES()
.
WebExtensions page types
This section lists page-type
values for pages under Mozilla/Add-ons/WebExtensions. Every page in that part of the tree must have a page-type
, and its value must be one of those listed below or one of the generic page type values.
webextension-api
: a WebExtension API, likealarms
.webextension-api-event
: a WebExtension API event, likeaction.onClicked
.webextension-api-function
: a WebExtension function, likeaction.setBadgeText()
.webextension-api-property
: a WebExtension property, likebrowserSettings.openBookmarksInNewTabs
.webextension-api-type
: a WebExtension type, likecontextualIdentities.ContextualIdentity
.webextension-manifest-key
: a WebExtension manifest key, likeuser_scripts
.