System to build static HTML CVs using JSON user data in HTML templates with a sprinkling of Markdown.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example_output
sample_user_data
templates/basic
.gitignore
README.md
do-handlebars.js
favicon.ico
favicon.psd
gulpfile.js
package.json

README.md

cv-js

System to build static HTML CVs using JSON user data in HTML templates with a sprinkling of Markdown.

Example output: http://adam-h.github.com/cv-js/example.html Example config: sample_user_data/person.json

Requirements and Installation

A few node packages are required, they can be installed by running the following:

npm install

Building CV

The static HTML output can be generated using:

gulp

This will build the index.html file and copy over any template assets to the output directory`.

To automatically build while changing files (also calls livereload) use:

gulp watch

Options:

  • -o, --output_dir Directory to output the built files to [default: "dist"]
  • -t, --template Template to use (in templates/ dir) [default: "basic"]
  • -d, --data_dir Directory containing person.json and optional markdown files [default: "user_data"]
  • -p, --port Port to run the test server on when watching

Configuring

First time: Copy the sample_user_data directory to a new directory named user_data.

Edit the main person.json file in the user_data directory with your details.

Any blurb fields are processed as Markdown for formatting, and can optionally be loaded from a separate file in the same directory as person.json.If a seoparate file is to be used, the blurb string should be replaced with a JSON object with a file property with the filename as its value, e.g.:

"blurb": { "file": "skills.md" }

Templating

Templates should be placed in their own folder in templates. A file named TEMPLATENAME.handlebars must be present as this is the main HTML template used.

Any other files in this directory will be copied over to the output directory as-is.

As an example, the basic template is at templates/basic/basic.handlebars and includes an external CSS file called basic.css (but this could be named anything).

The system includes a HTML5 doctype and utf-8 meta-tag at the top of the output, anything else is provided by the template.

See handlebarsjs.com for formatting details.