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

Speaking section not rendered #101

Closed
umpirsky opened this issue Jan 8, 2016 · 23 comments
Closed

Speaking section not rendered #101

umpirsky opened this issue Jan 8, 2016 · 23 comments

Comments

@umpirsky
Copy link

umpirsky commented Jan 8, 2016

Not sure if it is HackMyResume issue or themes issue, but with both modern and jsonresume-theme-slick themes "speaking" section is not rendered at all.

I noticed that this section is supported only by FRESH format.

@StevenBlack
Copy link

It's the theme. Have a look here.

@umpirsky
Copy link
Author

umpirsky commented Jan 8, 2016

@StevenBlack Yes, I saw, but with default theme (modern) it is also not there.

@StevenBlack
Copy link

Looks like Speaking was added Dec 8 2015.

So the default themes lag by considerable time. Modern is here.

@hacksalot
Copy link
Owner

@StevenBlack Yes, for sure. We had a pretty big initial lag because at the time there wasn't tool support for theme inheritance, partials, or a cross-engine helper apparatus. Theme updates should flow more quickly now, and getting full coverage of the model in all FRESH themes is one of the major two requirements for moving fresh-themes out of beta. (The other being NPM/Bower/etc packaging.)

@umpirsky
Copy link
Author

umpirsky commented Jan 8, 2016

Thanks folks.

But it will never be supported in jsonresume-theme-modern, right? Since it is FRESH specific.

@hacksalot
Copy link
Owner

That question is probably best put to the JSON Resume folks -- when JSON Resume 1.0.0 is released presumably the themes will be updated too, but that would be up to the individual authors. In the meantime, it would be pretty easy to extend the theme to include this -- eg, take a fork & make the changes, or submit an issue here for a comparable FRESH version.

There's also support brewing in HMR for injection of content into the resume HTML after generation has run, which would allow you to a) generate the resume and then b) inject additional sections using jQuery-style selectors.

@umpirsky
Copy link
Author

umpirsky commented Jan 9, 2016

In deed, thanks @hacksalot.

@hacksalot hacksalot added this to the v1.6.0 milestone Jan 11, 2016
@umpirsky
Copy link
Author

I just tried forked https://github.com/umpirsky/jsonresume-theme-slick and added:

{{#if resume.speaking.length}}
    <h1>Test</h1>
{{/if}}

When I checkout it in separate folder I get:

$ node_modules/.bin/hackmyresume BUILD  -d resume.json TO resume.html -t jsonresume-theme-slick 

*** HackMyResume v1.5.2 ***
Reading resume: resume.json
Applying JSONRESUME-THEME-SLICK theme (2 formats)
Generating HTML resume: resume.html
ERROR: HACKMYSTATUS is not defined
ReferenceError: HACKMYSTATUS is not defined
    at JRSTheme.open (node_modules/hackmyresume/src/core/jrs-theme.js:76:28)
    at Class.themeFromMoniker (node_modules/hackmyresume/src/generators/template-generator.js:249:26)
    at Class.module.exports.BaseGenerator.extend.invoke (node_modules/hackmyresume/src/generators/template-generator.js:96:40)
    at Class.module.exports.BaseGenerator.extend.generate (node_modules/hackmyresume/src/generators/template-generator.js:129:26)
    at single (node_modules/hackmyresume/src/verbs/build.js:193:32)
    at node_modules/hackmyresume/src/verbs/build.js:85:17
    at Array.forEach (native)
    at build (node_modules/hackmyresume/src/verbs/build.js:84:13)
    at Command.execVerb (node_modules/hackmyresume/src/index.js:177:28)
    at Command.<anonymous> (node_modules/hackmyresume/src/index.js:110:16)

Why this happens?

Then I tried to edit node_modules/jsonresume-theme-slick/resume.template directly.

But it is not rendered. My resume.json does contain speaking section.
Any idea how I can debug it?

Thanks.

@hacksalot
Copy link
Owner

Should be fixed shortly -- looks like the speaking section isn't being carried over to the JRS format prior to invoking the theme. This is an HMR bug, not a JSON Resume one. I'll update here in a half hour or so and you should be able to pick up from dev or grab the official 1.6.0 this afternoon. I'll also add a test case addressing this. Thanks

@umpirsky
Copy link
Author

@hacksalot Thanks a lot, that was blazing fast! 👍

What about ReferenceError: HACKMYSTATUS is not defined? Any idea why this happens when I use custom theme location checkouted from my github repo?

@hacksalot
Copy link
Owner

There are a couple bugs here, good catch. HACKMYSTATUS is used in that spot without ever being require()ed so that's why the ReferenceError. It happens to be on a rarely-executed code path, which is why our (current) tests didn't catch it (should be resolved with 100% test cov). The error being thrown in that specific spot relates to not finding the package.json for the JSON Resume theme. Lastly, we're currently not pushing all unknown/extra fields (speaking would be considered an "extra" section per JRS 0.0.0) during conversion between resume formats : )

@umpirsky
Copy link
Author

@hacksalot Understood. Thanks for detailed explanation! 👍

@hacksalot
Copy link
Owner

Should be fixed in 1.6.0. If not, leave a comment here or open a new issue. Thanks~

@robertmain
Copy link

It doesn't seem to be working for me but that's partly because I don't know what format the speaking section should take and partly because apart from man pages I can't find any mention of it in the code (and trust me, i've grep'd my little head off 😄 )

The newly generated resumes dont include it

{
    "basics":{
        "name":"",
        "label":"",
        "picture":"",
        "email":"",
        "phone":"",
        "degree":"",
        "website":"",
        "summary":"",
        "location":{
            "address":"",
            "postalCode":"",
            "city":"",
            "countryCode":"",
            "region":""
        },
        "profiles":[
            {
                "network":"",
                "username":"",
                "url":""
            }
        ]
    },
    "work":[
        {
            "company":"",
            "position":"",
            "website":"",
            "startDate":"",
            "endDate":"",
            "summary":"",
            "highlights":[
                ""
            ]
        }
    ],
    "awards":[
        {
            "title":"",
            "date":"",
            "awarder":"",
            "summary":""
        }
    ],
    "education":[
        {
            "institution":"",
            "area":"",
            "studyType":"",
            "startDate":"",
            "endDate":"",
            "gpa":"",
            "courses":[
                ""
            ]
        }
    ],
    "publications":[
        {
            "name":"",
            "publisher":"",
            "releaseDate":"",
            "website":"",
            "summary":""
        }
    ],
    "volunteer":[
        {
            "organization":"",
            "position":"",
            "website":"",
            "startDate":"",
            "endDate":"",
            "summary":"",
            "highlights":[
                ""
            ]
        }
    ],
    "skills":[
        {
            "name":"",
            "level":"",
            "keywords":[
                ""
            ]
        }
    ]
}

and it seems not to be in the examples under /test unless I've missed it somehow...

@hacksalot
Copy link
Owner

@robertmain Only FRESH/FRESCA resumes themes currently support speaking. From what I understand, JSON Resume will support something similar in the future, but it's not in their v0.0.0. We (HMR) could support it for JRS in the interim, but not as a root-level property, at least, not without violating the schema because of the additionalProperties: false tucked into the root. :-/

@robertmain
Copy link

Hmm...maybe I should convert to FRESH/FRESCA then. I believe HMR can do this conversion - yes?

@hacksalot
Copy link
Owner

It can with hackmyresume convert but there are good reasons to keep both formats. I use FRESH as the "single source of truth", but maintain a synced JRS copy side by side with it. Note that any translation glitch from FRESH to JRS is a HackMyResume bug: the conversion has to be 100% solid. Right now it's maybe ~95% solid.

@robertmain
Copy link

So what should I do? Convert to FRESH but keep the JRS around? What are the reasons for keeping both around?

@hacksalot
Copy link
Owner

TL;DR -- use both!

@umpirsky
Copy link
Author

umpirsky commented Feb 4, 2016

@hacksalot I tried with HackMyResume v1.7.4 and FRESH format, in my theme resume.speaking.length is still false.

@hacksalot
Copy link
Owner

Speaking should show up -- if you try with Jane's resume (you can npm install fresh-resume-exemplar) do you see the Speaking section? Also you might try latest with npm install hacksalot/hackmyresume#dev.

It should also be r.speaking.length unless you've hooked up resume.speaking.length yourself. I don't think we've added that alias yet.

@umpirsky
Copy link
Author

umpirsky commented Feb 4, 2016

@hacksalot Yes, working with default theme, must be on my side then. Thanks.

@hacksalot
Copy link
Owner

Cool, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants