Kinetq.LiquidPages.Extension
The Visual Studio Extension can be found here.
Features
🎨 Syntax Highlighting
The extension provides syntax highlighting for Liquid template files (.liquid) in Visual Studio. The syntax highlighting uses HTML as the base document type, ensuring you get proper highlighting for both HTML and Liquid syntax within your templates.
✨ Built-in Formatter
The extension includes a standalone Liquid template formatter powered by Prettier and the Shopify Liquid plugin. The formatter is bundled as a single executable (formatter.exe) built using Node.js Single Executable Applications (SEA), requiring no external dependencies or Node.js installation.
When your in a .liquid file, you can format the document using Control+Shift+X or by clicking "Format Liquid Document" in the Extensions Menu.
⚡ Quick Commands
The extension adds two convenient commands to your project context menu (.csproj), located towards the top:
- Add LiquidPage - Quickly add a new Liquid page template to your project
- Add LiquidErrorPage - Add a new Liquid error page template to your project
Prerequisites
Important: Before using the Add LiquidPage or Add LiquidErrorPage commands, you must install the Kinetq.LiquidPages.Templates dotnet CLI package.
To install the templates package, run the following command in your terminal:
dotnet new install Kinetq.LiquidPages.Templates
Without this package installed, the Add LiquidPage and Add LiquidErrorPage commands will not function correctly.
How to Use
- Install the prerequisites: Make sure you have installed the
Kinetq.LiquidPages.Templatespackage as described above. - Access the commands: Right-click on your C# Project in Solution Explorer. You'll find the "Add LiquidPage" and "Add LiquidErrorPage" commands near the top of the context menu.
- Create templates: Select the desired command and follow the prompts to add new Liquid template files to your project.
- Edit templates: Open any
.liquidfile to take advantage of syntax highlighting.
About Liquid Templates
Liquid is a flexible and safe templating language created by Shopify. This extension brings first-class support for Liquid templates to Visual Studio, making it easier to work with Liquid-based web applications in the .NET ecosystem.
Feedback and Issues
If you encounter any issues or have suggestions for improvements, please visit the project repository to report them.
