jskherman / imprecv

A no-frills curriculum vitae (CV) template using Typst and YAML to version control CV data.
Apache License 2.0
319 stars 38 forks source link

feat: check empty value for entry #1

Closed mangkoran closed 1 year ago

mangkoran commented 1 year ago

First of all, thank you very much for creating this repo! Previously I used Latex for any of document creation, and after I found Typst I couldn't be any happy than this :D This repo made it easy to create an efficient CV and resume.

I would like to contribute to this repo with this PR which allow user to "hide" section by providing no value for it, such as affiliations, projects, awards, and certifications. I am aware that these are the recommended contents for a good CV/resume however there would be such use case where user have no item to put into those lists (like me :'( ).

Additionally, I added .editorconfig for formatting.

Please let me know if you have any comments or want me to add something 😉

phamson02 commented 7 months ago

Maybe a better null checking is:

if info.at("references", default: none) != none.

This allows the option to omit the entry in the YAML file altogether, which maybe make it cleaner, rather than the current method that requires supplying an empty value like so:

if info.references != none.

jskherman commented 7 months ago

Thanks for the suggestion @phamson02, can you make a PR for it?