diff --git a/src/converters/rxresume-to-jsonresume.js b/src/converters/rxresume-to-jsonresume.js index 7230de0..a91f44e 100644 --- a/src/converters/rxresume-to-jsonresume.js +++ b/src/converters/rxresume-to-jsonresume.js @@ -102,6 +102,16 @@ const conversionMap = { "endDate": 'date.end', "summary": 'summary', }, + + // custom section + sideProjects: { + 'name': 'title', + 'url': 'url', + 'description': 'summary', + 'keywords': 'keywords', + "startDate": 'date.start', + "endDate": 'date.end', + } } // convert function @@ -214,6 +224,20 @@ function convert(source) { formatDatesInResult(result) }) + /* custom sections */ + const sideProjectsSectionNames = ['side-projects', 'open-source'] + for (const section of Object.values(sections)) { + if (section.type !== 'custom') continue + + const sectionName = section.name.toLowerCase() + if (!sideProjectsSectionNames.includes(sectionName)) continue + + result.sideProjects = section.items.map(item => convertObject(item, conversionMap.sideProjects, (item, result) => { + formatDatesInResult(result) + })) + break + } + return result } diff --git a/src/templates/reorx/index.ejs b/src/templates/reorx/index.ejs index 2405b0d..81279bf 100644 --- a/src/templates/reorx/index.ejs +++ b/src/templates/reorx/index.ejs @@ -6,6 +6,7 @@ +<% if (locals.education) { %>

Educations

<% for (const item of education) { %> @@ -18,8 +19,10 @@ <% } %>
+<% } %> +<% if (locals.work) { %>

Work

<% for (const item of work) { %> @@ -37,13 +40,16 @@ <% } %>
+<% } %> +<% if (locals.projects) { %>

Projects

<% for (const item of projects) { %>

<%= item.name %>

+

<%= item.url %>

<%= item.description %>

<%= item.startDate %> - <%= item.endDate %>

@@ -59,13 +65,30 @@
<% } %>
+<% } %> +<% if (locals.sideProjects) { %>

Side-projects

+ <% for (const item of sideProjects) { %> +
+

<%= item.name %>

+

<%= item.url %>

+

<%= item.description %>

+

<%= item.startDate %> - <%= item.endDate %>

+
+ <% for (const kw of item.keywords) { %> + <%= kw %> + <% } %> +
+
+ <% } %>
+<% } %> +<% if (locals.skills) { %>

Skills

<% for (const item of skills) { %> @@ -80,8 +103,10 @@ <% } %>
+<% } %> +<% if (locals.languages) { %>

Languages

<% for (const item of languages) { %> @@ -91,3 +116,4 @@ <% } %>
+<% } %>