Skip to content

Commit 03c0770

Browse files
authored
[spec] Move all repo-specifics to conf.py (WebAssembly#1308)
1 parent 583d9d2 commit 03c0770

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

document/core/conf.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,23 @@
6464
editor = u'Andreas Rossberg (editor)'
6565
logo = 'static/webassembly.png'
6666

67+
# The name of the GitHub repository this resides in
68+
repo = 'spec'
69+
70+
# The name of the proposal it represents, if any
71+
proposal = ''
72+
73+
# The draft version string (clear out for release cuts)
74+
draft = ' (Draft ' + date.today().strftime("%Y-%m-%d") + ')'
75+
6776
# The version info for the project you're documenting, acts as replacement for
6877
# |version| and |release|, also used in various other places throughout the
6978
# built documents.
7079
#
7180
# The short X.Y version.
7281
version = u'1.1'
7382
# The full version, including alpha/beta/rc tags.
74-
release = version + ' (Draft ' + date.today().strftime("%Y-%m-%d") + ')'
83+
release = version + ('' if proposal == '' else ' + ') + proposal + draft
7584

7685
# The language for content autogenerated by Sphinx. Refer to documentation
7786
# for a list of supported languages.
@@ -477,6 +486,8 @@
477486

478487
# Macros
479488
rst_prolog = """
489+
.. |issuelink| replace:: https://github.com/webassembly/""" + repo + """/issues/
490+
.. |pagelink| replace:: https://webassembly.github.io/""" + repo + """/core/
480491
.. include:: /""" + pwd + """/util/macros.def
481492
"""
482493

document/core/util/macros.def

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
.. External Standards
44
.. ------------------
55

6-
.. |WasmDraft| replace:: https://webassembly.github.io/spec/core/
7-
.. _WasmDraft: https://webassembly.github.io/spec/core/
6+
.. |WasmDraft| replace:: |pagelink|
7+
.. _WasmDraft: |pagelink|
88

9-
.. |WasmIssues| replace:: https://github.com/webassembly/spec/issues/
10-
.. _WasmIssues: https://github.com/webassembly/spec/issues/
9+
.. |WasmIssues| replace:: |issuelink|
10+
.. _WasmIssues: |issuelink|
1111

1212
.. |IEEE754| replace:: IEEE 754-2019
1313
.. _IEEE754: https://ieeexplore.ieee.org/document/8766229

0 commit comments

Comments
 (0)