add Makefile, update to require enable local file access

This commit is contained in:
Ava Gaiety W 2025-03-27 16:54:00 -06:00
parent e8f87ba5a8
commit 463242a068
2 changed files with 19 additions and 34 deletions

2
Makefile Normal file
View 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

View file

@ -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.
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
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 into a PDF.
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.
I also don't feel like supporting/using Microsoft Word, so I'm not even trying to output to .docx.
# 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
```sh
# On macOS
brew install pandoc wkhtmltopdf
# On Linux (ubuntu/debian)
sudo apt install pandoc wkhtmltopdf
```
## 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
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
```
# 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?