Skip to content

Commit

Permalink
chore: use markdown in frontmatter (#2009)
Browse files Browse the repository at this point in the history
  • Loading branch information
SethFalco authored May 17, 2024
1 parent 3bcdc37 commit 9fdbb4d
Show file tree
Hide file tree
Showing 25 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion docs/03-plugins/addAttributesToSVGElement.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ svgo:
pluginId: addAttributesToSVGElement
parameters:
attributes:
description: Attributes to add to the <code>&lt;svg&gt;</code> element. If key/value pairs are passed, the attributes and added with the paired value. If an array is passed, attributes are added with no key associated with them.
description: Attributes to add to the `<svg>` element. If key/value pairs are passed, the attributes and added with the paired value. If an array is passed, attributes are added with no key associated with them.
default: null
attribute:
---
Expand Down
4 changes: 2 additions & 2 deletions docs/03-plugins/addClassesToSVGElement.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ svgo:
pluginId: addClassesToSVGElement
parameters:
classNames:
description: Adds the specified class names to the outer most <code>&lt;svg&gt;</code> element.
description: Adds the specified class names to the outer most `<svg>` element.
default: null
className:
description: Adds the specified class name to the outer most <code>&lt;svg&gt;</code> element. If <code>classNames</code> is specified, this is ignored.
description: Adds the specified class name to the outer most `<svg>` element. If `classNames` is specified, this is ignored.
---

Overrides the `class` attribute in the outer most `<svg>` element, omitting duplicates or null classes if found in your configuration.
Expand Down
2 changes: 1 addition & 1 deletion docs/03-plugins/cleanupIds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ svgo:
description: Elements with an ID that starts with one of these prefixes will be ignored.
default: []
force:
description: This plugin normally does nothing if a <code>&lt;script&gt;</code> or <code>&lt;style&gt;</code> element is found. Setting this to true will bypass that behaviour, which may result in destructive changes.
description: This plugin normally does nothing if a `<script>` or `<style>` element is found. Setting this to true will bypass that behaviour, which may result in destructive changes.
default: false
defaultPlugin: true
---
Expand Down
4 changes: 2 additions & 2 deletions docs/03-plugins/cleanupListOfValues.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ svgo:
description: If to trim leading zeros.
default: true
defaultPx:
description: If to remove the units when it's <code>px</code>, as this is the default if not specified.
description: If to remove the units when it's `px`, as this is the default if not specified.
default: true
convertToPx:
description: If to convert absolute units like <code>cm</code> and <code>in</code> to <code>px</code>.
description: If to convert absolute units like `cm` and `in` to `px`.
default: true
---

Expand Down
4 changes: 2 additions & 2 deletions docs/03-plugins/cleanupNumericValues.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ svgo:
description: If to trim leading zeros.
default: true
defaultPx:
description: If to remove the units when it's <code>px</code>, as this is the default if not specified.
description: If to remove the units when it's `px`, as this is the default if not specified.
default: true
convertToPx:
description: If to convert absolute units like <code>cm</code> and <code>in</code> to <code>px</code>.
description: If to convert absolute units like `cm` and `in` to `px`.
default: true
---

Expand Down
4 changes: 2 additions & 2 deletions docs/03-plugins/convertColors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ svgo:
defaultPlugin: true
parameters:
currentColor:
description: If to convert all instances of a color to <code>currentcolor</code>. This means to inherit the active foreground color, for example in HTML5 this would be the <a href="https://developer.mozilla.org/docs/Web/CSS/color" target="_blank"><code>color</code></a> property in CSS.
description: If to convert all instances of a color to `currentcolor`. This means to inherit the active foreground color, for example in HTML5 this would be the [`color`](https://developer.mozilla.org/docs/Web/CSS/color) property in CSS.
default: false
names2hex:
description: If to convert color names to the hex equivalent.
Expand All @@ -14,7 +14,7 @@ svgo:
description: If to convert RGB colors to the hex equivalent, ignores RGBA.
default: true
convertCase:
description: Convert all color values to either upper or lower case by setting this to <code>'upper'</code> or <code>'lower'</code> respectively to improve compression. Set to <code>false</code> to disable this behavior.
description: Convert all color values to either upper or lower case by setting this to `'upper'` or `'lower'` respectively to improve compression. Set to `false` to disable this behavior.
default: 'lower'
shorthex:
description: If to convert 6 character hex colors to the 3 character equivalent where possible.
Expand Down
6 changes: 3 additions & 3 deletions docs/03-plugins/convertPathData.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ svgo:
description: If to apply transforms to paths with a stroke.
default: true
makeArcs:
description: If to convert from curves to arcs when possible. This is an object with two properties, <code>threshold</code> and <code>tolerance</code>.
description: If to convert from curves to arcs when possible. This is an object with two properties, `threshold` and `tolerance`.
straightCurves:
description: If to convert curve commands that are effectively straight lines to line commands.
default: true
Expand All @@ -22,7 +22,7 @@ svgo:
description: If to convert regular lines to an explicit horizontal or vertical line where possible.
default: true
convertToZ:
description: If to convert lines that go to the start to a <code>z</code> command.
description: If to convert lines that go to the start to a `z` command.
default: true
curveSmoothShorthands:
description: If to convert curves to smooth curves where possible.
Expand All @@ -34,7 +34,7 @@ svgo:
description: Number of decimal places to round to, using conventional rounding rules.
default: 5
smartArcRounding:
description: Round the radius of circular arcs when the effective change is under the error. The effective change is determined using the <a href="https://wikipedia.org/wiki/Sagitta_(geometry)" target="_blank">sagitta</a> of the arc.
description: Round the radius of circular arcs when the effective change is under the error. The effective change is determined using the [sagitta](https://wikipedia.org/wiki/Sagitta_(geometry)) of the arc.
default: true
removeUseless:
description: Remove redundant path commands that don't draw anything.
Expand Down
2 changes: 1 addition & 1 deletion docs/03-plugins/convertShapeToPath.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ svgo:
defaultPlugin: true
parameters:
convertArcs:
description: If to convert <code>&lt;circle&gt;</code> and <code>&lt;ellipse&gt;</code> elements to paths.
description: If to convert `<circle>` and `<ellipse>` elements to paths.
default: false
floatPrecision:
description: Number of decimal places to round to, using conventional rounding rules.
Expand Down
2 changes: 1 addition & 1 deletion docs/03-plugins/convertStyleToAttrs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ svgo:
pluginId: convertStyleToAttrs
parameters:
keepImportant:
description: If to always keep <a href="https://developer.mozilla.org/docs/Web/CSS/important" target="_blank"><code>!important</code></a> styles.
description: If to always keep [`!important`](https://developer.mozilla.org/docs/Web/CSS/important) styles.
type: boolean
default: false
---
Expand Down
12 changes: 6 additions & 6 deletions docs/03-plugins/convertTransform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ svgo:
description: Convert transforms to their shorthand alternatives.
default: true
degPrecision:
description: Number of decimal places to round degrees values to, using conventional rounding rules. Used for <code>rotate</code> and <code>skew</code>.
description: Number of decimal places to round degrees values to, using conventional rounding rules. Used for `rotate` and `skew`.
floatPrecision:
description: Number of decimal places to round to, using conventional rounding rules.
default: 3
transformPrecision:
description: Number of decimal places to round to, using conventional rounding rules.
default: 5
matrixToTransform:
description: If decompose matrices into simple transforms. See <a href="https://frederic-wang.fr/decomposition-of-2d-transform-matrices.html" target="_blank">Decomposition of 2D-transform matrices</a> for more context.
description: If decompose matrices into simple transforms. See [Decomposition of 2D-transform matrices](https://frederic-wang.fr/decomposition-of-2d-transform-matrices.html) for more context.
default: true
shortTranslate:
description: If to shorten references to <code>translate</code> with redundant parameters to omit them. i.e. <code>translate(10 0)</code><code>translate(10)</code>
description: If to shorten references to `translate` with redundant parameters to omit them. i.e. `translate(10 0)``translate(10)`
default: true
shortScale:
description: If to shorten references to <code>scale</code> with redundant parameters to omit them. i.e. <code>scale(2 2)</code><code>scale(2)</code>
description: If to shorten references to `scale` with redundant parameters to omit them. i.e. `scale(2 2)``scale(2)`
default: true
shortRotate:
description: If to shorten references to <code>rotate</code> with redundant parameters to omit them. i.e. <code>translate(cx cy) rotate(a) translate(-cx -cy)</code><code>rotate(a cx cy)</code>
description: If to shorten references to `rotate` with redundant parameters to omit them. i.e. `translate(cx cy) rotate(a) translate(-cx -cy)``rotate(a cx cy)`
default: true
removeUseless:
description: If to remove redundant transforms like <code>translate(0)</code>, <code>skewX(0)</code>, or <code>skewY(0)</code>.
description: If to remove redundant transforms like `translate(0)`, `skewX(0)`, or `skewY(0)`.
default: true
collapseIntoOne:
description: If to multiply transforms into one.
Expand Down
2 changes: 1 addition & 1 deletion docs/03-plugins/inlineStyles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ svgo:
description: If to remove the selector and styles from the stylesheet while inlining the styles. This does not remove selectors that did not match any elements.
default: true
useMqs:
description: An array of media query conditions to use, such as <code>screen</code>. An empty string signifies all selectors outside of a media query.
description: An array of media query conditions to use, such as `screen`. An empty string signifies all selectors outside of a media query.
usePseudos:
description: What pseudo-classes and pseudo-elements to use. An empty string signifies all non-pseudo-classes and non-pseudo-elements.
---
Expand Down
2 changes: 1 addition & 1 deletion docs/03-plugins/mergePaths.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ svgo:
description: Number of decimal places to round to, using conventional rounding rules.
default: 3
noSpaceAfterFlags:
description: If to omit spaces after flags. Flags are values that can only be <code>0</code> or <code>1</code> and are used by some path commands, namely <a href="https://developer.mozilla.org/docs/Web/SVG/Attribute/d#elliptical_arc_curve" target="_blank"><code>A</code> and <code>a</code></a>.
description: If to omit spaces after flags. Flags are values that can only be `0` or `1` and are used by some path commands, namely [`A` and `a`](https://developer.mozilla.org/docs/Web/SVG/Attribute/d#elliptical_arc_curve).
default: false
---

Expand Down
2 changes: 1 addition & 1 deletion docs/03-plugins/minifyStyles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ svgo:
defaultPlugin: true
parameters:
usage:
description: If to collect usage data such as tags, classes, and IDs to pass to CSSO. This is an object with four properties, which are each configured with a boolean, <code>tags</code>, <code>ids</code>, <code>classes</code>, and <code>force</code>. By default, if a script is found this does not pass usage data to CSSO, but this can be overridden with <code>force</code>, which may yield destructive changes.
description: If to collect usage data such as tags, classes, and IDs to pass to CSSO. This is an object with four properties, which are each configured with a boolean, `tags`, `ids`, `classes`, and `force`. By default, if a script is found this does not pass usage data to CSSO, but this can be overridden with `force`, which may yield destructive changes.
default: true
---

Expand Down
4 changes: 2 additions & 2 deletions docs/03-plugins/prefixIds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ svgo:
prefix:
description: Either a string or a function that resolves to a string.
prefixIds:
description: If to prefix <code>id</code> attributes.
description: If to prefix `id` attributes.
default: true
prefixClassNames:
description: If to prefix classes in the <code>class</code> attribute.
description: If to prefix classes in the `class` attribute.
default: true
---

Expand Down
2 changes: 1 addition & 1 deletion docs/03-plugins/removeAttributesBySelector.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ svgo:
pluginId: removeAttributesBySelector
parameters:
selectors:
description: An array of objects with two properties, <code>selector</code>, and <code>attributes</code>, which represent a CSS selector and the attributes to remove respectively.
description: An array of objects with two properties, `selector`, and `attributes`, which represent a CSS selector and the attributes to remove respectively.
default: null
---

Expand Down
4 changes: 2 additions & 2 deletions docs/03-plugins/removeAttrs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ svgo:
description: A selector that matches attributes.
default: null
elemSeparator:
description: The pattern syntax used by this plugin is <code>element:attribute:value</code>, this changes the delimiter from <code>:</code> to another string.
description: The pattern syntax used by this plugin is `element:attribute:value`, this changes the delimiter from `:` to another string.
default: ':'
preserveCurrentColor:
description: If to ignore the attribute when it's set to <code>currentcolor</code>.
description: If to ignore the attribute when it's set to `currentcolor`.
default: false
---

Expand Down
2 changes: 1 addition & 1 deletion docs/03-plugins/removeComments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ svgo:
defaultPlugin: true
parameters:
preservePatterns:
description: An array of regular expressions (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp" target="_blank">RegExp</a> or string). If the comment matches any of these, including partial matches, the comment is preserved. Set to <code>false</code> to disable this behavior and remove comments indiscriminately.
description: An array of regular expressions ([RegExp](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RegExp) or string). If the comment matches any of these, including partial matches, the comment is preserved. Set to `false` to disable this behavior and remove comments indiscriminately.
default:
- '^!'
---
Expand Down
2 changes: 1 addition & 1 deletion docs/03-plugins/removeDesc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ svgo:
defaultPlugin: true
parameters:
removeAny:
description: By default, this plugin only removes descriptions that are either empty or contain editor attribution. Enabling this removes the <code>&lt;desc&gt;</code> element indiscriminately.
description: By default, this plugin only removes descriptions that are either empty or contain editor attribution. Enabling this removes the `<desc>` element indiscriminately.
type: boolean
default: false
---
Expand Down
2 changes: 1 addition & 1 deletion docs/03-plugins/removeElementsByAttr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ svgo:
description: Remove elements where one of these IDs will be match the element ID.
default: []
class:
description: Remove elements where the <code>class</code> attribute includes at least one of these classes.
description: Remove elements where the `class` attribute includes at least one of these classes.
default: []
---

Expand Down
6 changes: 3 additions & 3 deletions docs/03-plugins/removeEmptyText.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ svgo:
defaultPlugin: true
parameters:
text:
description: If to remove empty <a href="https://developer.mozilla.org/docs/Web/SVG/Element/text" target="_blank"><code>&lt;text&gt;</code></a> elements.
description: If to remove empty [`<text>`](https://developer.mozilla.org/docs/Web/SVG/Element/text) elements.
default: true
tspan:
description: If to remove empty <a href="https://developer.mozilla.org/docs/Web/SVG/Element/tspan" target="_blank"><code>&lt;tspan&gt;</code></a> elements.
description: If to remove empty [`<tspan>`](https://developer.mozilla.org/docs/Web/SVG/Element/tspan) elements.
default: true
tref:
description: If to remove empty <a href="https://developer.mozilla.org/docs/Web/SVG/Element/tref" target="_blank"><code>&lt;tref&gt;</code></a> elements.
description: If to remove empty [`<tref>`](https://developer.mozilla.org/docs/Web/SVG/Element/tref) elements.
default: true
---

Expand Down
Loading

0 comments on commit 9fdbb4d

Please sign in to comment.