Skip to content

What is it?

v0.1.7

vitepress-templ-preview offers a solution for templ component previews within VitePress projects.

📦 What’s Inside?

  • viteTemplPreviewPlugin: A Vite plugin designed to handle templ components in your markdown files. This plugin processes custom tag and renders a Vue component.
  • Vue components: Predefined Vue components tailored to display both the highlighted source code and the rendered preview of the templ component.

✨ Features

  • Templ Syntax Highlighting: syntax highlighting for templ using shiki.
  • Automatic Generation: Runs templ generate command via static-templ, eliminating the need to run this command manually.
  • Hot Reloading: Automatically triggers the templ generate command and refresh the page to display the new content.
  • File Content Caching: Efficiently caches file contents to improve performance and reduce redundant file reads when in dev mode.
  • Flexible Vue Components: Includes predefined Vue components for rendering previews, with the option to use custom components.

Released under the MIT License.