Turn a simple markdown document into a resume in HTML and PDF

  • By Brian Hann
  • Last update: Nov 17, 2022
  • Comments: 11

markdown-resume.js Build Status Coverage Status

Turn a simple markdown document into a resume in HTML and PDF.

Features

  • PDF generation via wkhtmltopdf
  • Responsive design for multiple device viewport sizes
  • Simple Markdown formatting

Quickstart

The generated files will be put in the same directory as your source file.

# For usage on the command line
npm install -g markdown-resume

# Generate HTML file
md2resume my-resume-file.md

# Generate PDF file
md2resume --pdf my-resume-file.md

Running with docker

# Build a docker image
docker build -t md2resume .

# In the directory where your resume is, run the container
docker run -v $PWD:/src md2resume resume.md

# You can also generate the pdf format
docker run -v $PWD:/src md2resume -pdf resume.md

Run in Watch Mode w/ Live Reload

npm install -g light-server
light-server -s . -w "your_resume.md # md2resume your_resume.md"

Open http://localhost:4000/your_resume.html in a browser and see changes live.

Use as a node module

var md2resume = require('markdown-resume')

# Generate HTML
md2resume('my-resume-file.md', 'default')
.then(html)
    # ... do something with html
});

Acknowledgments

As above, this library steals pretty much everything from markdown-resume.

Github

https://github.com/c0bra/markdown-resume-js

Comments(11)

  • 1

    Create a WikiPage with an example

    I'd like to use this project for my resume, but the example of the there4 blog doesn't produce the desired result.

    E.g: I get Profile {#profile} as headings instead of the proper ones

    I'd love to see an example in the wiki pages or possibly in the sources.
    Thanks for your efforts!

  • 2

    change some style of standard template

    Hi, thanks for the beautiful theme, I found there is no styling for h4 tag, and also, the list was not cleaning float, so I update some styling for these, and also I make the font smaller to print the PDF pages as less as possible.

  • 3

    #footer no longer

    footer

    Just redeployed on another box and noticed that the #footer tag no longer works as intended.

    in.md #footer

    out.html <p>#footer</p> instead of <h1 id="footer">footer</h1>

  • 4

    Rewrite with promises and new structure and tests!

    ...and other things.

    Hey @c0bra, I've been using this library for a while but at one point the API broke while I was working on my resume, so I decided to rewrite everything with tests and what not. Since then I've gotten a job so my commits are pretty sporadic as you can see - but GitHub's new squash + merge feature should play well here! đŸ˜¸

    If you don't want to manage this library any more, I'd love to take it over and continue pushing updates; my npm username is jakxz. In any case thank you so much for writing & porting it in the first place. đŸ™Œ

  • 5

    How to use Templates?

    How do I use template option with this a la the original PHP script?

    md2resume --template modern test.md throws an error like Error: ENOENT, no such file or directory 'modern'

  • 6

    Interested in refactoring?

    The php version of markdown-resume allows for separate templates (as directories) rather than as a single file. This version does not, so I forked and refactored to allow for this.

    Additionally, I got rid of stylus and sqwish and replaced it with pure less.

    The expected template layout is a bit different than the php version, but it takes very little work to adapt them to work.

    Would you be interested in merging these changes with your project? You can check out my branch here: https://github.com/dremonkey/markdown-resume-js/tree/refactored

    Usage is basically the same except that the -t option points to a directory now rather than a file, i.e. node bin/md2resume test/resume.md -t templates/modern

  • 7

    display error messages which occured while generating html resume

    I experienced some errors generating an html resume and noticed that it was failing silently. I added the same error handling(display error, exit) to match the pdf version.

  • 8

    New Template, 'blockish'

    I added a new template to the original project, thought you might be interested. The pdf version of the one called blockish isn't quite perfect yet, but it's getting there.

  • 9

    Adding dockerfile and instructions to build resume in html and pdf

    Hej there,

    I don't have node and all this stuff installed, but I liked the way you convert your resume, so I build a small docker image to do that and I think that some other people would also like to use it.

  • 10

    adjusts panel widths to avoid text overlap

    screenshot of my html/pdf output: 1 It's likely that someone else might use a large word like I did. I adjusted the column widths slightly to hopefully avoid more of these problems in the future.

    screenshot after this commit: 2

  • 11

    How to add templates from markdown-resume project?

    I copied the blockish folder into ~/.nvm/versions/node/v14.17.5/lib/node_modules/markdown-resume/templates and I run md2resume --html --template blockish oren.md. Here is the error I see:

    ENOENT: no such file or directory, open '/home/oren/.nvm/versions/node/v14.17.5/lib/node_modules/markdown-resume/templates/blockish/assets/less/resume.less'
    

    Is there a repository of templates that are compatible with markdown-resume-js?