<commit_before># Unobtrusive Template Engine
An example of unobtrusive templating using [cheerio](https://github.com/cheeriojs/cheerio).

## Idea
Using tipical template engines involves learning the template language and process html base in order to accomplish template engine requirements.

It's not an unobtrusive way to work with html base.

In frontend side, jQuery helps to work in an unobtrusive way. What if we could apply this idea in backend side?

[Cheerio](https://github.com/cheeriojs/cheerio) provides jQuery functionalities for Node.

This is an example of how to work with cheerio to provide unobtrusive templating.

## Install
- Clone the repository
- Change to the directory
- ```$ npm install````
- ```$ npm start````
- Open ```http://localhost:3000``` in a browser

## Branches
- *simple:* Simple example
- *bootstrap:* For bootstrap theme
- *juno:* Using [juno-cheerio](https://github.com/akobashikawa/juno-cheerio) module

## Templating
- In ```app.js```, usual templating block is replaced by a simple custom template engine, based in the example of Express documentation: ```http://expressjs.com/en/advanced/developing-template-engines.html```.<commit_msg>Fix typo<commit_after># Unobtrusive Template Engine
An example of unobtrusive templating using [cheerio](https://github.com/cheeriojs/cheerio).

## Idea
Using tipical template engines involves learning the template language and process html base in order to accomplish template engine requirements.

It's not an unobtrusive way to work with html base.

In frontend side, jQuery helps to work in an unobtrusive way. What if we could apply this idea in backend side?

[Cheerio](https://github.com/cheeriojs/cheerio) provides jQuery functionalities for Node.

This is an example of how to work with cheerio to provide unobtrusive templating.

## Install
- Clone the repository
- Change to the directory
- ```$ npm install```
- ```$ npm start```
- Open ```http://localhost:3000``` in a browser

## Branches
- *simple:* Simple example
- *bootstrap:* For bootstrap theme
- *juno:* Using [juno-cheerio](https://github.com/akobashikawa/juno-cheerio) module

## Templating
- In ```app.js```, usual templating block is replaced by a simple custom template engine, based in the example of Express documentation: ```http://expressjs.com/en/advanced/developing-template-engines.html```.
{'fraction_non_alphanumeric': 0.10454738631534212, 'fraction_numerical': 0.003399915002124947, 'mean_word_length': 4.826732673267327, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2026320', 'n_tokens_mistral': 683, 'n_tokens_neox': 673, 'n_words': 268}