1
0
mirror of https://github.com/themsaid/ibis.git synced 2025-01-16 21:18:35 +01:00

feat: configurable table of contents levels

This commit is contained in:
jer3m01 2021-03-06 17:25:44 +01:00
parent e671d5e1ba
commit a70a8ba355
2 changed files with 12 additions and 6 deletions

View File

@ -196,9 +196,7 @@ class BuildCommand extends Command
$pdf->setAutoBottomMargin = 'pad';
$tocLevels = [
'H1' => 0, 'H2' => 1
];
$tocLevels = $config['toc_levels'];
$pdf->h2toc = $tocLevels;
$pdf->h2bookmarks = $tocLevels;
@ -224,7 +222,7 @@ HTML
$this->output->writeln('<fg=yellow>==></> Adding Book Cover ...');
$cover = $this->disk->get($currentPath . '/assets/cover.html');
$pdf->WriteHTML($cover);
$pdf->AddPage();

View File

@ -33,6 +33,14 @@ return [
'margin_top' => 14,
],
/**
* Table of Contents Levels
*/
'toc_levels' => [
'H1' => 0,
'H2' => 1,
],
/**
* Cover photo position and dimensions
@ -49,13 +57,13 @@ return [
'sample' => [
[1, 3],
[80, 85],
[100, 103]
[100, 103],
],
/**
* A notice printed at the final page of a generated sample.
*/
'sample_notice' => 'This is a sample from "Laravel Queues in Action" by Mohamed Said. <br>
'sample_notice' => 'This is a sample from "Laravel Queues in Action" by Mohamed Said. <br>
For more information, <a href="https://www.learn-laravel-queues.com/">Click here</a>.',
];