Skip to content

Explain behavior for code blocks w/o language tag #642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/Documenting.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default class Button extends React.Component {

## Usage examples and Readme files

Styleguidist will look for any `Readme.md` or `ComponentName.md` files in the component’s folder and display them. Any code block with a language tag of `js`, `jsx` or `javascript` will be rendered as a React component with an interactive playground.
Styleguidist will look for any `Readme.md` or `ComponentName.md` files in the component’s folder and display them. Any code block with a language tag of `js`, `jsx` or `javascript` will be rendered as a React component with an interactive playground. For backwards compatibility, code blocks without a language tag are also rendered in this way. It is recommended to always use the proper language tag for new documentation.

React component example:

Expand Down Expand Up @@ -94,6 +94,8 @@ Styleguidist will look for any `Readme.md` or `ComponentName.md` files in the co

> **Note:** You can configure examples file name with the [getExampleFilename](Configuration.md#getexamplefilename) option.

> **Note:** If you need to display some JavaScript code in your documentation that you don't want rendered as an interactive playground you can use `static` in place of a language tag

## External examples using doclet tags

Additional example files can be associated with components using `@example` doclet syntax.
Expand Down