Documentation Style Guide

This guide will provide an overview of different design elements that are available for your use in creating documentation.

Alerts

VuePress provides a custom container plugin to create alert boxes. There are four types:

  • Info: Provide information that is neutral
  • Tip: Provide information that is positive and encouraged
  • Warning: Provide information that users should be aware of as there is a low to moderate
  • Danger: Provide information that is negative and has a high risk to the user

Markdown Examples

  1. ::: info
  2. You can find more information at this site.
  3. :::
  4. ::: tip
  5. This is a great tip to remember!
  6. :::
  7. ::: warning
  8. This is something to be cautious of.
  9. :::
  10. ::: danger DANGER
  11. This is something we do not recommend. Use at your own risk.
  12. :::

Rendered Markdown

INFO

You can find more information at this site.

TIP

This is a great tip to remember!

WARNING

This is something to be cautious of.

DANGER

This is something we do not recommend. Use at your own risk.

Code Blocks

VuePress uses Prism to provide language syntax highlighting by appending the language to the beginning backticks of a code block:

Markdown Example

  1. ```js
  2. export default {
  3. name: 'MyComponent'
  4. }
  5. ```

Rendered Output

  1. export default {
  2. name: 'MyComponent'
  3. }

Line Highlighting

To add line highlighting to your code blocks, you need to append the line number in curly braces.

Single Line

Markdown Example

  1. ```js{2}
  2. export default {
  3. name: 'MyComponent',
  4. props: {
  5. type: String,
  6. item: Object
  7. }
  8. }
  9. ```

Rendered Markdown

  1. export default {
  2. name: 'MyComponent',
  3. props: {
  4. type: String,
  5. item: Object
  6. }
  7. }

Group of Lines

  1. ```js{4-7}
  2. export default {
  3. name: 'MyComponent',
  4. props: {
  5. type: String,
  6. item: Object
  7. }
  8. }
  9. ```
  1. export default {
  2. name: 'MyComponent',
  3. props: {
  4. type: String,
  5. item: Object
  6. }
  7. }

Multiple Sections

  1. ```js{2,4-5}
  2. export default {
  3. name: 'MyComponent',
  4. props: {
  5. type: String,
  6. item: Object
  7. }
  8. }
  9. ```
  1. export default {
  2. name: 'MyComponent',
  3. props: {
  4. type: String,
  5. item: Object
  6. }
  7. }