Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pagetitle for minutes and motions #414

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ convert_to_pdf() {
pdf_path="${file%.md}.pdf"
html_path="${file%.md}.html"

# Use first header as the document title; remove all # characters and whitespace from the beginning
document_title=$(head -n 1 "$file" | sed -E "s/^#+\s*//")
if [[ "$file" =~ build/documents/(motions|minutes)/(([a-zA-Z0-9.\-]|[[:blank:]])+)\.md ]]; then
Nanush7 marked this conversation as resolved.
Show resolved Hide resolved
# We need this for minutes and motions to have the correct document title. Otherwise it uses "{.text-center}"
# or "SUBMISSION OF PROPOSED MOTION".
document_title=${BASH_REMATCH[2]}
else
# Use first header as the document title; remove all # characters and whitespace from the beginning
document_title=$(head -n 1 "$file" | sed -E "s/^#+\s*//")
fi
# Absolute path to the custom stylesheet
custom_stylesheet="./assets/$1-style.css"
custom_stylesheet_path=$(realpath "$custom_stylesheet")
Expand Down
Loading