=item *
-C<E<gt> URL[ optional text]E<lt>CRE<gt>> on a separate line will add a
-link to the specified URL (with optional text). Pay attention that line
-contains carriage-return character at the end.
+C<E<gt> URL[ optional text]\r> on a separate line will add a link to the
+specified URL (with optional text). Pay attention that line contains
+carriage-return character at the end.
=item *
-C<I URL[ alt]E<lt>CRE<gt>> on a separate line will add an image with
+C<I URL[ alt]\r> on a separate line will add an image with
optional alternative text similarly as link is specified.
=back
directory will also contain index page with links to all
existing pages in current directory and to subdirectories.
+=head1 (BACK)LINKS GENERATION
+
+Set C<ZK_DO_LINKS=0> to disable automatic links-table creation in the
+HTML output. Set C<ZK_DO_BACKS=0> to disable automatic backlinks-table.
+If C<do-links\r> line is presented, then links-table is forcefully generated.
+C<do-backs\r> generated backlinks table.
+
=head1 HISTORY
Older version of that script, written on Z shell, can be found in Git history.
usage if $#ARGV == -1;
+my $doLinks = ((not exists $ENV{ZK_DO_LINKS}) or
+ ($ENV{ZK_DO_LINKS} eq "1")) ? 1 : 0;
+my $doBacks = ((not exists $ENV{ZK_DO_BACKS}) or
+ ($ENV{ZK_DO_BACKS} eq "1")) ? 1 : 0;
+
my %mtimes;
my %sizes;
my %cats;
}
close $fh;
print $out "</pre>\n";
- if ($#lnks != -1) {
+ if ($doLinks and $#lnks != -1) {
print $out "<a id=\"links\"></a><table border=1><caption>Links</caption>\n";
my $mtime;
while (my ($i, $l) = each @lnks) {
print $out "</table>\n";
}
@lnks = sort keys %{$backs{$page}};
- if ($#lnks != -1) {
+ if ($doBacks and $#lnks != -1) {
print $out "<a id=\"backs\"></a><table border=1><caption>Backlinks</caption>\n";
my $rel;
foreach my $l (@lnks) {