Convert docs/sub-*.html.tt to .md.tt
authorRichard Levitte <levitte@openssl.org>
Thu, 14 Jul 2022 17:56:44 +0000 (19:56 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 20 Jul 2022 11:06:38 +0000 (13:06 +0200)
This removes docs/mansidebar.html.tt, which is essentially replaced
by docs/sub-dirdata.yaml.tt

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/web/pull/345)

13 files changed:
Makefile
docs/mansidebar.html.tt [deleted file]
docs/sub-dirdata.yaml.tt [new file with mode: 0644]
docs/sub-index.html.tt [deleted file]
docs/sub-index.md.tt [new file with mode: 0644]
docs/sub-man1-index.html.tt [deleted file]
docs/sub-man1-index.md.tt [new file with mode: 0644]
docs/sub-man3-index.html.tt [deleted file]
docs/sub-man3-index.md.tt [new file with mode: 0644]
docs/sub-man5-index.html.tt [deleted file]
docs/sub-man5-index.md.tt [new file with mode: 0644]
docs/sub-man7-index.html.tt [deleted file]
docs/sub-man7-index.md.tt [new file with mode: 0644]

index 5db7e404b282ed4ca0a8f7d239b470c6b6a3cf6b..919840a76449c1e943d85a06d062c86e02e46f2a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -62,9 +62,11 @@ FUTURESERIES=
 H_TOP = $(addsuffix .html,$(basename $(shell git ls-files -- *.md)))
 H_COMMUNITY = $(addsuffix .html,\
                 $(basename $(shell git ls-files -- community/*.md)))
+# We filter out any file starting with 'sub-'...  they get special treatment
 H_DOCS = $(addsuffix .html,\
            $(basename $(shell git ls-files -- docs/*.md \
-                                              docs/*.md.tt )))
+                                              docs/*.md.tt \
+                              | grep -v '/sub-')))
 H_NEWS = $(addsuffix .html,$(basename $(shell git ls-files -- news/*.md)))
 H_POLICIES = $(addsuffix .html,\
                $(basename $(shell git ls-files -- policies/*.md \
@@ -99,8 +101,7 @@ SRCLISTS = $(foreach S,$(FUTURESERIES) $(SERIES) $(OLDSERIES2) fips,source/old/$
 SIMPLEDOCS = docs/faq.inc docs/fips.inc \
             docs/OpenSSLStrategicArchitecture.html \
             docs/OpenSSL300Design.html \
-            docs/manpages.html \
-            docs/mansidebar.html
+            docs/manpages.html
 
 GLOSSARY=$(CHECKOUTS)/general-policies/policies/glossary.md
 all_GENERAL_POLICIES=$(wildcard $(CHECKOUTS)/general-policies/policies/*.md)
@@ -190,34 +191,70 @@ man-pages-$(2):
        ./bin/mk-manpages3 $(CHECKOUTS)/$(1) $(2) docs/man$(2)
 endef
 define makemanapropos
-man-apropos-$(2): man-pages-$(2)
-       ./bin/mk-apropos docs/man$(2)/man1 > docs/man$(2)/man1/index.inc
-       ./bin/mk-apropos docs/man$(2)/man3 > docs/man$(2)/man3/index.inc
-       ./bin/mk-apropos docs/man$(2)/man5 > docs/man$(2)/man5/index.inc
-       ./bin/mk-apropos docs/man$(2)/man7 > docs/man$(2)/man7/index.inc
+docs/man$(2)/man1/index.inc: bin/mk-apropos Makefile
+       ./bin/mk-apropos docs/man$(2)/man1 > $$@
+docs/man$(2)/man3/index.inc: bin/mk-apropos Makefile
+       ./bin/mk-apropos docs/man$(2)/man3 > $$@
+docs/man$(2)/man5/index.inc: bin/mk-apropos Makefile
+       ./bin/mk-apropos docs/man$(2)/man5 > $$@
+docs/man$(2)/man7/index.inc: bin/mk-apropos Makefile
+       ./bin/mk-apropos docs/man$(2)/man7 > $$@
 endef
 define makemanindexes
-man-index-$(2):
-       ./bin/from-tt -d docs/man$(2)/man1 releases='$(MANSERIES)' release='$(2)' \
-                     < docs/sub-man1-index.html.tt > docs/man$(2)/man1/index.html
-       ./bin/from-tt -d docs/man$(2)/man3 releases='$(MANSERIES)' release='$(2)' \
-                     < docs/sub-man3-index.html.tt > docs/man$(2)/man3/index.html
-       ./bin/from-tt -d docs/man$(2)/man5 releases='$(MANSERIES)' release='$(2)' \
-                     < docs/sub-man5-index.html.tt > docs/man$(2)/man5/index.html
-       ./bin/from-tt -d docs/man$(2)/man7 releases='$(MANSERIES)' release='$(2)' \
-                     < docs/sub-man7-index.html.tt > docs/man$(2)/man7/index.html
-       ./bin/from-tt -d docs/man$(2) releases='$(MANSERIES)' release='$(2)' \
-                     < docs/sub-index.html.tt > docs/man$(2)/index.html
+docs/man$(2)/man1/index.md: docs/sub-man1-index.md.tt bin/from-tt Makefile
+       ./bin/from-tt -d docs/man$(2)/man1 \
+                      releases='$(MANSERIES)' release='$(2)' \
+                     < $$< > $$@
+docs/man$(2)/man3/index.md: docs/sub-man3-index.md.tt bin/from-tt Makefile
+       ./bin/from-tt -d docs/man$(2)/man3 \
+                      releases='$(MANSERIES)' release='$(2)' \
+                     < $$< > $$@
+docs/man$(2)/man5/index.md: docs/sub-man5-index.md.tt bin/from-tt Makefile
+       ./bin/from-tt -d docs/man$(2)/man5 \
+                      releases='$(MANSERIES)' release='$(2)' \
+                     < $$< > $$@
+docs/man$(2)/man7/index.md: docs/sub-man7-index.md.tt bin/from-tt Makefile
+       ./bin/from-tt -d docs/man$(2)/man7 \
+                      releases='$(MANSERIES)' release='$(2)' \
+                     < $$< > $$@
+docs/man$(2)/index.md: docs/sub-index.md.tt bin/from-tt Makefile
+       ./bin/from-tt -d docs/man$(2) \
+                      releases='$(MANSERIES)' release='$(2)' \
+                     < $$< > $$@
+endef
+define makemandirdata
+docs/man$(2)/man1/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
+       ./bin/from-tt -d docs/man$(2)/man1 \
+                     releases='$(MANSERIES)' release='$(2)' \
+                     < $$< > $$@
+docs/man$(2)/man3/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
+       ./bin/from-tt -d docs/man$(2)/man3 \
+                     releases='$(MANSERIES)' release='$(2)' \
+                     < $$< > $$@
+docs/man$(2)/man5/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
+       ./bin/from-tt -d docs/man$(2)/man5 \
+                     releases='$(MANSERIES)' release='$(2)' \
+                     < $$< > $$@
+docs/man$(2)/man7/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
+       ./bin/from-tt -d docs/man$(2)/man7 \
+                     releases='$(MANSERIES)' release='$(2)' \
+                     < $$< > $$@
+docs/man$(2)/dirdata.yaml: docs/sub-dirdata.yaml.tt bin/from-tt Makefile
+       ./bin/from-tt -d docs/man$(2) \
+                      releases='$(MANSERIES)' release='$(2)' \
+                     < $$< > $$@
 endef
 define makemanuals1
 $(eval $(call makemanpages1,$(1),$(2)))
 $(eval $(call makemanapropos,$(1),$(2)))
 $(eval $(call makemanindexes,$(1),$(2)))
+$(eval $(call makemandirdata,$(1),$(2)))
 endef
 define makemanuals3
 $(eval $(call makemanpages3,$(1),$(2)))
 $(eval $(call makemanapropos,$(1),$(2)))
 $(eval $(call makemanindexes,$(1),$(2)))
+$(eval $(call makemandirdata,$(1),$(2)))
 endef
 
 # Now that we have the generating macros in place, let's use them!
@@ -234,8 +271,17 @@ $(foreach S,$(MANSERIES3),$(eval $(call makemanuals3,openssl-$(S),$(S))))
 # source from $(CHECKOUTS)/openssl-x.y.z-stable/doc
 $(foreach S,$(MANSERIES1),$(eval $(call makemanuals1,openssl-$(S)-stable,$(S))))
 
-manmaster: man-apropos-master man-index-master
-manpages: $(foreach S,$(MANSERIES),man-apropos-$(S) man-index-$(S))
+MANMASTER_TARGETS = \
+        man-pages-master docs/manmaster/index.html \
+        $(foreach SEC,1 3 5 7, docs/manmaster/man$(SEC)/index.inc \
+                               docs/manmaster/man$(SEC)/index.html)
+manmaster: $(MANMASTER_TARGETS)
+MANPAGES_TARGETS = \
+        $(foreach S,$(MANSERIES), \
+          man-pages-$(S) docs/man$(S)/index.html \
+          $(foreach SEC,1 3 5 7, docs/man$(S)/man$(SEC)/index.inc \
+                                 docs/man$(S)/man$(SEC)/index.html))
+manpages: manmaster $(MANPAGES_TARGETS)
 
 mancross:
        ./bin/mk-mancross master $(MANSERIES)
@@ -511,6 +557,8 @@ $(foreach H, \
   $(H_TOP) \
   $(H_COMMUNITY) \
   $(H_DOCS) \
+  $(filter %.html,$(MANMASTER_TARGETS)) \
+  $(filter %.html,$(MANPAGES_TARGETS)) \
   $(H_NEWS) \
   $(H_POLICIES) \
   $(H_SUPPORT) \
diff --git a/docs/mansidebar.html.tt b/docs/mansidebar.html.tt
deleted file mode 100644 (file)
index 6237fb8..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<!-- sidebar.inc -->
-<aside class="sidebar">
-  <section>
-    <h1><a href="/docs/manpages.html">Manpages</a></h1>
-    <ul>
-[% FOREACH release IN releases.split('\s+') -%]
-      <li><a href="/docs/man[% release %]">[% release %]</a></li>
-[% END -%]
-    </ul>
-  </section>
-</aside>
-<!-- end -->
diff --git a/docs/sub-dirdata.yaml.tt b/docs/sub-dirdata.yaml.tt
new file mode 100644 (file)
index 0000000..4cf5f44
--- /dev/null
@@ -0,0 +1,13 @@
+---
+breadcrumbs: |
+  [Home]([% top %]) :
+  [Documentation]([% top %]docs) :
+  [Manpages]([% top %]docs/manpages.html)[% IF release.defined %] :
+  [[% release %]]([% top %]docs/man[% release %])[% END %]
+sidebar: |
+  # [Manpages]([% top %]docs/manpages.html)
+
+[% FOREACH release IN releases.split('\s+') -%]
+  -   [[% release %]]([% top %]docs/man[% release %])
+[% END -%]
+---
diff --git a/docs/sub-index.html.tt b/docs/sub-index.html.tt
deleted file mode 100644 (file)
index 0b02457..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-<body>
-  <!--#include virtual="/inc/banner.shtml" -->
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>Manpages for [% release %]</h2></header>
-         <div class="entry-content">
-           <p>
-            The manual pages for the [% release %] branch are
-            available here.
-            The OpenSSL documentation is divided into the following
-            sections:
-           </p>
-            <ul>
-              <li><a href="man1">Commands</a></li>
-              <li><a href="man3">Libraries</a></li>
-              <li><a href="man5">File Formats</a></li>
-              <li><a href="man7">Overviews</a></li>
-            </ul>
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href="/docs">Documentation</a>
-           : <a href="/docs/manpages.html">Manpages</a>
-           : <a href="">[% release %]</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="/docs/mansidebar.html" -->
-    </div>
-  </div>
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-</html>
-
diff --git a/docs/sub-index.md.tt b/docs/sub-index.md.tt
new file mode 100644 (file)
index 0000000..b9ac9dd
--- /dev/null
@@ -0,0 +1,14 @@
+---
+breadcrumb: [% release %]
+---
+# Manpages for [% release %]
+
+The manual pages for the [% release %] branch are
+available here.
+The OpenSSL documentation is divided into the following
+sections:
+
+-   [Commands](man1)
+-   [Libraries](man3)
+-   [File Formats](man5)
+-   [Overviews](man7)
diff --git a/docs/sub-man1-index.html.tt b/docs/sub-man1-index.html.tt
deleted file mode 100644 (file)
index 2894fcf..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-<body>
-  <!--#include virtual="/inc/banner.shtml" -->
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>OpenSSL commands</h2></header>
-         <div class="entry-content">
-           <p>
-           The <a href="openssl.html">openssl</a> manpage provides a
-           general overview of all the commands.
-           </p>
-
-           <table style="border-spacing: 10px 0;">
-             <tr>
-               <td>NAME</td>
-               <td>Description</td>
-             </tr>
-             <!--#include virtual="index.inc" -->
-           </table>
-           <p>&nbsp;</p>
-
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href="/docs">Documentation</a>
-           : <a href="/docs/manpages.html">Manpages</a>
-           : <a href="/docs/man[% release %]">[% release %]</a>
-           : <a href="/docs/man[% release %]/man1">commands</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="/docs/mansidebar.html" -->
-    </div>
-  </div>
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-</html>
diff --git a/docs/sub-man1-index.md.tt b/docs/sub-man1-index.md.tt
new file mode 100644 (file)
index 0000000..158a239
--- /dev/null
@@ -0,0 +1,17 @@
+---
+breadcrumb: commands
+---
+# OpenSSL commands
+
+The [openssl](openssl.html) manpage provides a general overview of all
+the commands.
+
+<p>
+<table style="border-spacing: 10px 0;">
+  <tr>
+    <td>NAME</td>
+    <td>Description</td>
+  </tr>
+  <!--#include virtual="index.inc" -->
+</table>
+</p>
diff --git a/docs/sub-man3-index.html.tt b/docs/sub-man3-index.html.tt
deleted file mode 100644 (file)
index 48b21c7..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-<body>
-  <!--#include virtual="/inc/banner.shtml" -->
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>OpenSSL libraries</h2></header>
-         <div class="entry-content">
-           <p>
-           This is the OpenSSL API for the SSL and Crypto libraries.
-           The <a href="../man7/ssl.html">ssl</a> and
-           <a href="../man7/crypto.html">crypto</a> manpages are
-           general overviews of those libraries.
-           </p>
-
-           <table style="border-spacing: 10px 0;">
-             <tr>
-               <td>NAME</td>
-               <td>Description</td>
-             </tr>
-             <!--#include virtual="index.inc" -->
-           </table>
-           <p>&nbsp;</p>
-
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href="/docs">Documentation</a>
-           : <a href="/docs/manpages.html">Manpages</a>
-           : <a href="/docs/man[% release %]">[% release %]</a>
-           : <a href="/docs/man[% release %]/man3">libraries</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="/docs/mansidebar.html" -->
-    </div>
-  </div>
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-</html>
diff --git a/docs/sub-man3-index.md.tt b/docs/sub-man3-index.md.tt
new file mode 100644 (file)
index 0000000..038087d
--- /dev/null
@@ -0,0 +1,18 @@
+---
+breadcrumb: libraries
+---
+# OpenSSL libraries
+
+This is the OpenSSL API for the SSL and Crypto libraries.
+The [ssl](../man7/ssl.html) and [crypto](../man7/crypto.html) manpages
+are general overviews of those libraries.
+
+<p>
+<table style="border-spacing: 10px 0;">
+  <tr>
+    <td>NAME</td>
+    <td>Description</td>
+  </tr>
+  <!--#include virtual="index.inc" -->
+</table>
+</p>
diff --git a/docs/sub-man5-index.html.tt b/docs/sub-man5-index.html.tt
deleted file mode 100644 (file)
index 28ebb0f..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-<body>
-  <!--#include virtual="/inc/banner.shtml" -->
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>OpenSSL file formats and conventions</h2></header>
-         <div class="entry-content">
-           <table style="border-spacing: 10px 0;">
-             <tr>
-               <td>NAME</td>
-               <td>Description</td>
-             </tr>
-             <!--#include virtual="index.inc" -->
-           </table>
-           <p>&nbsp;</p>
-
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href="/docs">Documentation</a>
-           : <a href="/docs/manpages.html">Manpages</a>
-           : <a href="/docs/man[% release %]">[% release %]</a>
-           : <a href="/docs/man[% release %]/man5">file formats</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="/docs/mansidebar.html" -->
-    </div>
-  </div>
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-</html>
diff --git a/docs/sub-man5-index.md.tt b/docs/sub-man5-index.md.tt
new file mode 100644 (file)
index 0000000..0068da9
--- /dev/null
@@ -0,0 +1,14 @@
+---
+breadcrumb: file formats
+---
+# OpenSSL file formats and conventions
+
+<p>
+<table style="border-spacing: 10px 0;">
+  <tr>
+    <td>NAME</td>
+    <td>Description</td>
+  </tr>
+  <!--#include virtual="index.inc" -->
+</table>
+</p>
diff --git a/docs/sub-man7-index.html.tt b/docs/sub-man7-index.html.tt
deleted file mode 100644 (file)
index 799772a..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<!--#include virtual="/inc/head.shtml" -->
-<body>
-  <!--#include virtual="/inc/banner.shtml" -->
-  <div id="main">
-    <div id="content">
-      <div class="blog-index">
-       <article>
-         <header><h2>OpenSSL overviews</h2></header>
-         <div class="entry-content">
-           <table style="border-spacing: 10px 0;">
-             <tr>
-               <td>NAME</td>
-               <td>Description</td>
-             </tr>
-             <!--#include virtual="index.inc" -->
-           </table>
-           <p>&nbsp;</p>
-
-         </div>
-         <footer>
-           You are here: <a href="/">Home</a>
-           : <a href="/docs">Documentation</a>
-           : <a href="/docs/manpages.html">Manpages</a>
-           : <a href="/docs/man[% release %]">[% release %]</a>
-           : <a href="/docs/man[% release %]/man7">overviews</a>
-           <br/><a href="/sitemap.txt">Sitemap</a>
-         </footer>
-       </article>
-      </div>
-      <!--#include virtual="/docs/mansidebar.html" -->
-    </div>
-  </div>
-<!--#include virtual="/inc/footer.shtml" -->
-</body>
-</html>
diff --git a/docs/sub-man7-index.md.tt b/docs/sub-man7-index.md.tt
new file mode 100644 (file)
index 0000000..6d3341f
--- /dev/null
@@ -0,0 +1,14 @@
+---
+breadcrumb: overviews
+---
+# OpenSSL overviews
+
+<p>
+<table style="border-spacing: 10px 0;">
+  <tr>
+    <td>NAME</td>
+    <td>Description</td>
+  </tr>
+  <!--#include virtual="index.inc" -->
+</table>
+</p>