Vuepress Enhanced Examples screenshot

Vuepress Enhanced Examples

Author Avatar Theme by Chrisvfritz
Updated: 9 Jun 2018
57 Stars

This is an attempt at providing a better experience for documentation authors and consumers, in regards to examples.

Categories

Overview

VuePress Enhanced Examples provide a significant improvement for both documentation authors and users interacting with examples. By structuring all examples in .vue files located within the .vuepress/examples directory, it allows for seamless integration and rendering of various components. The flexibility to customize how examples are displayed, as well as the emergence of features designed for both consumers and authors, makes this tool an exciting addition to any documentation workflow.

This enhanced system focuses on delivering a user-friendly experience by allowing users to toggle between different coding styles and view results in dynamically generated environments. With embedded CodePen generation and advanced rendering options, it caters to the needs of both novice and experienced developers alike.

Features

  • JS Experience Scaling: Users can easily switch from ES5 to modern JS via a toggle in the code block, catering to developers with differing levels of expertise.
  • HTML Experience Scaling: Similar to JS, HTML examples default to using v-bind: and v-on: but can be toggled to their shorthand notations for ease of use.
  • Selective Sandboxing: Each example runs in an individual iframe, ensuring that they operate independently without any code interference, while still allowing for interactive experimentation in the console.
  • Automatic CodePen Generation: CodePens for examples are automatically created based on the user’s selected styling, streamlining the sharing and demonstration of code snippets.
  • Syntax Highlighting and Linting: All examples benefit from enhanced readability via automatic syntax highlighting and linting support, improving code quality for authors.
  • Custom Render Formatting: Examples can be authored in one format and displayed differently, allowing for flexibility in presentation while maintaining readability.
  • Automatic Result Rendering: Results are generated without the hassle of manually assigning IDs, simplifying the process of creating and displaying examples during documentation.
  • Build-Time Processing: Advanced JS features can be used, as examples are compiled to a usable ES5 alternative during the build process, making this tool both cutting-edge and user-friendly.