Skip to content

Commit 282359e

Browse files
committed
order PDF sections using the same metadata as the site
1 parent 2c6964a commit 282359e

File tree

15 files changed

+87
-12
lines changed

15 files changed

+87
-12
lines changed

.github/workflows/deploy-develop.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ jobs:
4848
run: |
4949
curl -L https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb > wkhtmltopdf.deb
5050
sudo apt-get install ./wkhtmltopdf.deb
51+
- name: Install Python dependencies
52+
run: pip install -r requirements-ci.txt
5153

5254
- name: Build all pdfs
5355
run: npm run pdf:build-all-ci

.github/workflows/deploy-main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
run: |
5151
curl -L https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb > wkhtmltopdf.deb
5252
sudo apt-get install ./wkhtmltopdf.deb
53+
- name: Install Python dependencies
54+
run: pip install -r requirements-ci.txt
5355

5456
- name: Build all pdfs
5557
run: npm run pdf:build-all-ci

docker/images/Dockerfile.pdf-builder

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ARG WKHTML_TO_PDF_DEB=wkhtmltox_${WKHTML_TO_PDF_VERSION}-1.focal_amd64.deb
77

88
RUN apt-get update && apt-get install --no-install-recommends -y \
99
python3 \
10+
python3-pip \
1011
wget \
1112
&& apt-get clean \
1213
&& rm -rf /var/lib/apt/lists/*
@@ -25,3 +26,7 @@ RUN wget --quiet --no-check-certificate -P /tmp https://github.com/wkhtmltopdf/p
2526
&& apt-get clean \
2627
&& rm -rf /var/lib/apt/lists/* \
2728
&& rm -rf /tmp/*
29+
30+
# Install python dependencies
31+
COPY requirements-ci.txt .
32+
RUN pip install --no-cache-dir -r requirements-ci.txt

requirements-ci.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
python-frontmatter
2+

requirements-ci.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# This file is autogenerated by pip-compile with python 3.10
3+
# To update, run:
4+
#
5+
# pip-compile requirements-ci.in
6+
#
7+
python-frontmatter==1.0.0
8+
# via -r requirements-ci.in
9+
pyyaml==6.0
10+
# via python-frontmatter

requirements.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
pdftotext
22
pip-tools
33
pytest
4+
python-frontmatter

requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# This file is autogenerated by pip-compile
2+
# This file is autogenerated by pip-compile with python 3.10
33
# To update, run:
44
#
55
# pip-compile
@@ -26,6 +26,10 @@ pyparsing==2.4.7
2626
# via packaging
2727
pytest==6.2.4
2828
# via -r requirements.in
29+
python-frontmatter==1.0.0
30+
# via -r requirements.in
31+
pyyaml==6.0
32+
# via python-frontmatter
2933
toml==0.10.2
3034
# via pytest
3135
tomli==1.0.4

scripts/pdf/__tests__/combine_mdx/expected.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
### Heading 2
1010

11-
### Heading 3
11+
#### Heading 3
1212

13-
#### Heading 4
13+
##### Heading 4
1414

1515

1616
---
@@ -23,7 +23,7 @@
2323

2424
### Heading 2
2525

26-
### Heading 3
26+
#### Heading 3
2727

28-
#### Heading 4
28+
##### Heading 4
2929

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: 'Title'
3+
---
4+
5+
# Title
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
title: 'Title'
3+
---
4+
5+
# Title

0 commit comments

Comments
 (0)