Skip to content

Commit 7e56237

Browse files
Merge pull request #238 from adamtheturtle/add-pdf
Try to fix sample build
2 parents 1c29f80 + 285ccff commit 7e56237

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
*.pdf filter=lfs diff=lfs merge=lfs -text
12
*.png filter=lfs diff=lfs merge=lfs -text
23
*.jpg filter=lfs diff=lfs merge=lfs -text
34
*.jpeg filter=lfs diff=lfs merge=lfs -text

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
- name: Build sample
3535
run: |
36-
uv run --extra=dev --python=${{ matrix.python-version }} sphinx-build -W -b notion sample/ build-sample/
36+
uv run --extra=sample --python=${{ matrix.python-version }} sphinx-build -W -b notion sample/ build-sample/
3737
3838
- name: Run lint
3939
run: |

.github/workflows/publish-notion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Build documentation
2626
run: |
2727
rm -rf ./build-sample
28-
uv run sphinx-build -W -b notion sample ./build-sample
28+
uv run --extra=sample sphinx-build -W -b notion sample ./build-sample
2929
3030
- name: Publish to Notion
3131
run: |

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ repos:
301301

302302
- id: linkcheck
303303
name: linkcheck
304-
entry: uv run sphinx-build -W -b linkcheck sample build-sample/
304+
entry: uv run --extra=sample sphinx-build -W -b linkcheck sample build-sample/
305305
language: python
306306
types_or: [rst]
307307
stages: [manual]
@@ -310,7 +310,7 @@ repos:
310310

311311
- id: spelling
312312
name: spelling
313-
entry: uv run sphinx-build -W -b spelling sample build-sample/
313+
entry: uv run --extra=sample sphinx-build -W -b spelling sample build-sample/
314314
language: python
315315
types_or: [rst]
316316
stages: [manual]
@@ -319,15 +319,15 @@ repos:
319319

320320
- id: docs
321321
name: Build Documentation
322-
entry: uv run sphinx-build -W -b notion sample build-sample/notion
322+
entry: uv run --extra=sample sphinx-build -W -b notion sample build-sample/notion
323323
language: python
324324
stages: [manual]
325325
pass_filenames: false
326326
additional_dependencies: [uv==0.6.3]
327327

328328
- id: docs-as-html
329329
name: Build Documentation as HTML
330-
entry: uv run sphinx-build -W -b html sample build-sample/html
330+
entry: uv run --extra=sample sphinx-build -W -b html sample build-sample/html
331331
language: python
332332
stages: [manual]
333333
pass_filenames: false

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,17 @@ optional-dependencies.dev = [
7272
"shfmt-py==3.12.0.2",
7373
"sphinx-lint==1.0.0",
7474
"sphinx-pyproject==0.3.0",
75-
"sphinx-simplepdf==1.6.0",
7675
"sphinx-substitution-extensions==2025.6.6",
7776
"sphinxcontrib-spelling==8.0.1",
7877
"types-docutils==0.22.2.20250924",
7978
"vulture==2.14",
8079
"yamlfix==1.18.0",
8180
]
8281
optional-dependencies.release = [ "check-wheel-contents==0.6.3" ]
82+
optional-dependencies.sample = [
83+
# Needed for PDF support in the sample for HTML only.
84+
"sphinx-simplepdf==1.6.0",
85+
]
8386
urls.Source = "https://github.com/adamtheturtle/sphinx-notionbuilder"
8487

8588
scripts.notion-upload = "_notion_scripts.upload:main"
@@ -315,6 +318,7 @@ ignore = [
315318
pep621_dev_dependency_groups = [
316319
"dev",
317320
"release",
321+
"sample",
318322
]
319323

320324
[tool.pyproject-fmt]

sample/_static/test.pdf

128 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)