Files
My-Resume-Generator/build.js
Jared Kling fddb3f5c3e
Some checks failed
Build and Publish / build_html (push) Failing after 6s
Build and Publish / convert_to_pdf (push) Failing after 44s
Build and Publish / upload_as_release (push) Successful in 2s
Move to weasyprint
2025-12-08 22:22:04 -06:00

21 lines
624 B
JavaScript

const ejs = require("ejs");
const fs = require("fs");
const path = require("path");
// File paths
const dataPath = path.join(__dirname, "content.json");
const templatePath = path.join(__dirname, "template.ejs");
const outputPath = path.join(__dirname, "generated_resume.html");
// Read data and template
const jsonData = JSON.parse(fs.readFileSync(dataPath, "utf-8"));
const template = fs.readFileSync(templatePath, "utf-8");
// Render HTML
const html = ejs.render(template, jsonData);
// Write the output
fs.writeFileSync(outputPath, html, "utf-8");
console.log(`Successfully generated html resume at ${outputPath}`);