Skip to content

Commit

Permalink
skeleton of a back and forth implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
lordfeck committed Dec 30, 2024
1 parent ab6829e commit d38542a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions rsru.pl
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
my $imgBasePath; # Base path for "img src=" in output files
my $imgOutDir; # Concatenation of root output dir + user image output dir

#my $linkPrev; # Previous link for permalink (single entity) views.
#my $linkNext; # Next link for permalink views.

# Consts
my $VER = 3.2;
my $DATE_FORMAT = "%Y-%m-%d";
Expand Down Expand Up @@ -374,9 +377,17 @@ sub entrykvs_to_html {
# Do anchor for links from elsewhere. Anchor is currently entry Id (key in %entryKvs)
$filledEntry =~ s/{% KEY %}/$entryId/g;
$filledEntry =~ s/{% PERMALINK %}/$entryKvs{$entryId}{permalink_path}/g if(defined $entryKvs{$entryId}{permalink_path});

# if (0 and $isPermalink) {
# $filledEntry =~ s/{% PREV %}/$entryKvs{$entryId}{permalink_path_prev}/g if(defined $entryKvs{$entryId}{permalink_path_prev});
# $filledEntry =~ s/{% NEXT %}/$entryKvs{$entryId}{permalink_path_next}/g if(defined $entryKvs{$entryId}{permalink_path_next});
# } else {
# }

# say "Filled $entryId:\n$filledEntry" if ($uc{debug});
# only count written entries once
$writtenEntries++ unless $isPermalink;

# say "Filled $entryId:\n$filledEntry" if ($uc{debug});
return \$filledEntry;
}

Expand Down Expand Up @@ -552,7 +563,7 @@ sub prep_tplbottom {
# Print an entry into its permalink template file, i.e. its single page view. Do one for each entry.
# ARGUMENTS: entryId
sub paint_permalink {
my $entryId = shift;
my ($entryId) = @_;
my $catName = $entryKvs{$entryId}{category};
my $title = $entryKvs{$entryId}{title};
my $currentPl = prep_tpltop($catName, undef, $title);
Expand Down

0 comments on commit d38542a

Please sign in to comment.