-
Notifications
You must be signed in to change notification settings - Fork 0
feat: render JSON Resume references section #83
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
Closed
+113
−4
Closed
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,4 +14,5 @@ | |
| certificates: (), | ||
| interests: (), | ||
| publications: (), | ||
| references: (), | ||
| )) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| // JSON Resume `references` section. Each entry is `{name, reference}`. | ||
| // Three documents exercise the API surface: | ||
| // 1. Multiple entries — referee name + quote, with skip cases. | ||
| // 2. Empty references + `referencesAvailableOnRequest: true` — | ||
| // renders the conventional fallback line under the heading. | ||
| // 3. Empty references + `referencesAvailableOnRequest: false` — | ||
| // section is suppressed entirely (no orphan heading). | ||
|
|
||
| #import "../lib.typ": alta | ||
|
|
||
| #let cv = ( | ||
| basics: (name: "Jane Doe", email: "jane@example.com"), | ||
| references: ( | ||
| ( | ||
| name: "Aoife Ní Bhriain", | ||
| reference: [Jane is one of the most thoughtful engineers I have | ||
| worked with — equally at home in distributed systems design | ||
| and in mentoring the team around her.], | ||
| ), | ||
| ( | ||
| // Name-only minimal: quote is mandatory, so this is skipped. | ||
| name: "Should Not Render", | ||
| ), | ||
| ( | ||
| // Anonymous reference — no name, quote still renders. | ||
| reference: [A consistently strong contributor with an unusually | ||
| broad technical range.], | ||
| ), | ||
| ( | ||
| // Explicit nil reference — skipped. | ||
| name: "Also Not Rendered", | ||
| reference: none, | ||
| ), | ||
| ), | ||
| ) | ||
|
|
||
| // 1. Multiple entries. | ||
| #alta(cv) | ||
|
|
||
| #pagebreak() | ||
|
|
||
| // 2. Empty list + opt-in fallback. | ||
| #alta( | ||
| ( | ||
| basics: (name: "Jane Doe", email: "jane@example.com"), | ||
| references: (), | ||
| ), | ||
| preferences: (referencesAvailableOnRequest: true), | ||
| ) | ||
|
|
||
| #pagebreak() | ||
|
|
||
| // 3. Empty list, default preference — section suppressed. | ||
| #alta(( | ||
| basics: (name: "Jane Doe", email: "jane@example.com"), | ||
| references: (), | ||
| )) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial | ⚡ Quick win
Use kebab-case for the parameter name to match file convention.
The parameter
available_on_requestuses snake_case, but the file's established convention for multi-word parameter names is kebab-case (e.g.,image-size,link-contact-info,header-text-alignin_headerat lines 659–665). Rename it toavailable-on-requestfor consistency.♻️ Proposed fix
Also update the call site at line 1329:
render: (cv, labels, prefs) => _references( cv.at("references", default: ()), labels, - available_on_request: prefs.referencesAvailableOnRequest, + available-on-request: prefs.referencesAvailableOnRequest, ),🤖 Prompt for AI Agents