Commit graph

11 commits

Author SHA1 Message Date
Franciszek Stachura
1762568c85 web: Meta descriptions improvements
* Make source tree descriptions shorter
* Make default title more descriptive
* Add a short summary of results to ident search description
2024-11-05 12:20:02 +01:00
Franciszek Stachura
7d629429bf Generate different meta tag descriptions for different views
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.
2024-08-20 10:35:17 +02:00
Franciszek Stachura
3d34855677 Make full width of directory entry in tree template clickable 2024-07-31 11:33:49 +02:00
Franciszek Stachura
decc2680b2 Move title generation to templates 2024-07-30 15:16:11 +02:00
Franciszek Stachura
5c92b378ea Create file URLs for tree in web.py 2024-07-30 14:10:51 +02:00
Franciszek Stachura
ee4ccdeb80 Provide base source and ident URLs for project and tag as variables 2024-07-30 14:10:51 +02:00
Franciszek Stachura
bf6f183189 Don't display size for directories
* Refactor projects list
2024-07-30 14:10:51 +02:00
Franciszek Stachura
edce92a64c Make url in templates and web.py absolute
This is a step to removing the base tag. Once everything uses absolute
URLs, base tag will be removed and some URLs will be replaced
by relative URLs.
2024-07-30 14:10:51 +02:00
Franciszek Stachura
dbc7191060 Change template variable names to be more descriptive 2024-07-30 14:10:51 +02:00
Franciszek Stachura
554bb11381 Refactor directory tree generation to use a namedtuple
* Fix #302 - Symlinks redirect to invalid paths (but only the directory
  tree part)
* Move more view-related logic to the template
2024-07-30 12:49:29 +02:00
Franciszek Stachura
6e0a1ad64c Move source page generation to templates 2024-07-30 12:49:29 +02:00