Skip to content

Commit

Permalink
Update convert.sh and add designdoc to test
Browse files Browse the repository at this point in the history
  • Loading branch information
reijoh committed Apr 10, 2024
1 parent c4d13ad commit 900595d
Show file tree
Hide file tree
Showing 8 changed files with 764 additions and 77 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-manual.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ jobs:
# if: ${{ matrix.stack != 'static' }}
# run: make test-extra

#- name: Publish test output
# uses: actions/upload-artifact@ef09cdac3e2d3e60d8ccadda691f4f1cec5035cb #v4.3.1 + 3 commits
# with:
# if-no-files-found: error
# name: tests
# retention-days: 3
# path: ${{ github.workspace }}/alpine/freeze/pandoc-3.1.13.project.freeze

- name: Log into ghcr.io
if: >
github.event_name != 'pull_request' &&
Expand Down
34 changes: 31 additions & 3 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,19 +185,47 @@ $(code_targets): output/code-highlight-%.pdf: code-highlight.md
#
EXTRA_CMD = docker run --rm \
-v $(test_files_path):/data \
--entrypoint /usr/local/bin/pandoc \
--entrypoint /.pandoc/tools/convert.sh \
$(IMAGE) \
--fail-if-warnings

CONVERT_CMD = docker run --rm \
-v $(test_files_path):/data \
--entrypoint /.pandoc/tools/convert.sh \
$(IMAGE) \
--fail-if-warnings

.PHONY: test-extra
test-extra: output/eisvogel.pdf #output/beamertheme-metropolis.pdf
test-extra: output/eisvogel.pdf output/designdoc.pdf #output/beamertheme-metropolis.pdf

output/eisvogel.pdf: eisvogel.md
$(EXTRA_CMD) $< \
--output=$@ \
--template=eisvogel \
--pdf-engine=xelatex

output/designdoc.pdf: designdoc.md
$(CONVERT_CMD) $< \
--author="Innofactor" \
--columns="72" \
--description="Initial draft" \
--dpi=300 \
--filter pandoc-latex-environment \
--from="markdown+alerts+backtick_code_blocks+escaped_line_breaks+footnotes+implicit_header_references+inline_notes+line_blocks+space_in_atx_header+table_captions+grid_tables+pipe_tables+task_lists+yaml_metadata_block" \
--git-log-limit="15" \
--history-file="designdoc-history.txt" \
--input-files="designdoc.order" \
--listings \
--output=$@ \
--pdf-engine="xelatex" \
--project="1234567" \
--replace-file="designdoc-replace.json" \
--skip-git-history="true" \
--standalone \
--subtitle="Test document for pandoc-dockerfiles" \
--template="designdoc" \
--title="Designdoc template"

#output/beamertheme-metropolis.pdf: beamertheme-metropolis.md
# $(EXTRA_CMD) $< \
# --output=$@ \
Expand All @@ -213,4 +241,4 @@ output/eisvogel.pdf: eisvogel.md
#
.PHONY: clean
clean:
rm -rf output/*
rm -rf output/eisvogel.pdf
2 changes: 2 additions & 0 deletions test/designdoc-history.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1|Oct 26, 2023|Jane Doe|Initial draft
2|Oct 28, 2023|John Doe|Added detailed design
4 changes: 4 additions & 0 deletions test/designdoc-replace.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"{contact name}": "Jane Doe",
"{organization name}": "Contoso"
}
Loading

0 comments on commit 900595d

Please sign in to comment.