Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions lib/ES/Book.pm
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ sub _build_book {
my $subject = $self->subject;
my $lang = $self->lang;



return 0 unless $rebuild ||
$source->has_changed( $self->title, $branch );

Expand All @@ -299,7 +301,7 @@ sub _build_book {
private => $self->private( $branch ),
noindex => $self->noindex( $branch ),
multi => $self->is_multi_version,
page_header => $self->_page_header($branch),
page_header => $self->_page_header($branch, $version_dir, $section_title),
section_title => $section_title,
subject => $subject,
toc => $self->toc,
Expand All @@ -324,7 +326,7 @@ sub _build_book {
noindex => $self->noindex( $branch ),
chunk => $self->chunk,
multi => $self->is_multi_version,
page_header => $self->_page_header($branch),
page_header => $self->_page_header($branch, $version_dir, $section_title),
section_title => $section_title,
subject => $subject,
resource => [$checkout],
Expand Down Expand Up @@ -432,12 +434,16 @@ sub _copy_branch_to_current {
#===================================
sub _page_header {
#===================================
my ( $self, $branch ) = @_;
my ( $self, $branch, $version_dir, $section_title ) = @_;
return '' unless $self->is_multi_version;


my $current = $self->current;
return '' if $current eq $branch;

printf("version_dir: %s\n", $version_dir);
printf("section_title: %s\n", $section_title);

# Find the positions of the branch being built ($branch) and the current
# branch ($current) in the list of branches for this book.
my @branches = @{$self->branches};
Expand Down