https://github.com/lasso-js/lasso-marko-taglib
A taglib to use Marko with Lasso
https://github.com/lasso-js/lasso-marko-taglib
Last synced: 4 months ago
JSON representation
A taglib to use Marko with Lasso
- Host: GitHub
- URL: https://github.com/lasso-js/lasso-marko-taglib
- Owner: lasso-js
- License: mit
- Created: 2017-10-05T17:15:19.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-08-28T22:10:34.000Z (about 2 years ago)
- Last Synced: 2025-06-29T13:49:50.592Z (4 months ago)
- Language: JavaScript
- Size: 1.21 MB
- Stars: 10
- Watchers: 4
- Forks: 8
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Lasso.js Taglib for Marko
==========================
The [Lasso.js](README.md) includes a taglib for Marko for easily injecting `` and `<link>` tags into a page, as well as resource URLs for images and other types of front-end resources.
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
# Table of Contents
- [Example](#example)
- [Tags](#tags)
- [`<lasso-page>`](#lasso-page)
- [`<lasso-head>`](#lasso-head)
- [`<lasso-body>`](#lasso-body)
- [`<lasso-img>`](#lasso-img)
- [`<lasso-resource>`](#lasso-resource)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
# Installation
In order to automatically detect and compile required `*.marko` templates we
will need to install the [lasso-marko](https://github.com/lasso-js/lasso-marko)
plugin and [lasso-marko-taglib](https://github.com/lasso-js/lasso-marko-taglib)
taglib using the following commands:
```bash
npm install lasso-marko
npm install @lasso/marko-taglib
```
# Example Template
```html
<lasso-page name="my-page" package-path="./browser.json"/>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test Page</title>
<lasso-head/>
</head>
<body>
<h1>Test Page</h1>
<lasso-body/>
</body>
</html>
```
Output HTML will be similar to the following:
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test Page</title>
<link rel="stylesheet" type="text/css" href="/static/my-page-85e3288e.css">
</head>
<body>
<h1>Test Page</h1>
<script type="text/javascript" src="/static/bundle1-6df28666.js">