diff --git a/index.pl b/index.pl

index 14fe354925780511523d735cbd8e16051053ea00..9e5dd6905f2f528e1505923ab1b542275dd3a6b4 100755

--- a/index.pl

+++ b/index.pl

@@ -4,7 +4,7 @@ # licenced under BSD 3-Clause licence

# https://git.sr.ht/~rwa/orrg

use strict;

-use DBI;

+use URI::Escape;

use lib 'lib/';

use orrg;

@@ -23,5 +23,25 @@ exit;

sub body

{

- return ('# Welcome to orrg', '', 'orrg is your online rss/atom feed reader for gemini.', '', '=> orrg.pl view a feed', '', '## explore', '', '=> recent.pl top 10 recent feeds', '=> popular.pl top 10 popular feeds', '', '', '=> https://git.sr.ht/~rwa/orrg powered by orrg');

+ my ($cnt, $uri, $name);

+ my $populars = popular_get();

+ if ( defined($populars) ) {

+ ($cnt, $uri, $name) = split / /, @$populars[ rand @$populars ], 3;

+ }

+

+ return (

+ '# Welcome to orrg',

+ '',

+ 'orrg is your online rss/atom feed reader for gemini.',

+ '',

+ '=> orrg.pl view a feed',

+ '',

+ '## explore',

+ '',

+ '=> orrg.pl?'. uri_escape($uri) .' random feed',

+ '=> recent.pl top 10 recent feeds',

+ '=> popular.pl top 10 popular feeds',

+ '',

+ '',

+ '=> https://git.sr.ht/~rwa/orrg powered by orrg');

}