Custom tags

The way we render Markdown on our websites is through the use of MDX. This allows us to extend Markdown with our own tags. These tags are custom React components.

Such custom components allow us to put things in Markdown content that would typically require a lot more complexity.

Below is a list of custom tags that we support in our Markdown-based documentation, both for freesewing.dev as freesewing.org.

Summary and Availability

This is a summary of the available custom tags and where each tag can be used.

  • sde tags can be used in the standalone development environment (provided by the new-design package).
  • dev and org tags can be used on the freesewing.dev and freesewing.org sites, respectively.
  • For convenience, tags with similar functionality have been grouped together.

Text popouts

These are markdown tags used to display text in a colored popout box, to make the text stand out and to quickly convey what type of information is being presented.

Tagsdedevorg
CommentXXX
FixmeXXX
LinkXXX
NoteXXX
RelatedXXX
TipXXX
TldrXXX
WarningXXX

Features and Formatting

These tags provide special features or ways to format content.

Tagsdedevorg
ControlTipXX
DocsTitleXX
DocsLinkXX
ExampleXX
LegendX*
MeasieImageX*
(Mermaid)XX
MethodX
StatusCodeX
TabXX
TabsXX
YoutubeXX
NOTE

Documentation Generators

These tags generate documentation-related content related to designs and documentation files. This prevents the need to write and edit the documentation manually, making it easier to write and to maintain when changes occur.

Tagsdedevorg
DesignInfoX*
DesignMeasurementsX*
DesignOptionsX*
ReadMoreXXX
NOTE
  • DesignInfo is available to use only on an individual design’s main documentation page, for example Aaron A-Shirt.

  • DesignMeasurements is available to use only on an individual design’s Required Measurements documentation page, for example Aaron A-Shirt: Required Measurements.

  • DesignMeasurements is available to use only on an individual design Design Options documentation page, for example Aaron A-Shirt: Design Options.


Details

All custom tags are listed alphabetically below.

Comment

Use a Comment when you want to illustrate something that is a personal opinion or advice rather than the sort more neutral voice used throughout our documentation.

AttributeRequired?DefaultDescription
byyesName of the commenter
hideablefalseAllows popout to be hidden
COMMENT by joost
MDX is essentially Markdown + (React) components
joost
COMMENT by Ben F.

It can be helpful to be able to hide long comments that might take up too much space on the page (hideable)

Ben F.

ControlTip

The ControlTip tag provides a popout box containing pre-written, formatted text describing the User Experience account setting and explaining what it does.

NOTE
User Experience

The User Experience setting of your FreeSewing account will impact how you experience the FreeSewing website.

By default, some of the more advanced features of this site are hidden to make it more easy for new users to find their way.
If you want to sacrifice some of that simplicity to gain more power, you can update your User Experience setting accordingly.

DesignInfo

DesignInfo generates a detailed web page for a given FreeSewing design with information including line drawings, example photos, required measurements, design options, and links to documentation.

AttributeRequired?DefaultDescription
designyesName of the design
docsfalseGenerates content suitable for a documentation page

(Please see the Aaron A-Shirt documentation page for an example of this tag.)

NOTE

Because design documentation pages are the only place this tag can be used, you should always include the docs attribute when using this tag. (Omitting it will generate different content, less suited for documentation.)

DesignMeasurements

DesignMeasurements generates a list of required and optional measurements for a given FreeSewing design.

AttributeRequired?DefaultDescription
designyesName of the design

(Please see Aaron A-Shirt: Requirement Measurements for an example of this tag.)

DesignOptions

DesignOptions generates a list of design options and settings for a given FreeSewing design.

AttributeRequired?DefaultDescription
designyesName of the design

(Please see Aaron A-Shirt: Design Options for an example of this tag.)

The DocsLink tag creates a formatted link from a given slug (a relative URL path). It also looks up the title of the linked web page and uses it as the link text.

AttributeRequired?DefaultDescription
slugyesRelative path for the link

DocsTitle

The DocsTitle tag looks up the title of a web page from a given slug (a relative URL path) and provides the title as formatted text.

AttributeRequired?DefaultDescription
slugyesRelative path of the link
classNameCSS classes to style the text
formatdefaultFormaterFormatter used to format the text
Markdown guide

Example

The Example tag allows you to embed a FreeSewing code example and have it rendered in the browser. Specifically, you should write a draft method which will then be rendered.

AttributeRequired?DefaultDescription
captionThe caption to go under the example
tutorialfalseSet this to show the Code tab first, rather than the default Preview tab. Also, additional options are made available for use in pattern examples
previewFirstfalseSet this to always show the Preview tab first, regardless of the value of tutorial
withHeadfalseSet this to include a head measurement (for tutorial pattern examples)
paperlessfalseSet this to enable paperless mode
settingsA YAML string of settings to take into account
Path.curve()

Fixme

Use Fixme to indicate something needs attention/work but you don’t have time or can’t fix it now.

AttributeRequired?DefaultDescription
compactfalseRenders compact variant
hideablefalseAllows popout to be hidden
FIXME
ToDo
  • Include link to roadmap
  • Fix style for text outside paragraphs
FIXME|

Proofread documentation (compact)

FIXME

Proofread it a second time (hideable)

Legend

The Legend tag is used to display parts from a pattern of the Legend design (a non-public design in the FreeSewing repository created to provide examples of pattern features).

AttributeRequired?DefaultDescription
partyesThe Legend part to display

(Please see On the fold for an example of this tag, used to display the cut-on-fold indicator on that page.)

Use Link for URLs.

AttributeRequired?DefaultDescription
compactfalseRenders compact variant
hideablefalseAllows popout to be hidden

MeasieImage

MeasieImage will show images of a FreeSewing measurement. The name of the directory in which the tag is used is the measurement which will be shown.

(Please see Biceps circumference for an example of this tag, used to display the image showing the biceps circumference measurement.

(Mermaid)

There is no actual “Mermaid” custom tag. However, by using a fenced code block and specifying the mermaid language, you can generate Mermaid diagrams. Like this:

graph LR; A--> B & C & D; B--> A & E; C--> A & E; D--> A & E; E--> B & C & D;

Method

Method is used to format HTTP methods.

AttributeRequired?DefaultDescription
getfalseDisplay the HTTP GET method
postfalseDisplay the HTTP POST method
putfalseDisplay the HTTP PUT method
deletefalseDisplay the HTTP DELETE method
GET

POST
NOTE
  • It is required that you provide one of the get, post, put, or delete attributes when using Method.
  • If more than one of those attributes is provided, only the first one that gets processed will be used.

Note

Use Note to add something that stands out to draw attention.

AttributeRequired?DefaultDescription
compactfalseRenders compact variant
hideablefalseAllows popout to be hidden
NOTE
Also available in black

This style also comes in black, which we can all agree is the superior color

NOTE|

And in pink (compact)

NOTE
Yet another note (hideable)

ReadMore

The ReadMore tag allows you to insert a list of child-pages. The list is automatically generated from the pages in the subdirectories of the documentation page’s directory. This tag is typically used on overview pages, such as our Markdown guide page.

AttributeRequired?DefaultDescription
asMenufalseStart from the parent directory
depth99Maximum levels to recurse
recursefalseInclude all child-pages and sub-child-pages in the entire directory tree
rootfalseStart from the root directory

Use Related to add something that is relevant to the current topic.

AttributeRequired?DefaultDescription
compactfalseRenders compact variant
hideablefalseAllows popout to be hidden
RELATED

This snippet is provided by the annotations plugin

RELATED|

See snippets (compact)

RELATED

See snippets (hideable)

StatusCode

StatusCode is used to format HTTP response status codes.

AttributeRequired?DefaultDescription
statusyesThe HTTP response status code to format
200

401

Tab

Tabs and Tab tags are used to present content in a tabbed view. This is a view where only the active tab content is shown, with content in other tabs hidden. Selecting a different tab shows its contents while hiding the others.

The Tab tag is used to add content for a tab.

Content for tab one.

NOTE
  • The content of Tabs is individual Tab tags.
  • The content of Tab is content for that tab.
  • There should be one Tab for every tab defined in the tabs attribute of Tabs.

Tabs

Tabs and Tab tags are used to present content in a tabbed view. This is a view where only the active tab content is shown, with content in other tabs hidden. Selecting a different tab shows its contents while hiding the others.

The Tabs tag is used to set up the tabbed view. It specifies how many tabs are in the view and what their names are.

AttributeRequired?DefaultDescription
tabsyesComma-separated list of tab names

Content for tab one.

NOTE
  • The content of Tabs is individual Tab tags.
  • The content of Tab is content for that tab.
  • There should be one Tab for every tab defined in the tabs attribute of Tabs.

Tip

Use Tip for, you know, tips.

AttributeRequired?DefaultDescription
compactfalseRenders compact variant
hideablefalseAllows popout to be hidden
TIP

The notches on the shoulder and sleeve parts are used to help with alignment when attaching the sleeve.

TIP|

Align the notches so they match (compact)

TIP

Yet another tip (hideable)

Tldr

”TL;DR” stands for “Too long; didn’t read”, and the Tldr tag used to provide a short summary for readers who might not want to read the full text.

AttributeRequired?DefaultDescription
compactfalseRenders compact variant
hideablefalseAllows popout to be hidden
TL;DR

This page lists all the custom tags you can use.

TLDR|

This page lists custom tags (compact)

TL;DR

Yet another TL;DR summary (hideable)

Warning

Use Warning when you want to warn the reader of potential danger or unintended side-effects.

AttributeRequired?DefaultDescription
compactfalseRenders compact variant
hideablefalseAllows popout to be hidden
WARNING
Please make a backup

Following these instructions will remove all your data

WARNING|

Take it slow (compact)

WARNING

Yet another warning (hideable)

YouTube

The YouTube tag will embed YouTube videos or YouTube playlists responsively.

AttributeRequired?DefaultDescription
idyesID of the YouTube video or playlist
playlistfalseSet this when embedding a playlist