Skip to content

Commit 7cad098

Browse files
author
jon gadsden
committed
fixup image paths for PDF and ePub
1 parent 3e2fe94 commit 7cad098

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
args: >-
6969
--from=markdown
7070
--output=publish/OWASP_Developer_Guide.draft.pdf
71-
--resource-path="draft/assets/images:draft"
71+
--resource-path="draft/assets/images:draft/assets:draft"
7272
draft/title.pdf.yaml
7373
draft.markdown
7474
@@ -78,7 +78,7 @@ jobs:
7878
args: >-
7979
--from=markdown
8080
--output=publish/OWASP_Developer_Guide.draft.epub
81-
--resource-path="draft/assets/images:draft"
81+
--resource-path="draft/assets/images:draft/assets:draft"
8282
draft/title.yaml
8383
draft.markdown
8484

.lycheeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ https://mvnrepository.com/artifact/org.owasp.esapi/esapi
1919
# do not harass dockerhub
2020
https://hub.docker.com/r/owasp/threat-dragon/tags
2121
https://hub.docker.com/r/webgoat/webgoat
22+
23+
# lychee gets confused with the Jekyl image paths
24+
www-project-developer-guide/assets/images/sdlc_diag.png
25+
www-project-developer-guide/assets/images/owasp-wayfinder.png

.markdownlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ link-fragments: false
66

77
# MD013 - Line length
88
MD013:
9-
code_block_line_length: 120
9+
code_block_line_length: 125
1010
code_blocks: true
1111
heading_line_length: 80
1212
headings: true

contributing.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,13 @@ To run these checks locally before pushing a commit, run these commands from the
8080
1. Link checker: `lychee --max-retries 5 --exclude-path './_includes/*.html' './**/*.md'`
8181
2. Markdown linter: `markdownlint-cli2 **/*.md`
8282
3. Spell checker: `pyspelling --config .spellcheck.yaml`
83-
4. PDF and ePub:
84-
1. `tail -n +14 -q $(find draft -name "*[0-9]*.md") > draft.markdown`
85-
2. `pandoc -f markdown -o draft.pdf --resource-path="draft/assets/images:draft" draft/title.pdf.yaml draft.markdown`
86-
3. `pandoc -f markdown -o draft.epub --resource-path="draft/assets/images:draft" draft/title.yaml draft.markdown`
83+
4. commands to create PDF and ePub outputs:
84+
85+
```text
86+
tail -n +14 -q $(find draft -name "*[0-9]*.md") > draft.markdown
87+
pandoc -f markdown -o draft.pdf --resource-path="draft/assets/images:draft/assets:draft" draft/title.pdf.yaml draft.markdown
88+
pandoc -f markdown -o draft.epub --resource-path="draft/assets/images:draft/assets:draft" draft/title.yaml draft.markdown
89+
```
8790

8891
Follow instructions to install the command line [lychee][lychee-install] and [pandoc][pandoc-install].
8992

0 commit comments

Comments
 (0)