Added an ability to customize contents of meta description tag in templates that inherit from layout. This replaces the default description previously used in all views. This change could help with SEO and missing descriptions in search results (#167). It's based on advice from https://developers.google.com/search/docs/appearance/snippet > Create unique descriptions for each page on your site > Programmatically generate descriptions This is not guaranteed to fix the issue, search engines are opaque. All custom descriptions start with "Elixir Cross Referencer - ". Currently customized descriptions: * source - path to the file, project name and version * ident - name of the searched identifier, project name and version Everything else uses the previous, default description.
51 lines
1.7 KiB
HTML
51 lines
1.7 KiB
HTML
{% extends "layout.html" %}
|
|
|
|
{% block title %}
|
|
{{ title_path }} {{ current_project|capitalize }} source code ({{ current_tag }}) - Bootlin
|
|
{% endblock %}
|
|
|
|
{% block description -%}
|
|
{%- if path == '' -%}
|
|
Elixir Cross Referencer - explore {{ current_project|capitalize }} {{ current_tag }} source code in your browser.
|
|
{%- else -%}
|
|
Elixir Cross Referencer - source tree of {{ current_project|capitalize }} (version {{ current_tag }}). Browsed path: {{ '/' if path|length == 0 else path }}
|
|
{%- endif -%}
|
|
{%- endblock -%}
|
|
|
|
{% block main %}
|
|
|
|
<div class="lxrtree">
|
|
<table>
|
|
<tbody>
|
|
{% if back_url is not none %}
|
|
<tr>
|
|
<td><a class="tree-icon icon-back" href="{{ back_url }}">Parent directory</a></td>
|
|
<td><a tabindex="-1" class="size" href="{{ back_url }}"></a></td>
|
|
</tr>
|
|
{% endif %}
|
|
{% for type, name, path, url, size in dir_entries %}
|
|
<tr>
|
|
<td>
|
|
<a class="tree-icon icon-{{- type if type != 'symlink' else 'blob' -}}"
|
|
href="{{ url }}">
|
|
{% if type == 'symlink' %}
|
|
{{ name }} -> {{ path }}
|
|
{% else %}
|
|
{{ name }}
|
|
{% endif %}
|
|
</a>
|
|
</td>
|
|
<td>
|
|
<a tabindex="-1" class="size" href="{{ url }}">
|
|
{% if size is not none %}
|
|
{{ size }} bytes
|
|
{% endif %}
|
|
</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
{% endblock %}
|