Skip to content

Commit

Permalink
Update README with info on adding custom icons.
Browse files Browse the repository at this point in the history
  • Loading branch information
prat0318 committed Aug 14, 2014
1 parent 5ea5755 commit 2d0c79d
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,34 @@ Modify it as per the needs, and remove or keep rest of the fields empty.
$ json_resume convert prateek_cv.json
```

A directory `resume/` will be generated in cwd, which can be put hosted on /var/www or on github pages. ([Sample](http://prat0318.github.io/index1.html))
A directory `resume/` will be generated in cwd, which can be put hosted on /var/www or on github pages. ([Sample](http://prat0318.github.io/json_resume/html_version/resume_with_icons/))


* HTML\* version

`html` version without icons can be generated by giving `icons` as `false` : ([Sample](http://prat0318.github.io/index2.html))
`html` version without icons can be generated by giving `icons` as `false` : ([Sample](http://prat0318.github.io/json_resume/html_version/resume_without_icons/))

```
"settings": {
"icons" : false
},
```

* PDF version from HTML ([Sample](http://prat0318.github.io/public/resume.pdf))
* PDF version from HTML ([Sample](http://prat0318.github.io/json_resume/html_version/resume_with_icons/resume.pdf))

```
$ json_resume convert --out=html_pdf prateek_cv.json
```

* LaTeX version ([Sample](https://www.writelatex.com/read/zkkbznbkfkgq))
* LaTeX version ([Sample](https://www.writelatex.com/read/ynhgbrnmtrbw))

```
$ json_resume convert --out=tex prateek_cv.json
```
- LaTex also includes a ``classic`` theme. Usage: ``--theme=classic``.

* PDF version from LaTeX ([Sample](https://www.writelatex.com/read/zkkbznbkfkgq))
LaTex also includes a ``classic`` theme. Usage: ``--theme=classic`` ([Sample](https://www.writelatex.com/read/xscbhfpxwkqh)).

* PDF version from LaTeX ([Sample](https://www.writelatex.com/read/ynhgbrnmtrbw))

```
$ json_resume convert --out=tex_pdf prateek_cv.json
Expand Down Expand Up @@ -91,23 +92,18 @@ JSON is parsed as per the `markdown` standards. This implies all this works-
- \[[href](#)\]\(#\),
- <<[http://github.com](http://github.com)>>

## FAQs

* I get the following error during `convert` :

```
Error:
Generating the html type...
/Users/myMac/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `encode': "\xE2" on US-ASCII (Encoding::InvalidByteSequenceError)
from /Users/abhiramk/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `initialize'
from /Users/abhiramk/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/gems/2.0.0/gems/json-1.8.1/lib/json/common.rb:155:in `new'
```

Looks like locale problem. Add the following to the environment : `export LC_CTYPE=en_US.UTF-8` ( Thanks to [@viswamitra](https://github.com/viswamitra) )

## Customization

Output is creating using mustache templates. They are located in `templates/`. These can be modified and given as `--template=/path/to/template` to `convert`. For example, the tex template was customized to produced [this new format](https://www.writelatex.com/read/tktqrbmhnyqp).
#### Mustache Templates
* Output is created using mustache templates. They are located in `templates/`. These can be modified and given as `--template=/path/to/template` to `convert`.

#### Adding your own icons to json_resume
1. Download the svg(s) you would like to use from a site like [IcoMoon](https://icomoon.io/app/) or [IconFinder](https://www.iconfinder.com) and chose size as 16X16.
2. Download the official ``json_resume`` svgs from [the json_resume_icon repo zip](https://github.com/NoahHines/json_resume_icons/archive/master.zip). Unzip it, svgs are present in `/SVG`.
3. Drag all svgs (including yours) onto the [grumpicon](http://www.grumpicon.com/) and then "downlode it".
4. Drag all the files (``.css`` and ``.png``) from the ``grunticon`` folder into your local ``json_resume`` gem's folder ``json_resume-1.X.X/extras/resume_html/public/css/``, replacing existing files ([Read this](http://stackoverflow.com/questions/2827496/where-are-my-ruby-gems) to find your gem's location in your machine).
5. Modify your HTML [mustache template](#mustache-templates) to include your icons. Specifically, edit the ``div`` class in the template to include your new grunticon (```<div class="icon-user icon-square">```, where "user" is the SVG name). You can also check grunticon's generated ``preview.html`` file to verify the icon class name.
6. Run ``json_resume convert --template=/path/to/template <json>``, and you should be able to see the changes in the generated HTML. Also, steps 1-5 are to be done just once and the icons will be stored within your local gem.

## Changelog

Expand Down

0 comments on commit 2d0c79d

Please sign in to comment.