geminispace.info

gemini search engine
git clone https://git.clttr.info/geminispace.info.git
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit 44d21d1de5808ada3c62dcc4ef03bc52b2a30f37
parent 46dff2549af9ca8a6408275ced77be5fddcb5397
Author: Natalie Pendragon <natpen@natpen.net>
Date:   Sat, 11 Jul 2020 08:33:56 -0400

[serve] Update backlinks links and presentation throughout GUS

Diffstat:
Mserve/templates/about.gmi | 2+-
Mserve/templates/backlinks.gmi | 3++-
Mserve/templates/fragments/header.gmi | 1+
Mserve/templates/news.gmi | 3+++
Mserve/templates/search.gmi | 6+++---
5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/serve/templates/about.gmi b/serve/templates/about.gmi @@ -60,6 +60,6 @@ For a given page in Geminispace, backlinks are all the other pages in Geminispac The URL structure for retrieving a certain URL's backlinks page is predictable, should you want to link directly to it in other contexts. All you need to do is URL encode the entire URL you want information on, then pass that as a query to gemini://gus.guru/backlinks. An example follows: -=> gemini://gus.guru/backlinks?gemini%3A//gus.guru/ +=> gemini://gus.guru/backlinks?gus.guru {% include 'fragments/footer.gmi' %} diff --git a/serve/templates/backlinks.gmi b/serve/templates/backlinks.gmi @@ -3,12 +3,13 @@ {% if backlinks | length > 1 %} ## {{ backlinks|length }} backlinks for {{ url }} + {% elif backlinks | length > 0 %} ## {{ backlinks|length }} backlink for {{ url }} + {% else %} ## No backlinks for {{ url }} {% endif %} - {% for backlink in backlinks %} => {{ backlink }} {{ backlink[9:] }} {% endfor %} diff --git a/serve/templates/fragments/header.gmi b/serve/templates/fragments/header.gmi @@ -2,3 +2,4 @@ => / Home => /search Search GUS +=> /backlinks Query backlinks [NEW] diff --git a/serve/templates/news.gmi b/serve/templates/news.gmi @@ -3,6 +3,9 @@ ## News +### 2020-07-11 +Added more prominent header link to backlink queries. + ### 2020-07-05 Added historical statistics page, viewable at gemini://gus.guru/statistics/historical/overall diff --git a/serve/templates/search.gmi b/serve/templates/search.gmi @@ -13,12 +13,12 @@ {% for result in results %} => {{ result["fetchable_url"] }} {{ result["link_text"] }} -{% if verbose %} {% if result["backlinks"] | length > 1 %} -=> /backlinks?{{ result["url"] | urlencode }} {{ result["backlinks"] | length }} backlinks +=> /backlinks?{{ result["url"][9:] | urlencode }} {{ result["backlinks"] | length }} backlinks {% elif result["backlinks"] | length > 0 %} -=> /backlinks?{{ result["url"] | urlencode }} {{ result["backlinks"] | length }} backlink +=> /backlinks?{{ result["url"][9:] | urlencode }} {{ result["backlinks"] | length }} backlink {% endif %} +{% if verbose %} * Score : {{ "{:.2f}".format(result["score"]) }} * Indexed at : {{ "{:%Y-%m-%d %H:%M}".format(result["indexed_at"]) }} * Charset : {{ result["charset"] }}