diff --git a/docs/pattern-template.mdx b/docs/pattern-template.mdx new file mode 100644 index 00000000000..486a3fb26a7 --- /dev/null +++ b/docs/pattern-template.mdx @@ -0,0 +1,55 @@ +--- +title: Pattern title +--- + + + +Include a short description of your pattern. This header should be longer than one line and no longer than four. + + + + + Overview + Behavior guidance + Assets + References + Metadata + + +### Overview + +**Define the use of your pattern with a problem statement.** Explain a user's needs and how the pattern meets those needs. Communicate anything a designer needs to know about the pattern. + +**Show a high-level image of the pattern in use.** The pattern should be presented in context and include a caption. + +### Behavior guidance + +**Include guidance on interactions and states.** Most patterns depend on interactions with components. Include guidance on motion, behavior, and states of the components. + +**Use visuals wherever possible.** Show a user's flow through your pattern with images of your product at each step of the way. + +### Assets + +**Include any resources and references.** Attach and document any page templates, design specifications, and design software assets. + +**Document how a user would navigate your pattern.** Provide documentation to make onboarding and use easier. + +**Create a functional prototype.** The best way to prove your pattern solves a problem is to let designers test it. A link to the actual implementation is best, and a demo is also valuable. + +### References + +**Explain any accessibility testing you conducted.** No individual component or pattern can be accessible, but they can be used in an accessible way to create an accessible experience. Include any research and proof you may have in your pattern documentation. + +**Include any citations.** Research, books, and articles you found helpful offer legitimacy to your pattern and help designers understand your decisions. + +**Offer any development notes you may have.** Many patterns don't require specific developer attention to implement. If you have any developer guidance, include it here. + +### Metadata  + +**Include a list of components used in the pattern.** Link to where where each component is documented. + +**Link to any related patterns.** This may not be the right pattern for a designer's problem, but other closely related patterns might be helpful. + +**Link to the maintainer's GitHub profile.** GitHub is the best way to ask questions and provide feedback about the pattern. + +**Communicate what happens next.** If there are any outstanding issues or gaps, include those here. Ask for help if you need it, and be transparent about the completeness of the pattern. diff --git a/gatsby-ssr.js b/gatsby-ssr.js index beb1acba065..0d845c1e6d8 100644 --- a/gatsby-ssr.js +++ b/gatsby-ssr.js @@ -1,10 +1,18 @@ /* eslint-disable import/prefer-default-export */ import React from 'react'; -export const onRenderBody = ({ setPostBodyComponents }) => +export const onRenderBody = ({ setPostBodyComponents, setHeadComponents }) => { + setHeadComponents([ + , + ]); setPostBodyComponents([