Git Product home page Git Product logo

barraq / pandoc-moderncv Goto Github PK

View Code? Open in Web Editor NEW
151.0 12.0 39.0 2.29 MB

Pandoc-ModernCV is a Pandoc fa­cil­i­ties for type­set­ting mod­ern cur­ricu­lums vi­tae. Inspired by the well known Latex ModernCV, it is fairly cus­tomiz­able, al­low­ing you to use predefined themes and to define your own style by changing colors, fonts, etc.

Home Page: http://barraq.github.io/pandoc-moderncv/

CSS 100.00%

pandoc-moderncv's Introduction

Pandoc-ModernCV provides Pandoc fa­cil­i­ties for type­set­ting modern cur­ricu­lums vi­tae in markdown. Inspired by the well known Latex ModernCV, it is fairly cus­tomiz­able, al­low­ing you to use predefined themes and to define your own style by changing colors, fonts, etc.

With Pandoc-ModernCV simply write your CV in Markdown, compile it and publish it in a snap!

Pandoc-ModernCV currently supports pdf and html5 export formats. The html5 output is responsive and supports rendering for small to large screens.

Features

Writing a CV has never been so simple!

  • write your CV in Markdown
  • choose between themes
  • customize your style
  • export to HTML5
    • responsive layout (mobile, tablet, desktop)
    • print layout
  • export to PDF
    • A4 format ready
    • PDF tags (title, author, etc.)
  • publish public & private CV

Preview & Screenshots

HTML5

Live html5 preview here

Pandoc-ModernCV large-screen preview
Screenshot of the HTML scaffold CV taken for a large screen.
See also medium-screen preview or small-screen preview

PDF

Live pdf preview here

Pandoc-ModernCV PDF export preview
Screenshot of the PDF scaffold CV. Notice the QR-Code

Requirements

For building your CV in html you need:

For exporting your CV to pdf you need:

Installation

Install Compass and Susy:

$ gem install compass
$ gem install susy

Install wkpdf or wkhtmltopdf. If on MacOSX please check Troubleshooting section for installing correctly wkpdf.

Install Pandoc by using your package manager or by using the provided installer http://johnmacfarlane.net/pandoc/installing.html (or using cabal)

Install exiftool by using your package manager (use brew on Mac)

rsync should already be installed... if not, install it using your package manager.

You are done!

Getting Started

The simplest way to get started with pandoc-moderncv is to use the provided scaffold. In a terminal just do:

$ make scaffold
$ make html

What it does it that it creates a scaffold cv located in the /cv directory and builds an html version of it. To open the generated cv just do:

$ open dist/cv.html

To export the CV to pdf just do:

on MacOS X
$ make pdf

on Linux/Windows
$ make pdf HTMLTOPDF=wkhtmltopdf

Hit the link to preview the generated pdf

There you are!

Customize

Metadata

Your CV can be customized with metadata. Metadata are located between two --- separators at the top of the cv.md file and are formated using the YAML format:

---
lang: en
title: Résumé Title
firstname: Firstname
lastname: Lastname
photo: images/picture.png
email: [email protected]
mobile: '+1 (234) 567 890'
address:
  city: City 
  country: Country
settings:
  protect-mobile: true
  protect-email: true
---

put here your *CV* data

Currently Pandoc-MordernCV supports the following metadata:

key type value
lang string en
title string Résumé Title
firstname string Firstname
lastname string Lastname
photo url path/to/photo.png
qrcode url images/qrcode.png
contact url http://contact.yoursite.com
homepage url http://yoursite.com
email email [email protected]
mobile string '+1 (234) 567 890'
phone string '+2 (345) 678 901'
fax string '+3 (456) 789 012'
footer markdown custom markdown text
address map
city string City
country string Country
settings map
protect-email boolean true/false (default: false)
protect-mobile boolean true/false (default: false)
protect-phone boolean true/false (default: false)
protect-fax boolean true/false (default: false)
protect-address boolean true/false (default: false)
display-lastupdate boolean true/false (default: false)

Private & Public CV

It is often handy to hide/show specific informations in your CV depending on where it is published/sent. Pandoc-ModernCV supports public and private cv:

  • when public:
    • protected metadata are removed.
    • cv/public.md is displayed just after the header and before the CV body.
  • when private:
    • protected metadata are displayed.
    • cv/private.md is displayed just after the header and before the CV body.

Protecting Metadata

Currently Pandoc-ModernCV can protect the following metadata:

  • email
  • mobile
  • phone
  • fax
  • address

Metadata can be (un)protected independently as follow:

---
...
settings:
  protect-mobile: true # this protect *mobile*
  protect-email: false # this unprotect *email*
---

Building Private/Public CV

To build a public CV just do:

$ make html public-cv=true
or
$ make pdf public-cv=true

To build a private CV just do:

$ make html private-cv=true
or
$ make pdf private-cv=true

Themes

Currently pandoc-moderncv supports a single theme: classic.

Feel free to contribute and send me your custom theme!

Colors, Fonts, Icons

All themes can be customized through variables defined in stylesheets/_settings.scss. Currently the variables are:

$base-font-size: 18px;
$base-line-height: 23px;

$photo-width: 182px;
$qrcode-width: 100px;

// Size
$h1-font-size:      $base-font-size*2;
$h1-line-multiple:  2;
$h2-font-size:      $base-font-size*1.5;
$h2-line-multiple:  1.5;
$h3-font-size:      $base-font-size*1.2;
$h3-line-multiple:  1;

// Colors
$firstname-color: rgb(0, 0, 0);
$familyname-color: rgb(0, 0, 0);
$title-color: rgb(89, 89, 89);
$address-color: rgb(0, 0, 0);
$quote-color: rgb(0, 0, 0);
$section-rectangle-color: rgb(191, 191, 191);
$section-title-color: rgb(89, 89, 89);
$subsection-color: rgb(0, 0, 0);
$hint-color: rgb(0, 0, 0);

// Icons
$external-link-icon: $fa-var-external-link;
$email-icon: $fa-var-envelope-o;
$phone-icon: $fa-var-phone;
$mobile-icon: $fa-var-mobile;
$fax-icon: $fa-var-print;

Troubleshooting

Cannot load such file -- sass/script/node (LoadError)

For some reasons there is a bug when installing the latest version of Compass... your install of Sass get messed up (I didn't have time to investigate: if you have a better workaround/explanation let me know).

To get over it just uninstall sass and install it again:

$ gem uninstall sass
$ gem install sass

Cannot load RubyCocoa library

When trying to install wkpdf on MacOsx you may be told that wkpdf requires that RubyCocoa is installed... The fact is that using wkpdf with non-default Ruby installations is not supported.

You must install wkpdf with the native ruby packaged on your mac:

You can use rvm or simply do:

$ sudo /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/gem install wkpdf

To check if your install is correct be sure that the first line of /usr/bin/wkpdf file looks like the following:

#!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

pandoc-moderncv's People

Contributors

barraq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pandoc-moderncv's Issues

Information about export to LibreOffice Writer, MS Word and RTF

In the readme file following infomation is included:

Pandoc-ModernCV currently supports pdf and html5 export formats

However, I wonder if support for other output formats might be added / will be included / what are the plans.
Correct me if I am wrong, but it should be possible to convert html documents into LibreOffice Writer, MS Word and RTF using pandoc?

Use biblatex to filter references

Hello,

Firstly, thanks for this great project :)

I am designing my CV, and since I work in a research context, I want to embed my own references within a specific section. Biblatex, which seems to be the best solution for it, as it is able to filter references from a .bib file, relies on latex.

I need to add some rules in the .tex header to set the biblatex filters (see this example).
As far as I understood (but my knowledge is limited), pandoc-moderncv does not rely on a latex template.

Any ideas?

sass conflict between susy and compass

I get an error when I issue make html, see below, may be due to different sass versions that get installed when installing susy and compass.

$ make html
rsync -rupE fonts dist
rsync -rupE cv/images dist
compass compile \
          --require susy \
          --sass-dir stylesheets \
          --javascripts-dir javascripts \
          --css-dir dist/stylesheets \
          --image-dir cv/images \
          stylesheets/style.scss
Gem::LoadError on line ["1637"] of /usr/lib/ruby/1.9.1/rubygems/specification.rb: Unable to activate susy-2.1.3, because sass-3.2.19 conflicts with sass (< 3.5, >= 3.3.0)
Run with --trace to see the full backtrace
make: *** [style] Error 1

No use in uninstalling either version of sass, as either compass or susy depend on them:
compass-0.12.7 depends on [sass (~> 3.2.19)]
susy-2.1.3 depends on [sass (< 3.5, >= 3.3.0)]

Create page break in PDF

I started to create a cv based on these styles and technique. However, my cv ended up such that it looked a bit "unprofessional" because in the end of one page there was just a title and one line of text, which continued in the next page. I wanted to create a page break so that the title would start in the next page. I don't know much about CSS or generating PDFs, but after some experimentation I found one solution which worked. In style.scss I inserted this:

@media print {
    .page-breaker { display: block; page-break-before: always;}
}

It's possible to insert HTML in a Markdown file, so in my Markdown cv I inserted this:

## Section 1

Some text.

</section>
   <div class="page-breaker"></div>
<section>

## Section 2

More text.

It seems to work. That page break div didn't work inside "sections", so I had to close and start a section in that snippet. Does anyone know if there's a prettier way to create a page break in pdf?

Adding support for setting pdf tags

Currently PDF generation does not handle PDF Tags. It would be nice to set PDF Tags based on CV metadata such as title, author, etc...

exiftool can be an option to do so.

Allow hiding address in private CV

with the current version of Pandoc (1.12.3.3) there is a limitation (jgm/pandoc#1133) that prevents template's condition to work with meta attribute containing YAML objects. This was fixed with jgm/pandoc@3126b00.

As soon a a new stable version integrate this fix, hiding address will be allowed for private CV.

Add date variable

In order to display in the CV when it was updated we need to set the date variable from the makefile before building parts.

issue with awsome fonts and photo size

Hi Barraq, today I downloaded your beautiful modern cv but I had two issues. One is I could not resize the photo by adjusting photo-width specified in _settings.scss ( I could successfully resize the qrcode though). Another issue is that wkhtmltopdf cannot print the awesome font icons, e.g. the email and linkedin icons. Could you please offer some help here? Thanks!

Sass error on 'make html'

I get this error message upon running 'make html':

$ make html
mkdir build
mkdir dist
rsync -rupE fonts dist
rsync -rupE cv/images dist
compass compile \
      --require susy \
      --sass-dir stylesheets \
      --javascripts-dir javascripts \
      --css-dir dist/stylesheets \
      --image-dir cv/images \
      stylesheets/style.scss
directory dist/stylesheets/
    error stylesheets/style.scss (Line 17: Mixin container takes 1 argument but 6 were passed.)
   create dist/stylesheets/style.css
make: *** [style] Error 1

If I run 'make html' again, the error does not appear, but the cv.html file does not have CSS and has the sass error message at the top.

Gem list:

$ gem list
*** LOCAL GEMS ***

bigdecimal (1.2.0)
CFPropertyList (2.2.0)
chunky_png (1.3.1)
compass (1.0.0.alpha.20)
compass-core (1.0.0.alpha.20)
compass-import-once (1.0.4)
ffi (1.9.3)
fssm (0.2.10)
io-console (0.4.2)
json (1.7.7)
libxml-ruby (2.6.0)
mime-types (2.0)
minitest (4.3.2)
multi_json (1.10.1)
nokogiri (1.5.6)
psych (2.0.0)
rake (0.9.6)
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
rdoc (4.0.0)
sass (3.3.9, 3.2.19)
sqlite3 (1.3.7)
susy (2.1.2)
test-unit (2.0.0.0)

I had to do 'gem install compass --pre' to fix sass version conflict error messages originally when I ran 'make html'. Is there any more info you need?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.