[flang-commits] [flang] [flang][docs] Fix title and text in the release notes page (PR #170405)

Tarun Prabhu via flang-commits flang-commits at lists.llvm.org
Tue Dec 2 18:46:26 PST 2025


https://github.com/tarunprabhu updated https://github.com/llvm/llvm-project/pull/170405

>From 0f563cc308346551cab48c2491e23a66b5d98a07 Mon Sep 17 00:00:00 2001
From: Tarun Prabhu <tarun at lanl.gov>
Date: Tue, 2 Dec 2025 19:28:32 -0700
Subject: [PATCH 1/3] [flang][docs] Fix the title in the release notes page

The title of the release notes page always showed "|version| (In-Progress)".
This has been fixed so the release version is shown as expected. '(In-Progress)'
is now only shown on non-release branches. Unlike clang, flang does not use
${LLVM_VERSION_SUFFIX}, so even on non-release branches the 'git' suffix will
not be shown.
---
 flang/docs/ReleaseNotes.md          |  7 +++----
 flang/docs/ReleaseNotesTemplate.txt |  6 +++---
 flang/docs/conf.py                  | 25 +++++++++++++++++++++++++
 3 files changed, 31 insertions(+), 7 deletions(-)

diff --git a/flang/docs/ReleaseNotes.md b/flang/docs/ReleaseNotes.md
index 6a285f829053b..858d118578224 100644
--- a/flang/docs/ReleaseNotes.md
+++ b/flang/docs/ReleaseNotes.md
@@ -1,18 +1,18 @@
 <!-- If you want to modify sections/contents permanently, you should modify both
 ReleaseNotes.md and ReleaseNotesTemplate.txt. -->
 
-# Flang |version| (In-Progress) Release Notes
+# Flang {{release}} {{in_progress}}Release Notes
 
 > **warning**
 >
-> These are in-progress notes for the upcoming LLVM |version| release.
+> These are in-progress notes for the upcoming LLVM {{version}} release.
 > Release notes for previous releases can be found on [the Download
 > Page](https://releases.llvm.org/download.html).
 
 ## Introduction
 
 This document contains the release notes for the Flang Fortran frontend,
-part of the LLVM Compiler Infrastructure, release |version|. Here we
+part of the LLVM Compiler Infrastructure, release {{release}}. Here we
 describe the status of Flang in some detail, including major
 improvements from the previous release and new feature work. For the
 general LLVM release notes, see [the LLVM
@@ -45,7 +45,6 @@ page](https://llvm.org/releases/).
 
 ## New Issues Found
 
-
 ## Additional Information
 
 Flang's documentation is located in the `flang/docs/` directory in the
diff --git a/flang/docs/ReleaseNotesTemplate.txt b/flang/docs/ReleaseNotesTemplate.txt
index 2ccf5472ee234..70720d16050fd 100644
--- a/flang/docs/ReleaseNotesTemplate.txt
+++ b/flang/docs/ReleaseNotesTemplate.txt
@@ -1,18 +1,18 @@
 <!-- If you want to modify sections/contents permanently, you should modify both
 ReleaseNotes.md and ReleaseNotesTemplate.txt. -->
 
-# Flang |version| (In-Progress) Release Notes
+# Flang {{release}} {{in_progress}}Release Notes
 
 > **warning**
 >
-> These are in-progress notes for the upcoming LLVM |version| release.
+> These are in-progress notes for the upcoming LLVM {{version}} release.
 > Release notes for previous releases can be found on [the Download
 > Page](https://releases.llvm.org/download.html).
 
 ## Introduction
 
 This document contains the release notes for the Flang Fortran frontend,
-part of the LLVM Compiler Infrastructure, release |version|. Here we
+part of the LLVM Compiler Infrastructure, release {{release}}. Here we
 describe the status of Flang in some detail, including major
 improvements from the previous release and new feature work. For the
 general LLVM release notes, see [the LLVM
diff --git a/flang/docs/conf.py b/flang/docs/conf.py
index 0942dbf70ff16..8980a570d2965 100644
--- a/flang/docs/conf.py
+++ b/flang/docs/conf.py
@@ -46,6 +46,31 @@
 }
 myst_heading_anchors = 6
 
+# Enable myst's substitution extension since markdown files cannot use the
+# |version| and |release| substitutions available to .rst files.
+myst_enable_extensions = [
+    'substitution'
+]
+
+# The substitutions to use in markdown files. This contains unconditional
+# substitutions, but more may be added once the configuration is obtained.
+myst_substitutions = {
+    'in_progress': "(In-Progress) " if tags.has("PreRelease") else ""
+}
+
+# It is not clear who calls setup and when. In any case, when it is called, the
+# configurations options are available. These include, among the other things,
+# the values of the -D options passed to sphinx-build. Populate the myst
+# substitutions dictionary as needed.
+#
+# See llvm/cmake/modules/AddSphinxTarget.cmake for details on how sphinx-build
+# is invoked.
+def setup(sphinx):
+    sphinx.config.myst_substitutions.update({
+        'release': sphinx.config.release,
+        'version': sphinx.config.version
+    })
+
 import sphinx
 
 # The encoding of source files.

>From 6552f091671cc45a485060a8b3d771d197cedfae Mon Sep 17 00:00:00 2001
From: Tarun Prabhu <tarun.prabhu at gmail.com>
Date: Tue, 2 Dec 2025 19:43:37 -0700
Subject: [PATCH 2/3] Fix python formatting

---
 flang/docs/conf.py | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/flang/docs/conf.py b/flang/docs/conf.py
index 8980a570d2965..8abadd31104f7 100644
--- a/flang/docs/conf.py
+++ b/flang/docs/conf.py
@@ -48,15 +48,11 @@
 
 # Enable myst's substitution extension since markdown files cannot use the
 # |version| and |release| substitutions available to .rst files.
-myst_enable_extensions = [
-    'substitution'
-]
+myst_enable_extensions = ["substitution"]
 
 # The substitutions to use in markdown files. This contains unconditional
 # substitutions, but more may be added once the configuration is obtained.
-myst_substitutions = {
-    'in_progress': "(In-Progress) " if tags.has("PreRelease") else ""
-}
+myst_substitutions = {"in_progress": "(In-Progress) " if tags.has("PreRelease") else ""}
 
 # It is not clear who calls setup and when. In any case, when it is called, the
 # configurations options are available. These include, among the other things,
@@ -66,10 +62,9 @@
 # See llvm/cmake/modules/AddSphinxTarget.cmake for details on how sphinx-build
 # is invoked.
 def setup(sphinx):
-    sphinx.config.myst_substitutions.update({
-        'release': sphinx.config.release,
-        'version': sphinx.config.version
-    })
+    sphinx.config.myst_substitutions.update(
+        {'release': sphinx.config.release, 'version': sphinx.config.version}
+    )
 
 import sphinx
 

>From 6fcd6b04d97136a00682a49e03ee1c3a88d79dc3 Mon Sep 17 00:00:00 2001
From: Tarun Prabhu <tarun.prabhu at gmail.com>
Date: Tue, 2 Dec 2025 19:46:15 -0700
Subject: [PATCH 3/3] Fix python formatting

---
 flang/docs/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flang/docs/conf.py b/flang/docs/conf.py
index 8abadd31104f7..677784aafa2f3 100644
--- a/flang/docs/conf.py
+++ b/flang/docs/conf.py
@@ -63,7 +63,7 @@
 # is invoked.
 def setup(sphinx):
     sphinx.config.myst_substitutions.update(
-        {'release': sphinx.config.release, 'version': sphinx.config.version}
+        {"release": sphinx.config.release, "version": sphinx.config.version}
     )
 
 import sphinx



More information about the flang-commits mailing list