EJS
- EJS is a simple templating language that lets you generate HTML markup with plain JavaScript. No religiousness about how to organize things. No reinvention of iteration and control-flow. It’s just plain JavaScript. ## Advanteges :
- Use plain JavaScript.
- Fast development time.
- Simple syntax.
- Speedy execution.
- Easy debugging.
- Active development.
Features
- Fast compilation and rendering.
- Simple template tags: <% %>.
- Custom delimiters (e.g., use [? ?] instead of <% %>).
- Sub-template includes.
- Ships with CLI.
- Both server JS and browser support.
- Static caching of intermediate JavaScript.
- Static caching of templates.
- Complies with the Express view system. Image
Tags
<%
‘Scriptlet’ tag, for control-flow, no output.<%_
‘Whitespace Slurping’ Scriptlet tag, strips all whitespace before it.<%=
Outputs the value into the template (HTML escaped).<%-
Outputs the unescaped value into the template.<%#
Comment tag, no execution, no output.<%%
Outputs a literal'<%'
.%>
Plain ending tag.-%>
Trim-mode (‘newline slurp’) tag, trims following newline._%>
‘Whitespace Slurping’ ending tag, removes all whitespace after it.
Working with volumes
-
You can perform a volumes search by sending an HTTP GET request to the following URI: volumes
-
This request has a single required parameter:
- q - Search for volumes that contain this text string.
- There are special keywords you can specify in the search terms to search in particular fields, such as:
- intitle: Returns results where the text following this keyword is found in the title.
- inauthor: Returns results where the text following this keyword is found in the author.
- inpublisher: Returns results where the text following this keyword is found in the publisher.
- subject: Returns results where the text following this keyword is listed in the category list of - the volume.
- isbn: Returns results where the text following this keyword is the ISBN number.
- lccn: Returns results where the text following this keyword is the Library of Congress Control Number.
- oclc: Returns results where the text following this keyword is the Online Computer Library Center number.