identify-ejs
v1.0.1
Published
Identify Africa newsletter template packaged as an EJS helper.
Maintainers
Readme
Identify Africa Newsletter EJS
A reusable EJS template plus helper for rendering the Identify Africa Monthly Insights newsletter in Node.js projects or email pipelines.
Installation
npm install identify-ejsUsage
const { renderNewsletter } = require("identify-ejs");
const html = renderNewsletter({
newsletterTitle: "Identify Africa Monthly Insights – November Edition",
tagline: "Your monthly guide to smarter, safer verification.",
heroImage: "https://example.com/hero.jpg",
website: "www.identifyafrica.com",
contactEmail: "[email protected]",
contactPhone: "+234 000 0000",
footerNote: "Identify Africa • Smarter, safer verification",
articles: [
{ title: "Secure onboarding", summary: "How AI reduces manual review load." },
{ title: "Compliance spotlight", summary: "What to know about KYC updates." },
],
});
// send html to an email API, save as file, etc.Template Variables
newsletterTitle(string) – main heading, defaults to Identify Africa copy.tagline(string) – supporting subtitle.heroImage(string) – URL/base64/local data for header photo (optional).brandImage(string) – optional masthead image displayed in the orange bar.brandTitle(string) – optional text label if you want to show words beside the logo.brandImageAlt(string) – accessible text for the masthead image.articles(array) – optional{ title, summary }objects.website,contactEmail,contactPhone(string) – footer metadata.footerNote(string) – footer text, default to Identify Africa tagline.
Bundled Assets
Drop your preferred hero image into assets/images/hero.jpg. When no heroImage
is provided at render time, the helper inlines that file as a base64 data URI so
the preview works offline. Any jpg, jpeg, png, or gif filename is fine.
Similarly, place the masthead artwork in assets/images/ named map1.png,
map1.jpg, map1.jpeg, or map1.svg. The helper auto-detects the first
matching file and uses it without adding its own background. You can override
by passing brandImage directly.
Programmatic Access
Besides renderNewsletter, the package also exports:
template– the raw EJS source as a string.templatePath– absolute path to the.ejsfile for custom rendering pipelines.heroAssetPath– where the default hero image is loaded from.brandAssetCandidates– list of file names checked for the masthead image.
Development
npm install
npm testFeel free to adapt the template or extend helper utilities before publishing to npm.
