Skip to content

Commit 3fa355b

Browse files
committed
Add custom header to hide status in generated HTML
Add a custom HTML header for use in the generated HTML version of the document. This allows us to: 1. not display a Status -- status isn't something we've typically used in TUF and the options available to us in bikeshed don't quite fit our use 2. display the specification version more prominently in the sub-heading, alongside the last modified date Signed-off-by: Joshua Lock <[email protected]>
1 parent c5354b8 commit 3fa355b

File tree

4 files changed

+31
-5
lines changed

4 files changed

+31
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ SHELL=/bin/bash -o pipefail
22
.PHONY: local
33

44
local: tuf-spec.md
5-
bikeshed spec tuf-spec.md tuf-spec.html --md-Text-Macro="COMMIT-SHA LOCAL COPY"
5+
bikeshed spec tuf-spec.md tuf-spec.html

check_release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
LAST_MODIFIED_PATTERN = "Date: %Y-%m-%d\n"
3434
LAST_MODIFIED_LINENO = 6
3535

36-
VERSION_PATTERN = r"^Version: \*\*(\d*)\.(\d*)\.(\d*)\*\*$"
36+
VERSION_PATTERN = r"^Text Macro: VERSION (\d*)\.(\d*)\.(\d*)$"
3737
VERSION_LINENO = 19
3838

3939
class SpecError(Exception):

header.include

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<title>[TITLE]</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<style data-fill-with="stylesheet">
8+
</style>
9+
</head>
10+
<body class="h-entry">
11+
<div class="head">
12+
<p data-fill-with="logo"></p>
13+
<h1 id="title" class="p-name no-ref">[TITLE]</h1>
14+
<h2 id="subtitle" class="no-num no-toc no-ref"> Version: [VERSION] <br/>
15+
Last modified: <time class="dt-updated" datetime="[ISODATE]">[DATE]</time></h2>
16+
<div data-fill-with="spec-metadata"></div>
17+
<div data-fill-with="warning"></div>
18+
<p class='copyright' data-fill-with='copyright'></p>
19+
<hr title="Separator for header">
20+
</div>
21+
22+
<div data-fill-with="at-risk"></div>
23+
24+
<nav data-fill-with="table-of-contents" id="toc"></nav>
25+
<main>

tuf-spec.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<pre class='metadata'>
22
Title: The Update Framework Specification
33
Shortname: TUF
4-
Status: LS-COMMIT
4+
Status: LS
55
Abstract: A framework for securing software update systems.
66
Date: 2020-12-11
77
Editor: Justin Cappos, NYU
@@ -13,11 +13,12 @@ Repository: theupdateframework/specification
1313
Mailing List: https://groups.google.com/forum/?fromgroups#!forum/theupdateframework
1414
Indent: 2
1515
Boilerplate: copyright no, conformance no
16+
Local Boilerplate: header yes
1617
Markup Shorthands: css no, markdown yes
18+
Metadata Include: This version off, Abstract off
19+
Text Macro: VERSION 1.0.17
1720
</pre>
1821

19-
Version: **1.0.17**
20-
2122
We strive to make the specification easy to implement, so if you come across
2223
any inconsistencies or experience any difficulty, do let us know by sending an
2324
email to our [mailing

0 commit comments

Comments
 (0)