On Wed, 9 Nov 2022, Martin Liška wrote:
> Hi.
>
> I think we should remove documentation for unsupported GCC releases
> as it's indexed by Google engine.
I'd agree with previous responses that outright removing the links is
undesirable, and pointing Google to recent documentation should be done
by annotating links, e.g. via rel=canonical as indicated by Joseph.
I would add that adding rel=canonical links seems doable without modifying
old files, by configuring the web server to add HTTP Link: header.
> Second reason is that the page is long
> one one can't easily jump to Current development documentation.
For this I would suggest using the <details> tag to neatly fold links for
old releases. Please see the attached patch.
Alexander
From ab6ce8c24aa17dba8ed79f3c3f7a5e8038dd3205 Mon Sep 17 00:00:00 2001
From: Alexander Monakov <amona...@ispras.ru>
Date: Wed, 9 Nov 2022 22:17:16 +0300
Subject: [PATCH] Fold doc links for old releases using <details> tag
---
htdocs/onlinedocs/index.html | 151 ++++++++++++++++++++++-------------
1 file changed, 96 insertions(+), 55 deletions(-)
diff --git a/htdocs/onlinedocs/index.html b/htdocs/onlinedocs/index.html
index 3410f731..03cbdbeb 100644
--- a/htdocs/onlinedocs/index.html
+++ b/htdocs/onlinedocs/index.html
@@ -18,8 +18,8 @@
caring about internals should really be using the mainline
versions. -->
-<ul>
- <li>GCC 12.2 manuals:
+<details open>
+ <summary>GCC 12.2 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/">GCC
12.2 Manual</a> (<a
@@ -96,9 +96,11 @@
Library</a></li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-12.2.0/docs-sources.tar.gz">Texinfo
sources of all the GCC 12.2 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 11.3 manuals:
+<details>
+ <summary>GCC 11.3 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-11.3.0/gcc/">GCC
11.3 Manual</a> (<a
@@ -175,9 +177,11 @@
Library</a></li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-11.3.0/docs-sources.tar.gz">Texinfo
sources of all the GCC 11.3 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 10.4 manuals:
+<details>
+ <summary>GCC 10.4 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-10.4.0/gcc/">GCC
10.4 Manual</a> (<a
@@ -254,9 +258,11 @@
Library</a></li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-10.4.0/docs-sources.tar.gz">Texinfo
sources of all the GCC 10.4 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 9.5 manuals:
+<details>
+ <summary>GCC 9.5 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-9.5.0/gcc/">GCC
9.5 Manual</a> (<a
@@ -333,9 +339,11 @@
Library</a></li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-9.5.0/docs-sources.tar.gz">Texinfo
sources of all the GCC 9.5 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 8.5 manuals:
+<details>
+ <summary>GCC 8.5 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-8.5.0/gcc/">GCC
8.5 Manual</a> (<a
@@ -412,9 +420,11 @@
Library</a></li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-8.5.0/docs-sources.tar.gz">Texinfo
sources of all the GCC 8.5 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 7.5 manuals:
+<details>
+ <summary>GCC 7.5 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-7.5.0/gcc/">GCC
7.5 Manual</a> (<a
@@ -491,9 +501,11 @@
Library</a></li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-7.5.0/docs-sources.tar.gz">Texinfo
sources of all the GCC 7.5 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 6.5 manuals:
+<details>
+ <summary>GCC 6.5 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-6.5.0/gcc/">GCC
6.5 Manual</a> (<a
@@ -577,9 +589,11 @@
Library</a></li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-6.5.0/docs-sources.tar.gz">Texinfo
sources of all the GCC 6.5 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 5.5 manuals:
+<details>
+ <summary>GCC 5.5 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-5.5.0/gcc/">GCC
5.5 Manual</a> (<a
@@ -663,9 +677,11 @@
Library</a></li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-5.5.0/docs-sources.tar.gz">Texinfo
sources of all the GCC 5.5 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 4.9.4 manuals:
+<details>
+ <summary>GCC 4.9.4 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-4.9.4/gcc/">GCC
4.9.4 Manual</a> (<a
@@ -747,9 +763,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-4.9.4/docs-sources.tar.gz">Texinfo
sources of all the GCC 4.9.4 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 4.8.5 manuals:
+<details>
+ <summary>GCC 4.8.5 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/">GCC
4.8.5 Manual</a> (<a
@@ -831,10 +849,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-4.8.5/docs-sources.tar.gz">Texinfo
sources of all the GCC 4.8.5 manuals</a></li>
- </ul></li>
-
+ </ul>
+</details>
- <li>GCC 4.7.4 manuals:
+<details>
+ <summary>GCC 4.7.4 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-4.7.4/gcc/">GCC
4.7.4 Manual</a> (<a
@@ -914,10 +933,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-4.7.4/docs-sources.tar.gz">Texinfo
sources of all the GCC 4.7.4 manuals</a></li>
- </ul></li>
-
+ </ul>
+</details>
- <li>GCC 4.6.4 manuals:
+<details>
+ <summary>GCC 4.6.4 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-4.6.4/gcc/">GCC
4.6.4 Manual</a> (<a
@@ -997,10 +1017,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-4.6.4/docs-sources.tar.gz">Texinfo
sources of all the GCC 4.6.4 manuals</a></li>
- </ul></li>
-
+ </ul>
+</details>
- <li>GCC 4.5.4 manuals:
+<details>
+ <summary>GCC 4.5.4 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-4.5.4/gcc/">GCC
4.5.4 Manual</a> (<a
@@ -1053,10 +1074,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-4.5.4/docs-sources.tar.gz">Texinfo
sources of all the GCC 4.5.4 manuals</a></li>
- </ul></li>
-
+ </ul>
+</details>
- <li>GCC 4.4.7 manuals:
+<details>
+ <summary>GCC 4.4.7 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-4.4.7/gcc/">GCC
4.4.7 Manual</a> (<a
@@ -1109,9 +1131,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-4.4.7/docs-sources.tar.gz">Texinfo
sources of all the GCC 4.4.7 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 4.3.6 manuals:
+<details>
+ <summary>GCC 4.3.6 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-4.3.6/gcc/">GCC
4.3.6 Manual</a> (<a
@@ -1164,9 +1188,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-4.3.6/docs-sources.tar.gz">Texinfo
sources of all the GCC 4.3.6 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 4.2.4 manuals:
+<details>
+ <summary>GCC 4.2.4 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/">GCC
4.2.4 Manual</a> (<a
@@ -1219,9 +1245,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-4.2.4/docs-sources.tar.gz">Texinfo
sources of all the GCC 4.2.4 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 4.1.2 manuals:
+<details>
+ <summary>GCC 4.1.2 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/">GCC
4.1.2 Manual</a> (<a
@@ -1274,9 +1302,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-4.1.2/docs-sources.tar.gz">Texinfo
sources of all the GCC 4.1.2 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 4.0.4 manuals:
+<details>
+ <summary>GCC 4.0.4 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/">GCC
4.0.4 Manual</a> (<a
@@ -1329,9 +1359,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-4.0.4/docs-sources.tar.gz">Texinfo
sources of all the GCC 4.0.4 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 3.4.6 manuals:
+<details>
+ <summary>GCC 3.4.6 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/">GCC
3.4.6 Manual</a> (<a
@@ -1384,10 +1416,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-3.4.6/docs-sources.tar.gz">Texinfo
sources of all the GCC 3.4.6 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
-
- <li>GCC 3.3.6 manuals:
+<details>
+ <summary>GCC 3.3.6 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-3.3.6/gcc/">GCC
3.3.6 Manual</a> (<a
@@ -1433,9 +1466,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-3.3.6/docs-sources.tar.gz">Texinfo
sources of all the GCC 3.3.6 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 3.2.3 manuals:
+<details>
+ <summary>GCC 3.2.3 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/">GCC
3.2.3 Manual</a> (<a
@@ -1469,9 +1504,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-3.2.3/docs-sources.tar.gz">Texinfo
sources of all the GCC 3.2.3 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 3.1.1 manuals:
+<details>
+ <summary>GCC 3.1.1 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-3.1.1/gcc/">GCC
3.1.1 Manual</a> (<a
@@ -1505,9 +1542,11 @@
HTML tarball</a>)</li>
<li><a
href="https://gcc.gnu.org/onlinedocs/gcc-3.1.1/docs-sources.tar.gz">Texinfo
sources of all the GCC 3.1.1 manuals</a></li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 3.0.4 manuals:
+<details>
+ <summary>GCC 3.0.4 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc.html">GCC
3.0.4 Manual</a> (<a
@@ -1524,9 +1563,11 @@
<li>GCC 3.0.4 CPP Manual (<a
href="https://gcc.gnu.org/onlinedocs/gcc-3.0.4/cpp.ps.gz">only
in PostScript</a>)</li>
- </ul></li>
+ </ul>
+</details>
- <li>GCC 2.95.3 manuals:
+<details>
+ <summary>GCC 2.95.3 manuals:</summary>
<ul>
<li><a href="https://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc.html">GCC
2.95.3 Manual</a> (<a
@@ -1548,8 +1589,8 @@
2.95.3 ObjC Features</a> (<a
href="https://gcc.gnu.org/onlinedocs/gcc-2.95.3/objc-features.ps.gz">also
in PostScript</a>)</li>
- </ul></li>
-</ul>
+ </ul>
+</details>
<h2 id="current">Current development</h2>
--
2.32.0