From 7160a1858d801109f3e43e838dfe18c443f2b20f Mon Sep 17 00:00:00 2001
From: Domizio Demichelis
Date: Tue, 20 Aug 2019 15:29:05 +0200
Subject: [PATCH] Minor docs changes [ci skip]
---
README.md | 7 ++++++-
docs/how-to.md | 8 ++++----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 0c8541994..fb7f58f4e 100644
--- a/README.md
+++ b/README.md
@@ -17,11 +17,16 @@ Pagy is the ultimate pagination gem that outperforms the others in each and ever
- Pagy 3.0+ is considerably faster, lighter and more efficient than 2.0+ on modern environments (see the charts below)
- The javascript nav helpers have been refactored for improved performance and more intuitive API
- The i18n has been refactored, the dictionary files are simpler and 100% compliant with the i18n gem
+- Added a few new [extras](https://ddnexus.github.io/pagy/extras)
- Added [Maximizing Performance](https://ddnexus.github.io/pagy/how-to#maximizing-performance) docs as a practical guide to choose the best options for your requirements and environment
**Notice**: Updating from 2.0+ to 3.0+ requires just some search and replace and a little reorganization of your custom i18n dictionaries. Check the [CHANGELOG](https://github.com/ddnexus/pagy/blob/master/CHANGELOG.md) for details.
-**Suggestion**: If you are using any `pagy*_nav` helper, [consider to switch](https://ddnexus.github.io/pagy/how-to#consider-the-nav_js) to `pagy*_nav_js`, which gives you the same output with a substancial performance boost.
+**Suggestions**:
+
+- If you are using any `pagy*_nav` helper, [consider to switch](https://ddnexus.github.io/pagy/how-to#consider-the-nav_js) to `pagy*_nav_js`, which gives you the same output with a substancial performance boost.
+- If you are using any javascript frontend, take a look at the [metadata](https://ddnexus.github.io/pagy/extras/metadata) extra
+- For API pagination take a look at the [headers](http://ddnexus.github.io/pagy/extras/headers) extra
## Comparison with other gems
diff --git a/docs/how-to.md b/docs/how-to.md
index 4f521f423..654e09f16 100644
--- a/docs/how-to.md
+++ b/docs/how-to.md
@@ -45,7 +45,7 @@ This page contains the practical tips and examples to get the job done with Pagy
5. Render the pagination:
- - If your app renders the views server-side:
+ - Option A: if your app renders the views server-side:
1. Include the frontend in some helper (e.g. `ApplicationHelper` in Rails):
@@ -60,13 +60,13 @@ This page contains the practical tips and examples to get the job done with Pagy
```erb
<%== pagy_nav(@pagy) %>
```
- - or it with an easy customizable template:
+ - or with an easy customizable template:
```erb
<%== render 'pagy/nav', locals: {pagy: @pagy} %>
```
- - If your app renders the views with a javascript framework (e.g. Vue.js, react.js, ...), you don't need the `include Pagy::Frontend` in `ApplicationHelper`, instead:
+ - Option B: if your app renders the views with a javascript framework (e.g. Vue.js, react.js, ...), you don't need the `include Pagy::Frontend` in `ApplicationHelper`, instead:
1. require the [metadata extra](extras/metadata.md) by uncommenting the following line in your [pagy.rb](https://github.com/ddnexus/pagy/blob/master/lib/config/pagy.rb) file:
@@ -81,7 +81,7 @@ This page contains the practical tips and examples to get the job done with Pagy
pagy: pagy_metadata(@pagy) }
```
- - If your app is an API service consumed by some client and doesn't provide any UI on its own, you don't need the `include Pagy::Frontend` in `ApplicationHelper`, instead:
+ - Option C: if your app is an API service consumed by some client and doesn't provide any UI on its own, you don't need the `include Pagy::Frontend` in `ApplicationHelper`, instead:
1. require the [headers extra](extras/headers.md) by uncommenting it in your [pagy.rb](https://github.com/ddnexus/pagy/blob/master/lib/config/pagy.rb) file: