Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
tweaked docs
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doherty committed Aug 31, 2016
1 parent 4a188ad commit 537aafb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
10 changes: 6 additions & 4 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# express-render-template

Extends res.render allowing an external URL to be used as a layout & CSS selector as a placeholder location _(alternative to an iframe)_.
Use the HTML source of an external URL as an express layout template, a clean alternative to an iframe.

Extends res.render allowing an external URL to be used as a layout & CSS selector as a placeholder location to inject view content.

## Installation

Expand Down Expand Up @@ -29,16 +31,16 @@ app.get('/', function(req, res){
});
```

## View Template
## View template

```html
<h1>20% off <a href="https://northseaworkwear.com/brands-dickies-fr-workwear/">Dickies Workwear</a></h1>
```

## Auto Base Tag Injection
## Auto base tag injection

To ensure scripts, styles and images in the external template load on your site, the render method injects a HTML base tag ```<base href="http://mammothworkwear.com" />```. Therefore you need to ensure any links within your view are absolute.

## License

[ISC License](LICENSE) &copy; 2016 [John Doherty](http://wwww.johndoherty.info/)
[ISC License](LICENSE) &copy; 2016 [John Doherty](https://courseof.life/johndoherty)
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "express-render-template",
"version": "0.0.9",
"description": "Extends res.render allowing an external URL to be used as a layout & CSS selector as a placeholder location (alternative to an iframe)",
"version": "1.0.0",
"description": "Use the HTML source of an external URL as an express layout template (clean iframe alternative)",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified yet!\" && exit 1"
Expand All @@ -13,7 +13,10 @@
"keywords": [
"express",
"render",
"iframe"
"template",
"layout",
"iframe",
"alternative"
],
"author": "John Doherty <contact@johndoherty.info> (www.johndoherty.info)",
"license": "ISC",
Expand Down

0 comments on commit 537aafb

Please sign in to comment.