Socket
Socket
Sign inDemoInstall

docpad-plugin-vash

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docpad-plugin-vash

DocPad plugin that renders vash (Razor syntax) templates


Version published
Weekly downloads
2
decreased by-71.43%
Maintainers
1
Weekly downloads
 
Created
Source

docpad-plugin-vash

Vash to anything plugin for DocPad

Vash, aka "the Sixty Billion Double Dollar Template Compiler", is an implementation of the [Razor syntax] (http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx) view engine for JavaScript.

This plugin for DocPad allows you to use the Razor syntax to write your DocPad layouts.

Use the .vash suffix for your Vash templates.

Example:

default.html.vash
<html>
<head>
    <title>@getPreparedTitle()</title>
    @html.raw(getBlock("meta").toHTML())
    @html.raw(getBlock("styles").toHTML())
</head>
<body>
    <h1>@document.title</h1>
    @html.raw(content)
    @html.raw(getBlock("scripts").toHTML())
</body>
</html>

This plugin configures Vash to use its useWith mode, meaning that the members of the template data are available to the razor view as the default object. Properites such as document and content, as well as methods suchas getFiles are directly available in the template.

Keywords

FAQs

Package last updated on 20 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc