Skip to content

Commit 9f0c1a9

Browse files
committed
docs(README.md): improve sections info & order
fixes #5
1 parent 4428a84 commit 9f0c1a9

File tree

1 file changed

+37
-12
lines changed

1 file changed

+37
-12
lines changed

README.md

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ Let's see a basic layout called `author.html` so you get a gist of how to render
143143
{% assign numPosts = paginator.posts | size %}
144144
{% if numPosts > 0 %}
145145
{% for post in paginator.posts %}
146-
{% include postbox.html %}
146+
<h2>{{ post.title }}</h2>
147+
<p>{{ post.excerpt }}</p>
147148
{% endfor %}
148149
{% else %}
149150
<p>No posts yet.</p>
@@ -264,17 +265,7 @@ Here's the updated template showcasing the use of the author data:
264265
</html>
265266
```
266267

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
278269

279270
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.
280271

@@ -300,6 +291,16 @@ Also, a specific author's data can be reused in the post template:
300291
<p>{{ author_data.bio }}</p>
301292
```
302293

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+
303304
## Need some inspiration?
304305

305306
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
319320
## License
320321

321322
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
345+
SOFTWARE.
346+
```

0 commit comments

Comments
 (0)