parent
d8346b424a
commit
0f102e0bc0
3
index.js
3
index.js
|
@ -1,6 +1,7 @@
|
||||||
const fs = require('fs')
|
const fs = require('fs')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const Handlebars = require('handlebars')
|
const Handlebars = require('handlebars')
|
||||||
|
const micromark = require('micromark')
|
||||||
|
|
||||||
const extname = '.hbs'
|
const extname = '.hbs'
|
||||||
const partialsDir = path.join(__dirname, 'partials')
|
const partialsDir = path.join(__dirname, 'partials')
|
||||||
|
@ -30,6 +31,8 @@ Handlebars.registerHelper('join', (arr, separator) =>
|
||||||
arr.join(typeof separator === 'string' ? separator : ', '),
|
arr.join(typeof separator === 'string' ? separator : ', '),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Handlebars.registerHelper('markdown', doc => micromark(doc))
|
||||||
|
|
||||||
exports.render = resume => {
|
exports.render = resume => {
|
||||||
const template = fs.readFileSync(path.join(__dirname, 'resume.hbs'), 'utf-8')
|
const template = fs.readFileSync(path.join(__dirname, 'resume.hbs'), 'utf-8')
|
||||||
const css = fs.readFileSync(path.join(__dirname, 'style.css'), 'utf-8')
|
const css = fs.readFileSync(path.join(__dirname, 'style.css'), 'utf-8')
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -25,7 +25,8 @@
|
||||||
"test": "tap"
|
"test": "tap"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"handlebars": "^4.7.6"
|
"handlebars": "^4.7.6",
|
||||||
|
"micromark": "^2.10.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint": "7.12.0",
|
"eslint": "7.12.0",
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{{#summary}}
|
{{#summary}}
|
||||||
<section id="about">
|
<section id="about">
|
||||||
<h3>About</h3>
|
<h3>About</h3>
|
||||||
<div>
|
<article>
|
||||||
<p>{{.}}</p>
|
{{{markdown .}}}
|
||||||
</div>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
{{/summary}}
|
{{/summary}}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{#summary}}
|
{{#summary}}
|
||||||
<p>{{.}}</p>
|
{{{markdown .}}}
|
||||||
{{/summary}}
|
{{/summary}}
|
||||||
</article>
|
</article>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{#studyType}}
|
{{#studyType}}
|
||||||
<p>{{.}}</p>
|
{{{markdown .}}}
|
||||||
{{/studyType}}
|
{{/studyType}}
|
||||||
{{#if courses.length}}
|
{{#if courses.length}}
|
||||||
<h5>Courses</h5>
|
<h5>Courses</h5>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{#description}}
|
{{#description}}
|
||||||
<p>{{.}}</p>
|
{{{markdown .}}}
|
||||||
{{/description}}
|
{{/description}}
|
||||||
{{#if highlights.length}}
|
{{#if highlights.length}}
|
||||||
<h5>Highlights</h5>
|
<h5>Highlights</h5>
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{#summary}}
|
{{#summary}}
|
||||||
<p>{{.}}</p>
|
{{{markdown .}}}
|
||||||
{{/summary}}
|
{{/summary}}
|
||||||
</article>
|
</article>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{{#each resume.references}}
|
{{#each resume.references}}
|
||||||
{{#if reference}}
|
{{#if reference}}
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>{{reference}}</p>
|
{{{markdown reference}}}
|
||||||
{{#name}}
|
{{#name}}
|
||||||
<p>
|
<p>
|
||||||
<cite>{{.}}</cite>
|
<cite>{{.}}</cite>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{#summary}}
|
{{#summary}}
|
||||||
<p>{{.}}</p>
|
{{{markdown .}}}
|
||||||
{{/summary}}
|
{{/summary}}
|
||||||
{{#if highlights.length}}
|
{{#if highlights.length}}
|
||||||
<h5>Highlights</h5>
|
<h5>Highlights</h5>
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{#summary}}
|
{{#summary}}
|
||||||
<p>{{.}}</p>
|
{{{markdown .}}}
|
||||||
{{/summary}}
|
{{/summary}}
|
||||||
{{#if highlights.length}}
|
{{#if highlights.length}}
|
||||||
<h5>Highlights</h5>
|
<h5>Highlights</h5>
|
||||||
|
|
|
@ -252,9 +252,9 @@ blockquote > * + * {
|
||||||
</section>
|
</section>
|
||||||
<section id="about">
|
<section id="about">
|
||||||
<h3>About</h3>
|
<h3>About</h3>
|
||||||
<div>
|
<article>
|
||||||
<p>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!</p>
|
<p>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!</p>
|
||||||
</div>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
<section id="profiles">
|
<section id="profiles">
|
||||||
<h3>Profiles</h3>
|
<h3>Profiles</h3>
|
||||||
|
|
Loading…
Reference in New Issue