diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-12-15 05:27:13 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-12-26 17:12:29 +0100 |
commit | 522811210ff5353e7100024ae191b2c2b3864f23 (patch) | |
tree | 0c5774f5979ddcd313322bc9fc578d8fac32d054 | |
parent | 495d7f603492db919267209ab19b8e05449b4660 (diff) | |
download | www.replicant.us-522811210ff5353e7100024ae191b2c2b3864f23.tar.gz www.replicant.us-522811210ff5353e7100024ae191b2c2b3864f23.tar.bz2 www.replicant.us-522811210ff5353e7100024ae191b2c2b3864f23.zip |
Remove broken git RSS panel
When migrating away from GitLab (mainly due to too heavy resources
consumption) to cgit, the git RSS feed stopped working as cgit
doesn't generate an unified RSS feed, it cannot be fixed simply
by changing the feed URL.
While it's probably possible to deploy some software like git2rss[1]
to add back an unified RSS feed, we still haven't deployed and
configured such software.
In the meantime, we can remove the broken git RSS panel as it has
been broken for years since we migrated away from GitLab, and
restore it if or when we will have installed new software to bring
back the RSS feed for git.
This commit has been tested with Iceweasel 81.0.2 from Parabola i686
on the static version of this website generated with the make command.
References:
-----------
[1]https://git.remirepo.net/cgit/tools/git2rss.git
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r-- | index.php | 52 |
1 files changed, 0 insertions, 52 deletions
@@ -61,58 +61,6 @@ if ($feed->error() || !$feed_init) { </ul> </div> </div> - <div class="col-md-4"> - <div class="panel panel-default"> - <div class="panel-heading"><span class="glyphicon glyphicon-cog"></span> <a href="https://git.replicant.us/replicant">Replicant git</a></div> - <ul class="list-group"> -<?php -$feed = new SimplePie(); - -$feed->set_feed_url("https://git.replicant.us/groups/replicant.atom"); -$feed->set_cache_location("cache/"); - -$feed_init = $feed->init(); - -if ($feed->error() || !$feed_init) { - print("\t\t\t\t\t<li class=\"list-group-item list-group-item-danger\">Loading RSS feed failed</li>\n"); -} else { - $count = 1; - - foreach ($feed->get_items() as $item) { - preg_match("/git\.replicant\.us\/replicant\/([^\/]*)\//", $item->get_permalink(), $repo); - if ($repo == null) - continue; - - $repo_link = "https://git.replicant.us/replicant/".$repo[1]; - - preg_match("/pushed to project branch ([^ ]*) /", $item->get_title(), $branch); - if ($branch == null) - continue; - - $commits_contents = preg_grep("/<blockquote><p dir=\"auto\">/", explode("\n", $item->get_content())); - if ($commits_contents == null) - continue; - - print("\t\t\t\t\t<li class=\"list-group-item\"><a href=\"".$repo_link."/\">".$repo[1]."</a> (<strong>".$branch[1]."</strong>):<br /><ul>"); - - foreach ($commits_contents as $commit_content) { - preg_match("/<blockquote><p dir=\"auto\">(.*)<\/p>/", $commit_content, $commit); - if ($commit == null) - continue; - - print("<li><a href=\"".$item->get_permalink()."\">".$commit[1]."</a></li>"); - } - - print("</ul><small>Pushed on <strong>".$item->get_date("j F Y")."</strong> by <strong>".$item->get_author()->get_name()."</strong></small></li>\n"); - - if ($count++ >= 8) - break; - } -} -?> - </ul> - </div> - </div> </div> </div> |