Skip to content
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

Awesome: allow undefined speaking highlights. #61

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ben-e-whitney
Copy link

Suppose a file test.json contains the following.

{
	"name": "Julia Child",

	"meta": {
		"format": "[email protected]"
	},

	"info": {},

	"contact": {},

	"location": {},

	"speaking": [
		{
			"title": "How to Make Pancakes",
			"event": "Pancake Breakfast 2018"
		}
	]
}

Building fails due to an assumption that speaking engagements have highlights (not mandated by the FRESH schema).

$ hackmyresume --version

*** HackMyResume v1.8.0 ***
1.8.0
$ hackmyresume VALIDATE test.json 

*** HackMyResume v1.8.0 ***
Validating test.json against the FRESH schema: VALID!
$ hackmyresume BUILD test.json TO test.latex --theme fresh-themes/themes/awesome

*** HackMyResume v1.8.0 ***
Reading FRESH resume: test.json
Applying AWESOME theme (3 formats)
Generating LATEX resume: test.latex
An error occurred during template invocation.
   TypeError: Cannot read property 'map' of undefined

This commit fixes the issue.

The FRESH schema does not require speaking engagements to have
highlights. When no highlights are present, `hackmyresume` will fail and
the LaTeX output will contain an empty `cvitems` environment, which will
cause a compilation error. This commit prevents the empty `cvitems`
environment, adds the speaking summary before the highlights, and
removes two extraneous parentheses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant