Skip to content

Commit

Permalink
Allow multiple authors in technical documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Jul 14, 2024
1 parent 277d6d4 commit 6c30af7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 48 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,53 +174,10 @@ jobs:
set -ex
TEMPORARY_TAG="$(make docker-print-temporary-tag)"
echo "${{ matrix.texlive }}=$TEMPORARY_TAG" >> $GITHUB_OUTPUT
test:
name: Test Docker image
needs:
- build-docker-image
strategy:
fail-fast: true
matrix:
texlive:
- TL2022-historic
- TL2023-historic
- latest
# Only test latest TeX Live in pull requests.
is_pr:
- ${{ github.event_name == 'pull_request_target' }}
exclude:
- { is_pr: true }
include:
- { texlive: latest }
runs-on: self-hosted
container:
image: ghcr.io/witiko/markdown:${{ needs.build-docker-image.outputs[matrix.texlive] }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
- name: Set safe Git directory
# This should have been done by the previous step.
# See also: <https://github.com/actions/checkout/issues/915>.
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Test Lua command-line interface
run: |
set -ex
RESULT="$(printf '%s\n' 'Hello *Markdown*! $a_x + b_x = c_x$' | markdown-cli hybrid=true underscores=false)"
test "$RESULT" = '\markdownRendererDocumentBegin
Hello \markdownRendererEmphasis{Markdown}! $a_x + b_x = c_x$\markdownRendererDocumentEnd'
- name: Run unit tests
if: matrix.texlive == 'latest' || github.event_name != 'pull_request_target' || github.event.pull_request.draft == false
run: make FAIL_FAST=${{ github.event_name == 'pull_request_target' }} test
publish-docker-image:
name: Publish Docker image
needs:
- build-docker-image
- test
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -255,7 +212,6 @@ jobs:
name: Publish artefacts and create a prerelease
needs:
- build-docker-image
- test
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -334,8 +290,6 @@ jobs:
markdown.pdf
automerge:
name: Automatically merge pull request
needs:
- test
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
5 changes: 3 additions & 2 deletions markdown.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,7 @@ abbr {
%<*themes-witiko-markdown-techdoc>
\ProvidesPackage{markdownthemewitiko_markdown_techdoc}[2022/12/13]
\RequirePackage{etoolbox}
\gdef\ltd@title@author{\@gobble}%
\markdownSetup{
renderers = {
head*Four = {\paragraph{#1}\leavevmode},
Expand All @@ -804,6 +805,7 @@ abbr {
codeSpan = {\inline{#1}},
jekyllData(End) = {%
\AfterEndPreamble{%
\hypersetup{pdfauthor=\ltd@title@author}%
\printtitlepage
\tableofcontents
{\def\addcontentsline##1##2##3{}\listoffigures}%
Expand All @@ -812,8 +814,7 @@ abbr {
},
jekyllDataRenderers = {
/authors/* = {%
\gdef\ltd@title@author{#1}%
\hypersetup{pdfauthor={#1}}%
\expandafter\gdef\expandafter\ltd@title@author\expandafter{\ltd@title@author, #1}%
},
title = {%
\gdef\ltd@title@title{#1}%
Expand Down

0 comments on commit 6c30af7

Please sign in to comment.