You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 npx resume export --theme ./resume_template/ --resume resume.yaml resume.html
A minimal theme just exports a render method from a JavaScript file, which outputs HTML.
index.js
/** * @param {Object} resume * @returns {string} */functionrender(resume){lethtml=fs.readFileSync(__dirname+"/template.html","utf-8");// populate the template somehow, or use a template engine like Handlebarsreturnhtml;}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: