[flang-commits] [flang] 8369351 - [flang][docs] Fix title and text in the release notes page

via flang-commits flang-commits at lists.llvm.org
Wed Dec 3 09:08:39 PST 2025


Author: Tarun Prabhu
Date: 2025-12-03T10:08:33-07:00
New Revision: 836935197b8ff38459bb86c5aa592ef018311250

URL: https://github.com/llvm/llvm-project/commit/836935197b8ff38459bb86c5aa592ef018311250
DIFF: https://github.com/llvm/llvm-project/commit/836935197b8ff38459bb86c5aa592ef018311250.diff

LOG: [flang][docs] Fix title and text 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.

Added: 
    

Modified: 
    flang/docs/ReleaseNotes.md
    flang/docs/ReleaseNotesTemplate.txt
    flang/docs/conf.py

Removed: 
    


################################################################################
diff  --git a/flang/docs/ReleaseNotes.md b/flang/docs/ReleaseNotes.md
index 6a285f829053b..24122e7a77581 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 {{version}} {{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 {{version}}. 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..b607e9a938424 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 {{version}} {{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 {{version}}. 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..6395834a736cb 100644
--- a/flang/docs/conf.py
+++ b/flang/docs/conf.py
@@ -10,6 +10,7 @@
 # serve to show the default.
 
 from datetime import date
+
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -46,6 +47,14 @@
 }
 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 ""}
+
 import sphinx
 
 # The encoding of source files.
@@ -268,3 +277,22 @@
 
 # How to display URL addresses: 'footnote', 'no', or 'inline'.
 # texinfo_show_urls = 'footnote'
+
+
+# This can be treated as its own sphinx extension. setup() will be called by
+# sphinx. In it, register a function to be called when the configuration has
+# been initialized. The configuration will contain the values of the -D options
+# passed to sphinx-build on the command line.
+#
+# See llvm/cmake/modules/AddSphinxTarget.cmake for details on how sphinx-build
+# is invoked.
+def setup(app):
+    app.connect("config-inited", myst_substitutions_update)
+
+
+# Override the myst_parser substitutions map after the configuration has been
+# initialized.
+def myst_substitutions_update(app, config):
+    config.myst_substitutions.update(
+        {"release": config.release, "version": config.version}
+    )


        


More information about the flang-commits mailing list