Skip to content

titpetric/vuego

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vuego

Go Reference Coverage

Vuego is a Vue.js-inspired template engine for Go. Render HTML templates with familiar Vue syntax - no JavaScript runtime required.

The engine uses golang.org/x/net/html for HTML parsing and rendering.

Features

Vuego supports the following template features:

  • Variable interpolation - {{ variable }} with nested property access
  • Template functions - Pipe-based filter chaining {{ value | upper | trim }}
  • Custom functions - Define custom template functions (FuncMap)
  • Built-in filters - String manipulation, formatting, type conversion
  • Attribute binding - :attr="value" or v-bind:attr="value"
  • Conditional rendering - v-if for showing/hiding elements with function support
  • List rendering - v-for to iterate over arrays with optional index
  • Raw HTML - v-html for unescaped HTML content
  • Component composition - <vuego include> for reusable components
  • Required props - :required attribute for component validation
  • Template wrapping - <template> tag for component boundaries
  • Full documents - Support for complete HTML documents or fragments
  • Automatic escaping - Built-in XSS protection for interpolated values

Playground

Try VueGo in your browser! The interactive playground lets you experiment with templates and see results instantly.

You can run the playground locally, and if you pass a folder as the first parameter, you have a workspace.

# go run github.com/titpetric/vuego/cmd/vuego-playground
2025/11/14 20:07:31 VueGo Playground starting on http://localhost:3000

Documentation

The Template Syntax reference covers four main areas:

  • Values - Variable interpolation, expressions, and filters
  • Directives - Complete reference of all v- directives
  • Components - <vuego> and <template> tags
  • Advanced - Template functions, custom filters, and full documents

Additional resources:

License

MIT

About

VueJS templating

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published