add Makefile, update to require enable local file access
This commit is contained in:
parent
e8f87ba5a8
commit
463242a068
2 changed files with 19 additions and 34 deletions
2
Makefile
Normal file
2
Makefile
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
pdf:
|
||||||
|
pandoc resume.md -f markdown -t pdf --pdf-engine-opt="--enable-local-file-access" --pdf-engine=wkhtmltopdf -c resume-stylesheet.css -s -o resume.pdf
|
51
README.md
51
README.md
|
@ -11,57 +11,40 @@ The inspiration for this project came from my need to look for a job, my need to
|
||||||
|
|
||||||
I modified the CSS for my taste, and noticed that some of the documentation needed to be updated.
|
I modified the CSS for my taste, and noticed that some of the documentation needed to be updated.
|
||||||
|
|
||||||
Since Sonya's post is nearly five years old, there have been many changes to the command line utilities that she used, so I've updated this README to reflect those changes.
|
Since Sonya's post is nearly five years old, there have been many changes to the command line utilities that she used, so I've updated this README to reflect those changes.
|
||||||
|
|
||||||
# Workflow
|
# Workflow
|
||||||
|
|
||||||
The workflow is pretty simple.
|
The workflow is pretty simple.
|
||||||
|
|
||||||
1. Edit the resume.md file.
|
1. Edit the resume.md file.
|
||||||
1. Run pandoc to convert the Markdown file to HTML. OR
|
1. Run pandoc to convert the Markdown file to HTML. OR
|
||||||
1. Run pandoc to convert the Markdown file into a PDF.
|
1. Run pandoc to convert the Markdown file into a PDF.
|
||||||
|
|
||||||
|
```sh
|
||||||
The big difference between Sonya's workflow is that if you want, you can convert from MD -> PDF in one step, rather than two. You can still go from MD -> HTML -> PDF, but if you don't want to have an HTML file, you don't have to.
|
# On macOS
|
||||||
|
brew install pandoc wkhtmltopdf
|
||||||
I also don't feel like supporting/using Microsoft Word, so I'm not even trying to output to .docx.
|
# On Linux (ubuntu/debian)
|
||||||
|
sudo apt install pandoc wkhtmltopdf
|
||||||
|
|
||||||
# Updated instructions for a Mac .. or 2021
|
|
||||||
A lot has changed since Sonya wrote her blog post and shared her workflow, so here are some updates on how to get started and building/updating your own resume.
|
|
||||||
|
|
||||||
# Pre-Requisites.
|
|
||||||
## [Pandoc](https://pandoc.org) a universal document converter.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
brew install pandoc
|
|
||||||
```
|
|
||||||
|
|
||||||
## [Wkhtmltopdf](https://wkhtmltopdf.org)
|
|
||||||
```
|
|
||||||
brew install wkhtmltopdf
|
|
||||||
```
|
|
||||||
|
|
||||||
## Markdown to HTML
|
|
||||||
```
|
|
||||||
pandoc resume.md -f markdown -t html -c resume-stylesheet.css -s -o resume.html
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Markdown to PDF
|
## Markdown to PDF
|
||||||
|
|
||||||
|
```sh
|
||||||
|
make
|
||||||
|
# or...
|
||||||
|
pandoc resume.md -f markdown -t pdf --pdf-engine-opt="--enable-local-file-access" --pdf-engine=wkhtmltopdf -c resume-stylesheet.css -s -o resume.pdf
|
||||||
```
|
```
|
||||||
pandoc resume.md -f markdown -t pdf --pdf-engine=wkhtmltopdf -c resume-stylesheet.css -s -o resume.pdf
|
|
||||||
|
## Markdown to HTML
|
||||||
|
```sh
|
||||||
|
pandoc resume.md -f markdown -t html -c resume-stylesheet.css -s -o resume.html
|
||||||
```
|
```
|
||||||
|
|
||||||
## HTML to PDF
|
## HTML to PDF
|
||||||
|
|
||||||
If you want to convert from HTML to PDF for some reason, you'll need to add a switch to wkhtmltopdf so that it works properly.
|
If you want to convert from HTML to PDF for some reason, you'll need to add a switch to wkhtmltopdf so that it works properly.
|
||||||
|
|
||||||
```
|
```sh
|
||||||
wkhtmltopdf --enable-local-file-access resume.html resume.pdf
|
wkhtmltopdf --enable-local-file-access resume.html resume.pdf
|
||||||
```
|
```
|
||||||
|
|
||||||
# TODO
|
|
||||||
- [x] [github action](https://github.com/pandoc/pandoc-action-example) will run and create the HTML and PDF file automatically.
|
|
||||||
- [ ] the Author field in the PDF, it seems to not work when the pdf-engine is set to wkhtmltopdf
|
|
||||||
- [ ] make a release or a package?
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue