You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Artwork by <ahref="https://twitter.com/ericlbarnes">Eric L. Barnes</a> and <ahref="https://twitter.com/Caneco">Caneco</a> from <ahref="https://laravel-news.com/ibis-book-maker">Laravel News</a> ❤️.
5
5
</p>
6
6
7
7
---
8
8
9
9
This PHP tool helps you write eBooks in markdown. Run `ibis build` and an eBook will be generated with:
10
-
10
+
11
11
1. A cover photo.
12
12
2. Clickable auto-generated table of contents.
13
13
3. Code syntax highlighting.
@@ -45,7 +45,7 @@ You may configure your book by editing the `/ibis.php` configuration file.
45
45
46
46
## Writing Your eBook
47
47
48
-
The `init` command will create sample .md files inside the content folder. You can explore those files to see how you can write your book. This sample content is taken from [Laravel Queues in Action](https://learn-laravel-queues.com).
48
+
The `init` command will create sample .md files inside the content folder. You can explore those files to see how you can write your book. This sample content is taken from [Laravel Queues in Action](https://learn-laravel-queues.com).
49
49
50
50
Inside the content directory, you can write multiple `.md` files. Ibis uses the headings to divide the book into parts and chapters:
51
51
@@ -61,7 +61,7 @@ Inside the content directory, you can write multiple `.md` files. Ibis uses the
61
61
### Starting with Ibis
62
62
63
63
<h3> tags define different titles inside a chapter.
64
-
```
64
+
```
65
65
66
66
## Using Fonts
67
67
@@ -91,6 +91,30 @@ ibis sample dark
91
91
92
92
This command will use the generated files from the `ibis build` command to generate samples from your PDF eBook. You can configure which pages to include in the sample by updating the `/ibis.php` file.
93
93
94
+
95
+
## Extending Ibis
96
+
97
+
### Build lifecycle hooks
98
+
99
+
You can customize your Ibis build process by defining lifecycle hook function(s) in your `ibis.php` config;
100
+
101
+
```php
102
+
return [
103
+
104
+
'prehtml' => function($markdown) {
105
+
// preprocesses markdown content before converting to HTML
106
+
return $markdown;
107
+
},
108
+
109
+
'prepdf' => function($html) {
110
+
// preprocesses converted markdown HTML content before writing to PDF
0 commit comments