]> BookStack Code Mirror - website/commitdiff
Tweaked webidx search indexing further
authorDan Brown <redacted>
Sun, 28 Jan 2024 17:16:55 +0000 (17:16 +0000)
committerDan Brown <redacted>
Sun, 28 Jan 2024 17:16:55 +0000 (17:16 +0000)
content/docs/admin/_index.md
content/docs/user/_index.md
search/webidx.pl

index 79008feda3a4d271c2010bf2dd6382575ec7ae19..38e822bb3024c1f5089e0b2cec895b118afb854c 100644 (file)
@@ -1,4 +1,4 @@
 ---
-title: "BookStack Blog"
+title: "Admin Documentation"
 type: "admin-doc"
 ---
\ No newline at end of file
index 3c7c3021800379d0ed0e812f8a04a4984c1b07bb..7f131ae31695fc214d1b98aa4f4149ee18d778ee 100644 (file)
@@ -1,4 +1,4 @@
 ---
-title: "BookStack Blog"
+title: "User Documentation"
 type: "user-doc"
 ---
\ No newline at end of file
index ae4c86e5e770c1127138964c0f8887247e67a196..3bacf2518ad95e4f551d246c429cbfe19652a159 100644 (file)
@@ -56,7 +56,7 @@ my $db = DBI->connect('dbi:SQLite:dbname='.$dbfile, '', '', {
 #
 # a list of words we want to exclude
 #
-my @common = qw(be and of a in to it i for he on do at but from that not by or as can who get if my as up so me the are we was is);
+my @common = qw(be and of a in to it i for he on do at but from that not by or as can who get if my as up so me the are we was is you this with an when want our there has);
 
 #
 # this is a map of filename => page title
@@ -229,16 +229,18 @@ sub index_html {
         # start tag handler
         #
         'start_h' => [sub {
-            #
-            # add the alt attributes of images, and any title attributes found
-            #
-            $text .= " ".$_[1]->{'alt'} if (lc('img') eq $_[0]);
-            $text .= " ".$_[1]->{'title'} if (defined($_[1]->{'title'}));
-
             $currtag = $_[0];
             if ('main' eq $currtag) {
                 $inmain = 1;
             }
+
+            if ($inmain) {
+                #
+                # add the alt attributes of images, and any title attributes found
+                #
+                $text .= " ".$_[1]->{'alt'} if (lc('img') eq $_[0]);
+                $text .= " ".$_[1]->{'title'} if (defined($_[1]->{'title'}));
+            }
         }, qq{tag,attr}],
 
         #