Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
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
19 changes: 19 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,21 @@ jobs:
echo "=== SonarCloud Quality Report ==="
Get-Content docs/quality/sonar-quality.md

- name: Set build date
shell: pwsh
run: |
$buildDate = Get-Date -Format 'yyyy-MM-dd'
echo "BUILD_DATE=$buildDate" >> $env:GITHUB_ENV
echo "Build date: $buildDate"

- name: Generate Guide HTML with Pandoc
shell: pwsh
run: >
dotnet pandoc
--defaults docs/guide/definition.yaml
--filter node_modules/.bin/mermaid-filter.cmd
--metadata version="${{ inputs.version }}"
--metadata date="${{ env.BUILD_DATE }}"
Comment thread
Malcolmnixon marked this conversation as resolved.
Outdated
--output docs/guide/guide.html

- name: Generate Guide PDF with Weasyprint
Expand All @@ -359,10 +369,13 @@ jobs:
"docs/SarifMark User Guide.pdf"

- name: Generate Code Quality HTML with Pandoc
shell: pwsh
run: >
dotnet pandoc
--defaults docs/quality/definition.yaml
--filter node_modules/.bin/mermaid-filter.cmd
--metadata version="${{ inputs.version }}"
--metadata date="${{ env.BUILD_DATE }}"
--output docs/quality/quality.html

- name: Generate Code Quality PDF with Weasyprint
Expand All @@ -373,10 +386,13 @@ jobs:
"docs/SarifMark Code Quality.pdf"

- name: Generate Requirements HTML with Pandoc
shell: pwsh
run: >
dotnet pandoc
--defaults docs/requirements/definition.yaml
--filter node_modules/.bin/mermaid-filter.cmd
--metadata version="${{ inputs.version }}"
--metadata date="${{ env.BUILD_DATE }}"
--output docs/requirements/requirements.html

- name: Generate Requirements PDF with Weasyprint
Expand All @@ -387,10 +403,13 @@ jobs:
"docs/SarifMark Requirements.pdf"

- name: Generate Trace Matrix HTML with Pandoc
shell: pwsh
run: >
dotnet pandoc
--defaults docs/tracematrix/definition.yaml
--filter node_modules/.bin/mermaid-filter.cmd
--metadata version="${{ inputs.version }}"
--metadata date="${{ env.BUILD_DATE }}"
--output docs/tracematrix/tracematrix.html

- name: Generate Trace Matrix PDF with Weasyprint
Expand Down
35 changes: 28 additions & 7 deletions docs/template/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@
margin-bottom: 1rem;
}

.version {
font-size: 1rem;
color: #888;
margin-bottom: 1rem;
font-style: italic;
}

.author, .date {
font-size: 1rem;
color: #888;
Expand Down Expand Up @@ -153,7 +160,7 @@
border: 1px solid #ddd;
border-radius: 4px;
padding: 1rem;
overflow-x: auto;
overflow: auto;
margin-bottom: 1rem;
page-break-inside: avoid;
}
Expand Down Expand Up @@ -250,26 +257,32 @@
size: letter;
margin: 1in 0.75in;

@top-center {
@top-left {
content: string(doctitle);
font-size: 10pt;
color: #666;
border-bottom: 1px solid #e0e0e0;
padding-bottom: 0.25in;
}

@top-right {
content: string(docversion);
font-size: 10pt;
color: #666;
}

@bottom-center {
content: "Page " counter(page) " of " counter(pages);
font-size: 10pt;
color: #666;
border-top: 1px solid #e0e0e0;
padding-top: 0.25in;
}
}

/* Don't show header/footer on title page */
@page :first {
@top-center {
@top-left {
content: none;
}

@top-right {
content: none;
}

Expand All @@ -283,6 +296,11 @@
string-set: doctitle content();
}

/* Set the document version for the header */
.version {
string-set: docversion content();
}

/* Add page numbers to TOC entries using target-counter */
#TOC a::after {
content: leader('.') target-counter(attr(href), page);
Expand All @@ -309,6 +327,9 @@ <h1 class="title">$title$</h1>
$if(subtitle)$
<p class="subtitle">$subtitle$</p>
$endif$
$if(version)$
<p class="version">Version $version$</p>
$endif$
$for(author)$
<p class="author">$author$</p>
$endfor$
Expand Down