docs: Better support for module name collisions

In /docs/modules/, show both modules if module IDs are not globally unique.
Show both modules' docs on same page in expandable containers.

In /docs/json/, both modules appear in lists in the doc, but disambiguating them isn't implemented yet.
This commit is contained in:
Matthew Holt 2021-06-02 15:16:15 -06:00
parent 5c3a67692e
commit e132c5c454
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
13 changed files with 265 additions and 126 deletions

View file

@ -2,15 +2,17 @@
<div class="nonstandard-notice">
<b>This module does not come with Caddy.</b> It can be added by using <b><a href="/docs/build#xcaddy">xcaddy</a></b> or our <b><a href="/download">download page</a></b>. Non-standard modules may be developed by the community and are not officially endorsed or maintained by the Caddy project. The documentation is shown here only as a courtesy.
<br><br>
<b>Module repository: <a href="javascript:" class="nonstandard-project-link"></a></b>
<b>Code repository: <a href="javascript:" class="nonstandard-project-link"></a></b>
<br><br>
<b>Custom builds:</b> <code class="bash">xcaddy build --with <span class="nonstandard-package-path"></span></code>
</div>
</div>
<h2 id="docs">Description</h2>
<div id="top-doc">
<div class="top-doc">
<!--Populated by JS-->
</div>
<h2 id="field-list-header">Field List</h2>
<dl id="field-list-contents">
<h2 class="field-list-header">Field List</h2>
<dl class="field-list-contents">
<!--Populated by JS-->
</dl>

View file

@ -1 +1 @@
<pre><code class="json" id="renderbox"><!--Populated by JS--></code></pre>
<pre><code class="json renderbox"><!--Populated by JS--></code></pre>