-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Custom template populator #660
Comments
I'd like this as well. Just some escape hatch out of using only the named themes on the json-resume.org site, and instead use a custom theme that I'd build. |
This is doable with resume-cli. A simple initial approach is to put the 3 files from a template (in my case: index.js, resume.css, & resume.handlebars) into a folder. You could then build using |
JSON Resume already supports custom themes, you can build it using whatever stack you like. The Themes page of the website has a section called Want to develop your own?, which I recommend you read. You can find a template here: A minimal theme just exports a
/**
* @param {Object} resume
* @returns {string}
*/
function render(resume) {
let html = fs.readFileSync(__dirname + "/template.html", "utf-8");
// populate the template somehow, or use a template engine like Handlebars
return html;
}
module.exports = {
render
}; It's recommended to use a templating engine over just placeholder variables because the schema includes many arrays. Without a templating engine, that'd be very messy to handle. Later I want to introduce some documentation for theming. I'll be sure to include the most minimal theme possible, like the example above, so it's easier to get started. |
Hi 👋,
I love the idea behind jsonresume, but I do not love the templates that exist today. It would be awesome if the CLI could autofill the json resume into a custom website/resume template, assuming I manually added keys into the the template that the CLI can replace.
The text was updated successfully, but these errors were encountered: