From 09897cc5ac9a7cbb7158a8270c7581d61ba37b6c Mon Sep 17 00:00:00 2001 From: Pablo Pirata Date: Mon, 5 Aug 2024 00:17:08 +0200 Subject: [PATCH 01/12] Fix issue #74 --- resume.json | 2 +- src/pages/Build.jsx | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/resume.json b/resume.json index b61fbad..6f2b06e 100644 --- a/resume.json +++ b/resume.json @@ -169,7 +169,7 @@ } ], "meta": { - "canonical": "https://raw.githubusercontent.com/jsonresume/resume-schema/master/resume.json", + "canonical": "https://raw.githubusercontent.com/jsonresume/resume-schema/81d9e75a3d7b599e202e7c3e31c55e634c7f1e39/sample.resume.json", "version": "v1.0.0", "lastModified": "2017-12-24T15:53:00" }, diff --git a/src/pages/Build.jsx b/src/pages/Build.jsx index c9fee5d..e742ad2 100644 --- a/src/pages/Build.jsx +++ b/src/pages/Build.jsx @@ -140,6 +140,7 @@ const BuildPage = ({ params, uri, location }) => { const getResumeJsonFromFormik = useCallback(() => { const arrayKeys = ['highlights', 'keywords', 'courses', 'roles']; + return { basics: { ...Object.entries(formik.values) @@ -188,6 +189,7 @@ const BuildPage = ({ params, uri, location }) => { interests: convertFormikToJsonArray(formik.values, 'interests-', arrayKeys), references: convertFormikToJsonArray(formik.values, 'references-', arrayKeys), projects: convertFormikToJsonArray(formik.values, 'projects-', arrayKeys), + certificates: convertFormikToJsonArray(formik.values, 'certificates-', arrayKeys), coverLetter: formik.values['coverLetter-0'] || '', }; }, [formik.values]); From aac1891869daf28dc459dcae850d04c9a9606821 Mon Sep 17 00:00:00 2001 From: Pablo Pirata Date: Mon, 5 Aug 2024 00:20:23 +0200 Subject: [PATCH 02/12] bump version number --- README.MD | 3 +++ package-lock.json | 20 ++++++++++---------- package.json | 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/README.MD b/README.MD index eab2d26..8939b04 100644 --- a/README.MD +++ b/README.MD @@ -310,6 +310,9 @@ The following `JSON` is a result of [this Google Spreadsheet](https://docs.googl ![ScreenShot](https://raw.githubusercontent.com/blopa/Resume-Builder/main/screenshots/v4/screenshot_3.png) ## Release Notes +- **v4.1.0:** + - Bump NPM packages versions. + - Fix issue [#74](https://github.com/blopa/Resume-Builder/issues/74). - **v4.0.12:** - Bump NPM packages versions. - Fix "0" showing up in the Cover Letter component. diff --git a/package-lock.json b/package-lock.json index d20856d..fb07b1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "resume-builder", - "version": "4.0.12", + "version": "4.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "resume-builder", - "version": "4.0.12", + "version": "4.1.0", "license": "MIT", "dependencies": { "@babel/plugin-proposal-class-properties": "^7.18.6", @@ -4035,12 +4035,12 @@ } }, "node_modules/@types/react": { - "version": "18.2.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.14.tgz", - "integrity": "sha512-A0zjq+QN/O0Kpe30hA1GidzyFjatVvrpIvWLxD+xv67Vt91TWWgco9IvrJBkeyHm1trGaFS/FSGqPlhyeZRm0g==", + "version": "17.0.80", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.80.tgz", + "integrity": "sha512-LrgHIu2lEtIo8M7d1FcI3BdwXWoRQwMoXOZ7+dPTW0lYREjmlHl3P0U1VD0i/9tppOuv8/sam7sOjx34TxSFbA==", "dependencies": { "@types/prop-types": "*", - "@types/scheduler": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" } }, @@ -28578,12 +28578,12 @@ } }, "@types/react": { - "version": "18.2.14", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.14.tgz", - "integrity": "sha512-A0zjq+QN/O0Kpe30hA1GidzyFjatVvrpIvWLxD+xv67Vt91TWWgco9IvrJBkeyHm1trGaFS/FSGqPlhyeZRm0g==", + "version": "17.0.80", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.80.tgz", + "integrity": "sha512-LrgHIu2lEtIo8M7d1FcI3BdwXWoRQwMoXOZ7+dPTW0lYREjmlHl3P0U1VD0i/9tppOuv8/sam7sOjx34TxSFbA==", "requires": { "@types/prop-types": "*", - "@types/scheduler": "*", + "@types/scheduler": "^0.16", "csstype": "^3.0.2" }, "dependencies": { diff --git a/package.json b/package.json index 0bfed0b..7e82611 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "resume-builder", - "version": "4.0.12", + "version": "4.1.0", "description": "Resume Builder", "main": "index.js", "author": "Pablo Pirata", From 29baa07faaeba5bb33cf12733910e2cf7eec67c8 Mon Sep 17 00:00:00 2001 From: Pablo Pirata Date: Mon, 5 Aug 2024 00:26:29 +0200 Subject: [PATCH 03/12] add github templates --- .github/ISSUE_TEMPLATE/bug_report.md | 34 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 19 +++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..d268c0a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**File Upload** +If you used a file that led to the issue, please provide that file here. **Ensure that all personal or sensitive information is removed** from the file before uploading. Please note that **any personal information included in the uploaded file is your own responsibility, and the project maintainers are not liable for any data leakage**. + +**Desktop (please complete the following information):** +- OS: [e.g. Windows, macOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..5f0a04c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,19 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 370d8bf6cfdb15443c26952cc82af3072342d371 Mon Sep 17 00:00:00 2001 From: Pablo Pirata Date: Mon, 5 Aug 2024 00:57:49 +0200 Subject: [PATCH 04/12] update resume to add certificates --- resume.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resume.json b/resume.json index 6f2b06e..e564135 100644 --- a/resume.json +++ b/resume.json @@ -86,6 +86,14 @@ "summary": "There is no spoon." } ], + "certificates": [ + { + "name": "Certified Pied Piper Compressionist", + "date": "2014-10-01", + "url": "http://piedpiper.example.com/certificates/compressionist", + "issuer": "Pied Piper Certification Authority" + } + ], "publications": [ { "name": "Video compression for 3d media", From c5b6e297543d0a86ec9e02266fe2f275a77a2543 Mon Sep 17 00:00:00 2001 From: Pablo Pirata Date: Mon, 5 Aug 2024 10:08:06 +0200 Subject: [PATCH 05/12] add markdown parser --- package-lock.json | 17 +++++++++++++++++ package.json | 1 + resume.json | 36 ++++++++++++++++++------------------ src/pages/Resume.jsx | 30 ++++++++++++++++++++++++++++-- 4 files changed, 64 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index fb07b1a..2478297 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,6 +35,7 @@ "gatsby-source-filesystem": "^3.15.0", "gatsby-transformer-sharp": "^3.15.0", "lodash": "^4.17.21", + "marked": "^13.0.3", "material-ui-dropzone": "^3.5.0", "material-ui-flags": "^1.2.4", "mustache": "^4.2.0", @@ -15251,6 +15252,17 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/marked": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-13.0.3.tgz", + "integrity": "sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA==", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 18" + } + }, "node_modules/material-ui-dropzone": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/material-ui-dropzone/-/material-ui-dropzone-3.5.0.tgz", @@ -36983,6 +36995,11 @@ "repeat-string": "^1.0.0" } }, + "marked": { + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-13.0.3.tgz", + "integrity": "sha512-rqRix3/TWzE9rIoFGIn8JmsVfhiuC8VIQ8IdX5TfzmeBucdY05/0UlzKaw0eVtpcN/OdVFpBk7CjKGo9iHJ/zA==" + }, "material-ui-dropzone": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/material-ui-dropzone/-/material-ui-dropzone-3.5.0.tgz", diff --git a/package.json b/package.json index 7e82611..0dd8fea 100644 --- a/package.json +++ b/package.json @@ -46,6 +46,7 @@ "gatsby-source-filesystem": "^3.15.0", "gatsby-transformer-sharp": "^3.15.0", "lodash": "^4.17.21", + "marked": "^13.0.3", "material-ui-dropzone": "^3.5.0", "material-ui-flags": "^1.2.4", "mustache": "^4.2.0", diff --git a/resume.json b/resume.json index e564135..ef3200f 100644 --- a/resume.json +++ b/resume.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", - "coverLetter": "Some text with {{some}} custom {{variable}}, cool {{cool}} and now a {{superDuperBigVariable}}", + "coverLetter": "Dear Hiring Manager,\n\nI am excited to apply for the **Software Engineer** position at {{company}}. I believe my experience in _web development_ and {{variable}} makes me a strong candidate. Please visit my [GitHub profile](https://github.com/richard-hendriks) for more details.\n\nSincerely,\n\n**Richard Hendriks**", "basics": { "name": "Richard Hendriks", "label": "Programmer", @@ -8,7 +8,7 @@ "email": "richard.hendriks@mail.com", "phone": "(912) 555-4321", "url": "http://richardhendricks.example.com", - "summary": "Richard hails from Tulsa. He has earned degrees from the University of Oklahoma and Stanford. (Go Sooners and Cardinal!) Before starting Pied Piper, he worked for Hooli as a part time software developer. While his work focuses on applied information theory, mostly optimizing lossless compression schema of both the length-limited and adaptive variants, his non-work interests range widely, everything from quantum computing to chaos theory. He could tell you about it, but THAT would NOT be a “length-limited” conversation!", + "summary": "Richard hails from Tulsa. He has earned degrees from the **University of Oklahoma** and **Stanford**. _(Go Sooners and Cardinal!)_ Before starting Pied Piper, he worked for **Hooli** as a part-time software developer. His work focuses on applied information theory, mostly optimizing lossless compression schema of both the length-limited and adaptive variants. His non-work interests range widely, from quantum computing to chaos theory. He could tell you about it, but _that_ would _not_ be a **“length-limited”** conversation!", "location": { "address": "2712 Broadway St", "postalCode": "CA 94115", @@ -33,16 +33,16 @@ { "name": "Pied Piper", "location": "Palo Alto, CA", - "description": "Awesome compression company", + "description": "**Awesome** compression company focusing on innovative solutions.", "position": "CEO/President", "url": "http://piedpiper.example.com", "startDate": "2013-12-01", "endDate": "2014-12-01", - "summary": "Pied Piper is a multi-platform technology based on a proprietary universal compression algorithm that has consistently fielded high Weisman Scores™ that are not merely competitive, but approach the theoretical limit of lossless compression.", + "summary": "**Pied Piper** is a multi-platform technology based on a proprietary universal compression algorithm that has consistently fielded high Weisman Scores™. The technology is _not merely competitive_, but approaches the **theoretical limit** of lossless compression.", "highlights": [ - "Build an algorithm for artist to detect if their music was violating copy right infringement laws", - "Successfully won Techcrunch Disrupt", - "Optimized an algorithm that holds the current world record for Weisman Scores" + "**Built** an algorithm for artists to detect if their music was violating copyright infringement laws", + "**Successfully won** [Techcrunch Disrupt](https://techcrunch.com/disrupt/)", + "**Optimized** an algorithm that holds the current world record for Weisman Scores" ], "keywords": [ "Javascript", @@ -57,9 +57,9 @@ "url": "http://coderdojo.example.com/", "startDate": "2012-01-01", "endDate": "2013-01-01", - "summary": "Global movement of free coding clubs for young people.", + "summary": "Global movement of free coding clubs for young people, teaching them programming and tech skills.", "highlights": [ - "Awarded 'Teacher of the Month'" + "**Awarded** 'Teacher of the Month'" ] } ], @@ -83,7 +83,7 @@ "title": "Digital Compression Pioneer Award", "date": "2014-11-01", "awarder": "Techcrunch", - "summary": "There is no spoon." + "summary": "Recognized for pioneering advancements in digital compression technology. _There is no spoon._" } ], "certificates": [ @@ -100,14 +100,14 @@ "publisher": "Hooli", "releaseDate": "2014-10-01", "url": "http://en.wikipedia.org/wiki/Silicon_Valley_(TV_series)", - "summary": "Innovative middle-out compression algorithm that changes the way we store data." + "summary": "Innovative middle-out compression algorithm that changes the way we store data. Learn more [here](http://en.wikipedia.org/wiki/Silicon_Valley_(TV_series))." }, { "name": "Video compression for 3d media part 2", "publisher": "Hooli", "releaseDate": "2015-10-01", "url": "http://hooli.com", - "summary": "Innovative middle-out compression algorithm that changes the way we store data. Again!" + "summary": "Innovative middle-out compression algorithm that changes the way we store data. _Again!_" } ], "skills": [ @@ -148,17 +148,17 @@ "references": [ { "name": "Erlich Bachman", - "reference": "It is my pleasure to recommend Richard, his performance working as a consultant for Main St. Company proved that he will be a valuable addition to any company." + "reference": "It is my pleasure to recommend **Richard**. His performance as a consultant for _Main St. Company_ proved that he will be a valuable addition to any company." } ], "projects": [ { "name": "Miss Direction", - "description": "A mapping engine that misguides you", + "description": "A mapping engine that misguides you intentionally. [Visit the project](http://missdirection.example.com).", "highlights": [ - "Won award at AIHacks 2016", - "Built by all women team of newbie programmers", - "Using modern technologies such as GoogleMaps, Chrome Extension and Javascript" + "**Won award** at AIHacks 2016", + "**Built** by an all-women team of newbie programmers", + "**Using** modern technologies such as GoogleMaps, Chrome Extension, and Javascript" ], "keywords": [ "GoogleMaps", @@ -167,7 +167,7 @@ ], "startDate": "2016-08-24", "endDate": "2016-08-24", - "url": "missdirection.example.com", + "url": "http://missdirection.example.com", "roles": [ "Team lead", "Designer" diff --git a/src/pages/Resume.jsx b/src/pages/Resume.jsx index 9ae04c1..532896c 100644 --- a/src/pages/Resume.jsx +++ b/src/pages/Resume.jsx @@ -1,10 +1,10 @@ -/* eslint template-curly-spacing: 0, indent: 0 */ import { Suspense, lazy, useEffect, useState, useRef, useCallback } from 'react'; import { makeStyles } from '@material-ui/core/styles'; import { Drawer } from '@material-ui/core'; import { navigate, useIntl } from 'gatsby-plugin-react-intl'; import { v4 as uuid } from 'uuid'; import { cloneDeep } from 'lodash'; +import { marked } from 'marked'; // Base resume import baseResume from '../store/resume.json'; @@ -46,6 +46,29 @@ const importTemplate = (template) => ) ); +const parseMarkdown = (obj) => { + if (typeof obj !== 'object' || obj === null) { + return obj; + } + + if (Array.isArray(obj)) { + return obj.map((item) => parseMarkdown(item)); + } + + return Object.keys(obj).reduce((acc, key) => { + const value = obj[key]; + if (typeof value === 'string' && ['coverLetter'].includes(key)) { + acc[key] = marked(value); + } else if (typeof value === 'object') { + acc[key] = parseMarkdown(value); + } else { + acc[key] = value; + } + + return acc; + }, {}); +}; + const ResumePage = () => { const intl = useIntl(); const classes = useStyles(); @@ -78,13 +101,16 @@ const ResumePage = () => { __translation__: cloneDeep(toggleableJsonResume.__translation__), }; + // Create a new object with parsed markdown content + const parsedJsonResume = parseMarkdown(jsonResume); + setResumeTemplate([