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
Copy file name to clipboardExpand all lines: README.md
+37-12Lines changed: 37 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,8 @@ Let's see a basic layout called `author.html` so you get a gist of how to render
143
143
{% assign numPosts = paginator.posts | size %}
144
144
{% if numPosts > 0 %}
145
145
{% for post in paginator.posts %}
146
-
{% include postbox.html %}
146
+
<h2>{{ post.title }}</h2>
147
+
<p>{{ post.excerpt }}</p>
147
148
{% endfor %}
148
149
{% else %}
149
150
<p>No posts yet.</p>
@@ -264,17 +265,7 @@ Here's the updated template showcasing the use of the author data:
264
265
</html>
265
266
```
266
267
267
-
## How does it work?
268
-
269
-
The `jekyll-paginate-v2` plugin does a great job at paginating tags, categories and collections. But it doesn't include support for author pagination and autopages. And the project hasn't received much of updates lately, and the existing issues and PRs are stale because of which I decided to make an extension plugin for it.
270
-
271
-
This plugin uses the utilty classes and functions from the `jekyll-paginate-v2` plugin to add custom logic for author page generation.
272
-
273
-
When you run the site, the plugin will go through the unique authors in the site, generating an initial temporary author page for them. Then it loops through the generated author pages and processes the page for pagination. Simultaneously, it also passes the author data from the data file to the page to render the author details.
274
-
275
-
Once the pagination pages are generated, they are written to the `_site` folder with the permalink structure you define.
276
-
277
-
## Side notes
268
+
## Additional info
278
269
279
270
The beauty of using a data file to store authors is that changes in data are reflected without restarting the jekyll server, unlike the `_config.yml` file.
280
271
@@ -300,6 +291,16 @@ Also, a specific author's data can be reused in the post template:
300
291
<p>{{ author_data.bio }}</p>
301
292
```
302
293
294
+
## How does it work?
295
+
296
+
The `jekyll-paginate-v2` plugin does a great job at paginating tags, categories and collections. But it doesn't include support for author pagination and autopages. And the project hasn't received much of updates lately, and the existing issues and PRs are stale because of which I decided to make an extension plugin for it.
297
+
298
+
This plugin uses the utilty classes and functions from the `jekyll-paginate-v2` plugin to add custom logic for author page generation.
299
+
300
+
When you run the site, the plugin will go through the unique authors in the site, generating an initial temporary author page for them. Then it loops through the generated author pages and processes the page for pagination. Simultaneously, it also passes the author data from the data file to the page to render the author details.
301
+
302
+
Once the pagination pages are generated, they are written to the `_site` folder with the permalink structure you define.
303
+
303
304
## Need some inspiration?
304
305
305
306
We are using this plugin to generate the author pages at [Genics Blog](https://genicsblog.com). Have a look at our [`_config.yml`](https://github.com/genicsblog/theme-files/blob/main/_config.yml) file to see how it works.
@@ -319,3 +320,27 @@ I write frequent programming related content on [Genics Blog](https://genicsblog
319
320
## License
320
321
321
322
The gem is available as open source under the terms of the [MIT License](https://github.com/gouravkhunger/jekyll-auto-authors/blob/main/LICENSE).
323
+
324
+
```
325
+
MIT License
326
+
327
+
Copyright (c) 2022 Gourav Khunger
328
+
329
+
Permission is hereby granted, free of charge, to any person obtaining a copy
330
+
of this software and associated documentation files (the "Software"), to deal
331
+
in the Software without restriction, including without limitation the rights
332
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
333
+
copies of the Software, and to permit persons to whom the Software is
334
+
furnished to do so, subject to the following conditions:
335
+
336
+
The above copyright notice and this permission notice shall be included in all
337
+
copies or substantial portions of the Software.
338
+
339
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
340
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
341
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
342
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
343
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
344
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
0 commit comments