Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alesanchezr/html-template-engine

Pure HTML template engine, no need for any other language or knowledge.
https://github.com/alesanchezr/html-template-engine

html html-include html-require html-template template-engine template-engine-html

Last synced: 14 days ago
JSON representation

Pure HTML template engine, no need for any other language or knowledge.

Awesome Lists containing this project

README

        

# HTML Template Engine [(live demo)](https://alesanchezr.github.io/html-template-engine/demo/)

Include other files into your current file:
```html


```

## Instalation
- Using NPM
```sh
$ npm install html-template-engine --save
```
- Or using a **simple script tag** before your body closing tag and use the **autoload** feature to avoid using any Javascript whatsoever.
```html

```
Important! Please notice the **?autoload** at the end of the script url, [here is the library code](../../tree/master/dist)

## Usage (Remember to install the library first)

On your HTML paste the following code whenever you want to include another html file (nested calls are supported since version 0.0.5)
```html


```

Only for NPM installations:
```js
import TemplateManager from 'html-template-engine';

//if you want to load the templates when the website finishes loading
window.onload = function(){ TemplateManager.start(); }
```

### Additional Available Params

1. Log on the console all the pieces being loaded into the html
```html

```

2. Set a base template path for all your url's
```html

...


```

## Authors
| ![Alejandro Sanchez](https://www.gravatar.com/avatar/92dc7ea3850dea745ac8a4932583827d?s=20) | Alejandro Sanchez | [@alesanchezr](https://twitter.com) | [alesanchezr.com](https://alesanchezr.com) |
|---------------------------------------------------------------------------------------------|-------------------|-------------------------------------|--------|