• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

bitlyfied/markdown-cv

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

bitlyfied/markdown-cv

开源软件地址(OpenSource Url):

https://github.com/bitlyfied/markdown-cv

开源编程语言(OpenSource Language):

Ruby 100.0%

开源软件介绍(OpenSource Introduction):

Markdown CV

Markdown CV is an attempt to write CVs using Markdown syntax, versioned using Git, automatically built into PDFs.

Warning: I wrote this code just for my personal use. Feel free to use it, but don't expect it to be well tested or even near to a beta version.

I wrote a blog post about why I wrote it: http://bitlyfied.com/2013/03/14/markdown-cv/

Install

Install GEM dependencies:

bundle install

Install wkhtmltopdf

I had issues with version 0.11, so I'd suggest to use 0.10. You can download it from here: http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-OSX-0.10.0_rc2-static.tar.bz2 Then create a symlink into your /usr/local/bin so that PDFKit can access it.

Build

To generate PDF you just need to use rake:

rake build

Or, if you want to build and display the PDF in a single command, just use:

rake

Use

Put your CVs in the src folder. All files *.md are built by the rake task. You can use the one provided as an example.

The build task is a three step process:

  • convert Mardown to HTML
  • render content inside a styled HTML template
  • convert the HTML file to PDF using wkhtmltopdf

To tweak the style of the CV you can change the template/base.css file with your own font and style.

Enriched Markdown

Markdown CV is using Github-flavoured Markdown, and on top of that it's adding an extra feature. You can mark blocks of content with the following syntax:

[myblock]

** Some content

[/myblock]

The build process will replace [myblock] with <div class="myblock">

You can use this functionality to create asides and content formatted in a special way.

Page breaks

Markdown has no knowledge of pages or page breaks. But you can use page-break- CSS to control them.

You can tackle the issue in two different ways.

  • specifically request page breaks where needed (not recommended)
  • define places where you don't want a page break, and let the normal flow find the right spots

For the first method, you could use custom tags in your markdown like this:

[page-break/]

Then you just need to add some CSS like this:

div.page-break{
	page-break-after:always;
}

My preferred approach is to let the content flow naturally between pages, and only avoid page breaks where they shouldn't be. The CV provided as example uses this trick.

[block]

** Some content here
	
[/block]

Then this line of CSS ensure everything in the block will hang together:

p, li, .block, .aside{
	page-break-inside:avoid;
}



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap