Convert SSI includes to tt includes in news/
authorRichard Levitte <levitte@openssl.org>
Tue, 3 Oct 2023 16:10:01 +0000 (18:10 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 16 Oct 2023 17:19:52 +0000 (19:19 +0200)
This also fixes news/dirdata.yaml for better rendering of breadcrumbs

Reviewed-by: Anton Arapov <anton@openssl.org>
Reviewed-by: Tomas Vavra <tvavra@openssl.org>
(Merged from https://github.com/openssl/web/pull/430)

.gitignore
Makefile
news/dirdata.yaml
news/newslog.md.tt [moved from news/newslog.md with 80% similarity]
news/openssl-notes.md.tt
news/pgpkey.md.tt [moved from news/pgpkey.md with 83% similarity]
news/vulnerabilities.md.tt

index 38c07eb689082df12c84a753f19cdd5ed9ba928f..70216ce28f268620865f5e1513b5fb3600315357 100644 (file)
@@ -28,8 +28,12 @@ news/changelog.md
 news/changelog.txt
 news/cl*.txt
 news/newsflash.inc
+news/newslog.md
 news/openssl-*-notes.md
 news/openssl-*-notes.inc
+news/pgpkey.md
+news/secadv/
+news/secjson/
 news/vulnerabilities*.inc
 news/vulnerabilities*.md
 news/*.html
index 320238f5a7ce12ae14ac611cd97b767d6e351b7b..076f094a3f19d9a6f54219750fe88ebb5734785e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -70,7 +70,9 @@ H_DOCS = $(addsuffix .html,\
            $(basename $(shell git ls-files -- docs/*.md \
                                               docs/*.md.tt \
                               | grep -v '/sub-')))
-H_NEWS = $(addsuffix .html,$(basename $(shell git ls-files -- news/*.md)))
+H_NEWS = $(addsuffix .html,\
+           $(basename $(shell git ls-files -- news/*.md)) \
+           $(basename $(basename $(shell git ls-files -- news/*.md.tt))))
 H_POLICIES = $(addsuffix .html,\
                $(basename $(shell git ls-files -- \
                                   policies/*.md \
@@ -89,15 +91,10 @@ H_SUPPORT = $(addsuffix .html,$(basename $(shell git ls-files -- support/*.md)))
 
 SIMPLE = $(H_TOP) \
         $(H_COMMUNITY) \
-        news/changelog.html \
-        $(foreach S,$(SERIES),news/openssl-$(S)-notes.inc) \
         $(foreach S,$(SERIES),news/openssl-$(S)-notes.html) \
         $(H_NEWS) \
         news/secadv \
         news/secjson \
-        news/vulnerabilities.inc \
-        news/vulnerabilities.html \
-        $(foreach S,$(SERIES) $(OLDSERIES),news/vulnerabilities-$(S).inc) \
         $(foreach S,$(SERIES) $(OLDSERIES),news/vulnerabilities-$(S).html) \
         $(H_POLICIES) \
         policies/glossary.html \
@@ -411,7 +408,8 @@ news/changelog.inc: news/changelog.txt bin/post-process-html5 Makefile
        @rm -f $@
        (echo 'Table of contents'; sed -e '1,/^OpenSSL Releases$$/d' < $<) \
                | pandoc -t html5 -f commonmark | ./bin/post-process-html5 >$@
-news/changelog.md: news/changelog.md.tt news/changelog.inc Makefile bin/from-tt
+news/changelog.md: news/changelog.md.tt news/changelog.inc \
+                   bin/from-tt Makefile
        @rm -f $@
        ./bin/from-tt 'releases=$(SERIES)' $<
 # Additionally, make news/changelog.html depend on clxy[z].txt, where xy[z]
@@ -455,7 +453,9 @@ $(eval $(call mknews_changelogtxt,cl$(subst .,,$(S)).txt,openssl-$(S)-stable/CHA
 #
 # $(1) = release version, $(2) = NEWS file, relative to CHECKOUTS
 define mknews_noteshtml
-news/openssl-$(1)-notes.md: news/openssl-notes.md.tt bin/from-tt Makefile
+news/openssl-$(1)-notes.md: news/openssl-notes.md.tt \
+                            news/openssl-$(1)-notes.inc \
+                            bin/from-tt Makefile
        @rm -f $$@
        ./bin/from-tt -d news -i $$< -o $$@ release='$(1)'
 news/openssl-$(1)-notes.inc: $(CHECKOUTS)/$(2) bin/mk-notes Makefile
@@ -492,7 +492,9 @@ define mknews_vulnerability
 news/vulnerabilities$(1).inc: bin/cvejsontohtml.py news/secjson Makefile
        @rm -f $$@
        python3 ./bin/cvejsontohtml.py -i news/secjson/ $(2) > $$@
-news/vulnerabilities$(1).md: news/vulnerabilities.md.tt bin/from-tt Makefile
+news/vulnerabilities$(1).md: news/vulnerabilities.md.tt \
+                             news/vulnerabilities$(1).inc \
+                             bin/from-tt Makefile
        @rm -f $$@
        ./bin/from-tt -d news vulnerabilitiesinc='vulnerabilities$(1).inc' < $$< > $$@
 endef
@@ -595,6 +597,8 @@ source/old/index.md: source/old/index.md.tt Makefile bin/from-tt Makefile
 
 # Extra inc -> markdown dependencies
 
+news/newslog.md: news/newsflash.inc
+news/pgpkey.md: news/openssl-security.asc
 
 # Extra HTML dependencies (apart from the markdown file it comes from)
 
index 14c6f0186cdd2926f740cb85d15501160cf0e70b..f8abc01aef034a3c97c16907c0a785ad1e4dde6a 100644 (file)
@@ -1,13 +1,11 @@
 ---
-breadcrumbs:
-  - |
-    [Home](/) : [News](.)
-sidebar:
-  - |
-    # [News](.)
+breadcrumbs: >-
+  [Home](/) : [News](.)
+sidebar: |
+  # [News](.)
 
-    -   [Newslog](newslog.html)
-    -   [Vulnerabilities](vulnerabilities.html)
-    -   [CVEs and FIPS](fips-cve.html)
-    -   [Changelog](changelog.html)
+  -   [Newslog](newslog.html)
+  -   [Vulnerabilities](vulnerabilities.html)
+  -   [CVEs and FIPS](fips-cve.html)
+  -   [Changelog](changelog.html)
 ---
similarity index 80%
rename from news/newslog.md
rename to news/newslog.md.tt
index 423b0d792fac35b6c16be7a4349b54777098314a..fd6b6bc4deb46c5890a7fa9455b57ef580ea6be7 100644 (file)
@@ -8,6 +8,6 @@ release notices.
 
 <p>
 <table class="newsflash" width="90%">
-  <!--#include virtual="newsflash.inc"-->
+  [% INCLUDE "newsflash.inc" %]
 </table>
 </p>
index 1ed6e4473230b52e638985e7d7e1412f519cdcec..9ec44b676f13c395c21697fb7bd34ec077cfda55 100644 (file)
@@ -10,4 +10,4 @@ git repository.
 
 More details can be found in the [ChangeLog](changelog.html).
 
-<!--#include virtual="openssl-[% release %]-notes.inc" -->
+[% INCLUDE "openssl-$release-notes.inc" %]
similarity index 83%
rename from news/pgpkey.md
rename to news/pgpkey.md.tt
index a7d4f437b84524d2aac382277bd35a57dfafbab4..91d0458ee225a065ba15ee6aa64827959ccffe5b 100644 (file)
@@ -8,5 +8,5 @@ team PGP key, below. The plain-text document of the key is available
 here: [openssl-security.asc](openssl-security.asc)
 
 <pre>
-<!--#include virtual="openssl-security.asc" -->
+[% INCLUDE "openssl-security.asc" %]
 </pre>
index a01860ca729a3f4e8c9ddc1c90fc3c4fbf4006a3..bb82d9892c1329296356980f57e30bc03d646ce7 100644 (file)
@@ -6,4 +6,4 @@ breadcrumb: Vulnerabilities
 If you think you have found a security bug in OpenSSL,
 please [report it to us](/community/#securityreports).
 
-<!--#include virtual="[% vulnerabilitiesinc %]" -->
+[% INCLUDE "$vulnerabilitiesinc" %]