diff --git a/swh/web/ui/templates/api-endpoints.html b/swh/web/ui/templates/api-endpoints.html index c3d7c819..8db90f86 100644 --- a/swh/web/ui/templates/api-endpoints.html +++ b/swh/web/ui/templates/api-endpoints.html @@ -1,62 +1,63 @@ {% extends "layout.html" %} {% block title %} Software Heritage API – Endpoints {% endblock %} {% block content %} <nav class="bread-crumbs"> <ul> <li><a href="/">API</a></li> <li>/</li> <li>endpoints</li> </ul> </nav> <div class="api-doc"> Below you can find a list of available and upcoming endpoints for version 1 of the Software Heritage API. For a more general introduction please refer to the <a href="/api/">API overview</a>. <noscript> <p> <ul> {% for route, doc in doc_routes %} <li><a href="#{{ route }}">{{ route }}</a></li> {% endfor %} </ul> </p> </noscript> </div> <div class="api-doc table-responsive"> <table class="table table-striped search-res swhtable"> <thead class="thead-default"> <th>Endpoint</th> <th>Status</th> <th>Description</th> </thead> <tbody> {% for route, doc in doc_routes %} <tr class="api-doc-route{% for tag in doc['tags'] %} api-doc-route-{{ tag }} {% endfor %}"> {% if 'tags' in doc and doc['tags'] is not none %} <td id="{{ route }}">{{ route }}</td> <td>{{ ', '.join(doc['tags']) }}</td> {% else %} <td id="{{ route }}"><a href="{{ route }}">{{ route }}</a></td> <td>available</td> {% endif %} - <td>{{ doc['docstring'] | safe_docstring_display | safe }}</td> + {% set doc_intro = doc['docstring'].split('\n\n')[0] %} + <td>{{ doc_intro | safe_docstring_display | safe }}</td> </tr> {% endfor %} </tbody> </table> </div> <script type="text/javascript"> $(document).ready(function() { $('table.swhtable').DataTable({ "paging": false, "info": false, "order": [[1, "asc"]] }); $(".dataTables_filter input").addClass("form-control") }); </script> {% endblock %}