diff --git a/docs/_guides/async-code.md b/docs/_guides/async-code.md index f6f6ce9ee8..7be73c8969 100644 --- a/docs/_guides/async-code.md +++ b/docs/_guides/async-code.md @@ -50,7 +50,7 @@ If you already understand promises, you can [skip to the next section](updating- {% markdown %} **What about async/await?** Async functions are an experimental ES7 syntax that enhances promise-based APIs by adding -the `async` and `await` keywords. For more information about `async`/`await`, read [our introductory blog post](http://pouchdb.com/2015/03/05/taming-the-async-beast-with-es7.html). +the `async` and `await` keywords. For more information about `async`/`await`, read [our introductory blog post]({{ site.baseurl }}/2015/03/05/taming-the-async-beast-with-es7.html). {% endmarkdown %} {% include alert/end.html%} diff --git a/docs/_guides/bulk-operations.md b/docs/_guides/bulk-operations.md index 127b101b64..fb487c6524 100644 --- a/docs/_guides/bulk-operations.md +++ b/docs/_guides/bulk-operations.md @@ -120,7 +120,7 @@ You can see **[a live example](http://bl.ocks.org/nolanlawson/8f58dbc360348a4c95 Far too many developers overlook this valuable API, because they misunderstand it. When a developer says "my PouchDB app is slow!", it is usually because they are using the slow `query()` API when they should be using the fast `allDocs()` API. -For details on how to effectively use `allDocs()`, you are strongly recommended to read ["Pagination strategies with PouchDB"](http://pouchdb.com/2014/04/14/pagination-strategies-with-pouchdb.html). For 99% of your applications, you should be able to use `allDocs()` for all the pagination/sorting/searching functionality that you need. +For details on how to effectively use `allDocs()`, you are strongly recommended to read ["Pagination strategies with PouchDB"]({{ site.baseurl }}/2014/04/14/pagination-strategies-with-pouchdb.html). For 99% of your applications, you should be able to use `allDocs()` for all the pagination/sorting/searching functionality that you need. {% include anchor.html title="Related API documentation" hash="related-api-documentation" %} diff --git a/docs/_guides/mango-queries.md b/docs/_guides/mango-queries.md index 14b632467d..ffc4c265aa 100644 --- a/docs/_guides/mango-queries.md +++ b/docs/_guides/mango-queries.md @@ -105,7 +105,7 @@ db.find({ }); ``` -In this case, we only get 10 documents back, but they are the first 10 documents, sorted by name. This means that we have only read 10 documents out of the database into memory, which can be used for [efficient pagination](http://pouchdb.com/2014/04/14/pagination-strategies-with-pouchdb.html). +In this case, we only get 10 documents back, but they are the first 10 documents, sorted by name. This means that we have only read 10 documents out of the database into memory, which can be used for [efficient pagination]({{ site.baseurl }}/2014/04/14/pagination-strategies-with-pouchdb.html). For instance, if we are displaying the first 10 results on a single page, and the user clicks "next" to see the next page, we can restructure our query based on the last result, to continue the pagination. Let's imagine the first 10 documents' `name`s are: diff --git a/docs/_guides/queries.md b/docs/_guides/queries.md index bad87e4f2d..7c57c4ec35 100644 --- a/docs/_guides/queries.md +++ b/docs/_guides/queries.md @@ -219,7 +219,7 @@ pouch.query(myMapReduceFun, { }); ``` -If you're adventurous, though, you should check out the [CouchDB documentation](http://couchdb.readthedocs.org/en/latest/couchapp/views/intro.html) or the [PouchDB documentation](http://pouchdb.com/api.html#query_database) for details on reduce functions. +If you're adventurous, though, you should check out the [CouchDB documentation](http://couchdb.readthedocs.org/en/latest/couchapp/views/intro.html) or the [PouchDB documentation]({{ site.baseurl }}/api.html#query_database) for details on reduce functions. {% include anchor.html title="Avoiding map/reduce" hash="avoiding-map-reduce" %} diff --git a/docs/_guides/replication.md b/docs/_guides/replication.md index 7968f0c089..0906b363a8 100644 --- a/docs/_guides/replication.md +++ b/docs/_guides/replication.md @@ -171,7 +171,7 @@ Any PouchDB object can replicate to any other PouchDB object. So for instance, y This can be very powerful, because it enables lots of fancy scenarios. For example: -1. You have an [in-memory PouchDB](http://pouchdb.com/adapters.html#pouchdb_in_the_browser) that replicates with a local PouchDB, acting as a cache. +1. You have an [in-memory PouchDB]({{ site.baseurl }}/adapters.html#pouchdb_in_the_browser) that replicates with a local PouchDB, acting as a cache. 2. You have many remote CouchDB databases that the user may access, and they are all replicated to the same local PouchDB. 3. You have many local PouchDB databases, which are mirrored to a single remote CouchDB as a backup store. diff --git a/docs/_includes/api/create_document.html b/docs/_includes/api/create_document.html index 3f10f12473..a8c563d2d9 100644 --- a/docs/_includes/api/create_document.html +++ b/docs/_includes/api/create_document.html @@ -9,7 +9,7 @@ If you want to update an existing document even if there's conflict, you should specify the base revision `_rev` and use `force=true` option, then a new conflict revision will be created. -`doc` must be a "pure JSON object", i.e. a collection of name/value pairs. If you try to store non-JSON data (for instance `Date` objects) you may see [inconsistent results](http://pouchdb.com/errors.html#could_not_be_cloned). +`doc` must be a "pure JSON object", i.e. a collection of name/value pairs. If you try to store non-JSON data (for instance `Date` objects) you may see [inconsistent results]({{ site.baseurl }}/errors.html#could_not_be_cloned). #### Example Usage: diff --git a/docs/_includes/api/delete_document.html b/docs/_includes/api/delete_document.html index ebb5e2b86a..22b894e4f9 100644 --- a/docs/_includes/api/delete_document.html +++ b/docs/_includes/api/delete_document.html @@ -13,7 +13,7 @@ Deletes the document. `doc` is required to be a document with at least an `_id` and a `_rev` property. Sending the full document will work as well. -See [filtered replication](http://pouchdb.com/api.html#filtered-replication) for why you might want to use `put()` with `{_deleted: true}` instead. +See [filtered replication]({{ site.baseurl }}/api.html#filtered-replication) for why you might want to use `put()` with `{_deleted: true}` instead. #### Example Usage: diff --git a/docs/_includes/api/overview.html b/docs/_includes/api/overview.html index 7c7584e048..02df9305fd 100644 --- a/docs/_includes/api/overview.html +++ b/docs/_includes/api/overview.html @@ -52,7 +52,7 @@ } {% endhighlight %} -Any `await` not inside of an async function is a syntax error. For more information about `async`/`await`, read [our introductory blog post](http://pouchdb.com/2015/03/05/taming-the-async-beast-with-es7.html). +Any `await` not inside of an async function is a syntax error. For more information about `async`/`await`, read [our introductory blog post]({{ site.baseurl }}/2015/03/05/taming-the-async-beast-with-es7.html). [promise]: https://www.promisejs.org/ [lie]: https://github.com/calvinmetcalf/lie diff --git a/docs/_includes/api/save_attachment.html b/docs/_includes/api/save_attachment.html index 53e95d2cee..cfb2812349 100644 --- a/docs/_includes/api/save_attachment.html +++ b/docs/_includes/api/save_attachment.html @@ -8,7 +8,7 @@ This method will update an existing document to add the attachment, so it requires a `rev` if the document already exists. If the document doesn't already exist, then this method will create an empty document containing the attachment. -What's the point of attachments? If you're dealing with large binary data (such as PNGs), you may incur a performance or storage penalty if you naïvely include them as base64- or hex-encoded strings inside your documents. But if you insert the binary data as an attachment, then PouchDB will attempt to store it in [the most efficient way possible](http://pouchdb.com/faq.html#data_types). +What's the point of attachments? If you're dealing with large binary data (such as PNGs), you may incur a performance or storage penalty if you naïvely include them as base64- or hex-encoded strings inside your documents. But if you insert the binary data as an attachment, then PouchDB will attempt to store it in [the most efficient way possible]({{ site.baseurl }}/faq.html#data_types). For details, see the [CouchDB documentation on attachments](https://docs.couchdb.org/en/stable/api/document/attachments.html#put--db-docid-attname). diff --git a/docs/_posts/2014-04-14-pagination-strategies-with-pouchdb.md b/docs/_posts/2014-04-14-pagination-strategies-with-pouchdb.md index a1191aff32..42072f5a41 100644 --- a/docs/_posts/2014-04-14-pagination-strategies-with-pouchdb.md +++ b/docs/_posts/2014-04-14-pagination-strategies-with-pouchdb.md @@ -34,7 +34,7 @@ pouch.bulkDocs({docs : docs}, function (err, response) { }); ``` -Now, the simplest kind of Pouch query, called [`allDocs()`](http://pouchdb.com/api.html#batch_fetch), doesn't do any pagination by default. As the name implies, it just returns all the docs: +Now, the simplest kind of Pouch query, called [`allDocs()`]({{ site.baseurl }}/api.html#batch_fetch), doesn't do any pagination by default. As the name implies, it just returns all the docs: ```javascript pouch.allDocs(function (err, response) { @@ -421,6 +421,6 @@ So congratulations, you're now a [Page Master]! Try to use your newfound powers [couch-query-api]: https://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options [js-string-ordering]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#Comparing_strings [collation-specification]: http://docs.couchdb.org/en/latest/couchapp/views/collation.html#collation-specification - [query-api]: http://pouchdb.com/api.html#query_database + [query-api]: {{ site.baseurl }}/api.html#query_database [page master]: https://en.wikipedia.org/wiki/Pagemaster - [remove]: http://pouchdb.com/api.html#delete_document + [remove]: {{ site.baseurl }}/api.html#delete_document diff --git a/docs/_posts/2014-05-01-secondary-indexes-have-landed-in-pouchdb.md b/docs/_posts/2014-05-01-secondary-indexes-have-landed-in-pouchdb.md index 5a461ea8a9..720117ff05 100644 --- a/docs/_posts/2014-05-01-secondary-indexes-have-landed-in-pouchdb.md +++ b/docs/_posts/2014-05-01-secondary-indexes-have-landed-in-pouchdb.md @@ -133,7 +133,7 @@ pouch.query(myMapFunction, { {% include alert/start.html variant="info"%} -The pagination options for query() – i.e., startkey/endkey/key/keys/skip/limit/descending – are exactly the same as with allDocs(). For a beginner's guide to pagination, read Pagination strategies with PouchDB. +The pagination options for query() – i.e., startkey/endkey/key/keys/skip/limit/descending – are exactly the same as with allDocs(). For a beginner's guide to pagination, read Pagination strategies with PouchDB. {% include alert/end.html %} @@ -157,7 +157,7 @@ pouch.query(myMapReduceFun, { }); ``` -If you're adventurous, though, you should check out the [CouchDB documentation](http://couchdb.readthedocs.org/en/latest/couchapp/views/intro.html) or the [PouchDB documentation](http://pouchdb.com/api.html#query_database) for details on reduce functions. +If you're adventurous, though, you should check out the [CouchDB documentation](http://couchdb.readthedocs.org/en/latest/couchapp/views/intro.html) or the [PouchDB documentation]({{ site.baseurl }}/api.html#query_database) for details on reduce functions. Map/reduce, reuse, recycle ---------- diff --git a/docs/_posts/2014-06-17-12-pro-tips-for-better-code-with-pouchdb.md b/docs/_posts/2014-06-17-12-pro-tips-for-better-code-with-pouchdb.md index 877abdbf25..72583e558b 100644 --- a/docs/_posts/2014-06-17-12-pro-tips-for-better-code-with-pouchdb.md +++ b/docs/_posts/2014-06-17-12-pro-tips-for-better-code-with-pouchdb.md @@ -109,7 +109,7 @@ You are taking this thing which is meant to sort and organize data, and you're g ### 5. Use plugins -[PouchDB has plugins](http://pouchdb.com/external.html). Use them, and if inspiration ever strikes, [write your own](https://github.com/pouchdb/plugin-seed)! +[PouchDB has plugins]({{ site.baseurl }}/external.html). Use them, and if inspiration ever strikes, [write your own](https://github.com/pouchdb/plugin-seed)! ### 6. Don't just update docs for the hell of it @@ -117,7 +117,7 @@ Every time you modify a document, another revision is added to its revision hist ### 7. Use and abuse your doc IDs -I already wrote [a blog post about this](http://pouchdb.com/2014/05/01/secondary-indexes-have-landed-in-pouchdb.html), but basically, if you don't want bad performance from your secondary indexes, the best strategy is to avoid secondary indexes altogether. The primary index should be sufficient for sorting and searching in nearly all of your applications, or at least for the hot-path code. +I already wrote [a blog post about this]({{ site.baseurl }}/2014/05/01/secondary-indexes-have-landed-in-pouchdb.html), but basically, if you don't want bad performance from your secondary indexes, the best strategy is to avoid secondary indexes altogether. The primary index should be sufficient for sorting and searching in nearly all of your applications, or at least for the hot-path code. Also, if you really want to get fancy with your doc IDs, you can use [PouchDB Collate](https://github.com/pouchdb/collate/) to serialize arbitrary data into strings that are sorted according to [CouchDB collation ordering](https://docs.couchdb.org/en/latest/ddocs/views/collation.html). This allows you to index on arrays, objects, numbers – whatever you want: @@ -178,7 +178,7 @@ if (!pouch.adapter) { // websql not supported by this browser ### 9. Move logic from the map function to query() -If you only remember one thing from [my blog post about secondary indexes](http://pouchdb.com/2014/05/01/secondary-indexes-have-landed-in-pouchdb.html), remember this: every `map` function you write has to be executed for every single document in your database. No exceptions. +If you only remember one thing from [my blog post about secondary indexes]({{ site.baseurl }}/2014/05/01/secondary-indexes-have-landed-in-pouchdb.html), remember this: every `map` function you write has to be executed for every single document in your database. No exceptions. On the other hand, the `query()` options like `startkey`, `endkey`, `key`, and `keys` have been optimized to hell, and they leverage the native indexes in the database to deliver the maximum possible performance. @@ -235,7 +235,7 @@ function getPostsBetween(startTime, endTime) { } ``` -(That `createDesignDoc()` helper function comes from [this blost post](http://pouchdb.com/2014/05/01/secondary-indexes-have-landed-in-pouchdb.html).) +(That `createDesignDoc()` helper function comes from [this blost post]({{ site.baseurl }}/2014/05/01/secondary-indexes-have-landed-in-pouchdb.html).) Not only is the above code much simpler, but it's also faster and more tweakable. No need to completely rebuild the index when your query changes; just switch around `startkey`/`endkey`/`descending` and friends at query time to get the data you want. diff --git a/docs/_posts/2014-07-25-pouchdb-levels-up.md b/docs/_posts/2014-07-25-pouchdb-levels-up.md index d615d27bec..434b955908 100644 --- a/docs/_posts/2014-07-25-pouchdb-levels-up.md +++ b/docs/_posts/2014-07-25-pouchdb-levels-up.md @@ -42,7 +42,7 @@ This brings us back to Nick Thompson's [LevelUP proposal](https://github.com/pou For instance, there was [a longstanding issue](https://github.com/pouchdb/pouchdb/issues/44) to add LocalStorage support for older browsers like IE 8 and 9. With LevelUP, we could avoid writing an entirely new, fourth adapter and simply plug into [localstorage-down](https://github.com/No9/localstorage-down). And it certainly wouldn't hurt to have Riak, Redis, or an in-memory database as potential backends. -There was some hemming and hawing (mostly from me), but in the end we decided to cruise ahead with the proposal. (And ultimately, I was happily proven wrong.) Calvin Metcalf deserves the primary credit for integrating [Sublevel](https://github.com/dominictarr/level-sublevel) into the LevelDB adapter, while Adam Shih jumped in to get the new adapter browserified with three different backends: localstorage-down, level-js, and MemDOWN. I put the finishing touches to build them as separate plugins, and as of 2.2.3 they're fully passing the test suite and [ready to use](http://pouchdb.com/adapters.html#pouchdb_in_the_browser). +There was some hemming and hawing (mostly from me), but in the end we decided to cruise ahead with the proposal. (And ultimately, I was happily proven wrong.) Calvin Metcalf deserves the primary credit for integrating [Sublevel](https://github.com/dominictarr/level-sublevel) into the LevelDB adapter, while Adam Shih jumped in to get the new adapter browserified with three different backends: localstorage-down, level-js, and MemDOWN. I put the finishing touches to build them as separate plugins, and as of 2.2.3 they're fully passing the test suite and [ready to use]({{ site.baseurl }}/adapters.html#pouchdb_in_the_browser). Additionally, [PouchDB Server](https://github.com/pouchdb/pouchdb-server) has been updated to allow the use of alternate backends via the `--level-backend` option. This provides an instant CouchDB REST API to any LevelUP-compliant datastore – Redis, Riak, MySQL, you name it. There's also a new `--in-memory` option, courtesy of MemDOWN, of course. diff --git a/docs/_posts/2014-09-04-pouchdb-3.0.4.md b/docs/_posts/2014-09-04-pouchdb-3.0.4.md index 455fd14854..fc6fec8ae6 100644 --- a/docs/_posts/2014-09-04-pouchdb-3.0.4.md +++ b/docs/_posts/2014-09-04-pouchdb-3.0.4.md @@ -7,7 +7,7 @@ author: Calvin Metcalf --- -This week we present [PouchDB 3.0.4](https://github.com/pouchdb/pouchdb/releases/tag/3.0.4), which fixes a bunch of stuff with attachments. Now the kittens generated by the [3.0.0 release](http://pouchdb.com/2014/08/12/pouchdb-3.0.0.html) may be safely stored in Pouch. +This week we present [PouchDB 3.0.4](https://github.com/pouchdb/pouchdb/releases/tag/3.0.4), which fixes a bunch of stuff with attachments. Now the kittens generated by the [3.0.0 release]({{ site.baseurl }}/2014/08/12/pouchdb-3.0.0.html) may be safely stored in Pouch. {% include img.html src="kittens_small.jpg" alt="Kittens" %} diff --git a/docs/_posts/2014-10-26-10-things-i-learned-from-reading-and-writing-the-pouchdb-source.md b/docs/_posts/2014-10-26-10-things-i-learned-from-reading-and-writing-the-pouchdb-source.md index 17f82f94d8..e9e35cf76b 100644 --- a/docs/_posts/2014-10-26-10-things-i-learned-from-reading-and-writing-the-pouchdb-source.md +++ b/docs/_posts/2014-10-26-10-things-i-learned-from-reading-and-writing-the-pouchdb-source.md @@ -39,7 +39,7 @@ User agent sniffing! Yes, we should be ashamed of ourselves. But here's why we d * In modern **Chrome** and **Android 4.4+**, the size is simply ignored. The browser calculates the remaining size on disk and sets a limit based on that. * Aha, but in **Android < 4.4**, this is actually a hard limit! So if you ask for 5000000, you'll only ever get 5 MB. -* Oh, but in **Safari/iOS**, it gets trickier. If you ask for > 5000000, then it will show an [annoying popup](http://pouchdb.com/errors.html#not_enough_space) when the app is first loaded, which is a great way to spook your users. But if you ask for less, then there's another popup when the database reaches 5MB, and beyond that there's a bug in iOS 7.1 where the browser will no longer show any more popups, so you're forever capped at 10MB. To store more than 10MB, you need to ask for more than 10MB up-front. +* Oh, but in **Safari/iOS**, it gets trickier. If you ask for > 5000000, then it will show an [annoying popup]({{ site.baseurl }}/errors.html#not_enough_space) when the app is first loaded, which is a great way to spook your users. But if you ask for less, then there's another popup when the database reaches 5MB, and beyond that there's a bug in iOS 7.1 where the browser will no longer show any more popups, so you're forever capped at 10MB. To store more than 10MB, you need to ask for more than 10MB up-front. * Additionally, if you specify anywhere between 0 and 5000000, Safari and iOS will use that size as a hint for when, precisely, to show the popup. And in the case of PouchDB, we need to avoid the popup in our automated tests, because Selenium doesn't give us a way to press the "OK" button, meaning our tests would just fail if we request too much. So the ideal size to request is 0. * However, in **PhantomJS** and older WebKit (Safari ~5), if you request 0, then it will blow up. @@ -226,7 +226,7 @@ var seqCursor = index.openCursor(range); Did we mess up? Nope, it's intentional: we concatenate the strings together, because [IE does not support complex keys](https://connect.microsoft.com/IE/feedbackdetail/view/866474). -This also heavily influenced our design for [persistent map/reduce](http://pouchdb.com/2014/05/01/secondary-indexes-have-landed-in-pouchdb.html), because instead of assuming the underlying database can sort by more than one value, we invented [a toIndexableString() function](https://github.com/pouchdb/collate/blob/0e22e6e833e24ee5d677d73df2620c20b58aba1f/lib/index.js#L116-L165) that converts any JSON object into a big CouchDB-collation-ordered string. Yeah, we went there. +This also heavily influenced our design for [persistent map/reduce]({{ site.baseurl }}/2014/05/01/secondary-indexes-have-landed-in-pouchdb.html), because instead of assuming the underlying database can sort by more than one value, we invented [a toIndexableString() function](https://github.com/pouchdb/collate/blob/0e22e6e833e24ee5d677d73df2620c20b58aba1f/lib/index.js#L116-L165) that converts any JSON object into a big CouchDB-collation-ordered string. Yeah, we went there. ### 6. IndexedDB throws an error if you try to iterate backwards with start/end keys @@ -415,7 +415,7 @@ What's more intriguing is that you can even find [the influence of CouchDB](http In a sense, this statement may be the earliest expression of what eventually became PouchDB! -Furthermore, Google went on to create LevelDB as their implementation of the IndexedDB spec, which is currently enjoying [enormous popularity in the Node.js ecosystem](http://dailyjs.com/2013/04/19/leveldb-and-node-1/), especially thanks to [the LevelUP project](https://github.com/rvagg/node-levelup). PouchDB itself [has hopped on the LevelUP bandwagon](http://pouchdb.com/2014/07/25/pouchdb-levels-up.html), and today we have PouchDB Server, which is a nearly-complete implementation of CouchDB's HTTP API, but based on Node.js and LevelDB. +Furthermore, Google went on to create LevelDB as their implementation of the IndexedDB spec, which is currently enjoying [enormous popularity in the Node.js ecosystem](http://dailyjs.com/2013/04/19/leveldb-and-node-1/), especially thanks to [the LevelUP project](https://github.com/rvagg/node-levelup). PouchDB itself [has hopped on the LevelUP bandwagon]({{ site.baseurl }}/2014/07/25/pouchdb-levels-up.html), and today we have PouchDB Server, which is a nearly-complete implementation of CouchDB's HTTP API, but based on Node.js and LevelDB. So from the earliest discussions of IndexedDB, influenced as it was by CouchDB and Web SQL, through LevelDB and the LevelUP ecosystem, we now have a database that unites them all: PouchDB. diff --git a/docs/_posts/2014-11-10-3.1.0.md b/docs/_posts/2014-11-10-3.1.0.md index e9a00b6ac4..9fdf1695c1 100644 --- a/docs/_posts/2014-11-10-3.1.0.md +++ b/docs/_posts/2014-11-10-3.1.0.md @@ -15,7 +15,7 @@ This release includes a migration. Your existing database will be updated automa ### PouchDB Guides ([#2766](https://github.com/pouchdb/pouchdb/issues/2766)) -Nolan Lawson and Nick Colley worked together to produce some excellent guides to PouchDB which you can see @ [http://pouchdb.com/guides/](http://pouchdb.com/guides/). They cover a lot of the issues surrounding building PouchDB applications including conflicts and promises vs callbacks. As a bonus the guides as well as the rest of the website [now work offline](https://github.com/pouchdb/pouchdb/issues/2957). +Nolan Lawson and Nick Colley worked together to produce some excellent guides to PouchDB which you can see @ [{{ site.baseurl }}/guides/]({{ site.baseurl }}/guides/). They cover a lot of the issues surrounding building PouchDB applications including conflicts and promises vs callbacks. As a bonus the guides as well as the rest of the website [now work offline](https://github.com/pouchdb/pouchdb/issues/2957). ### Compaction removes orphaned attachments ([#2818](https://github.com/pouchdb/pouchdb/issues/2818)) @@ -27,7 +27,7 @@ There is a big change brewing in CouchDB world, [https://issues.apache.org/jira/ ### In related news -We keep a list of [plugins and related external projects](http://pouchdb.com/external.html) to PouchDB, here are a few new ones we added during this month: +We keep a list of [plugins and related external projects]({{ site.baseurl }}/external.html) to PouchDB, here are a few new ones we added during this month: * PouchDB [Dump](https://github.com/nolanlawson/pouchdb-dump-cli) and [Load](https://github.com/nolanlawson/pouchdb-load) are designed to help you load data into your newly started PouchDB app faster than replication will do currently. * If you want to use PouchDB with Angular, you are in luck, there are now 4! adapters to help you integrate them: [angular-pouchdb](https://github.com/wspringer/angular-pouchdb), [Factoryng](https://github.com/redgeoff/factoryng), [ngPouch](https://github.com/jrhicks/ngPouch), [ng-pouchdb](https://github.com/danielzen/ng-pouchdb). diff --git a/docs/_posts/2015-02-14-a-quick-one.md b/docs/_posts/2015-02-14-a-quick-one.md index 42cb2660fe..a14717ee09 100644 --- a/docs/_posts/2015-02-14-a-quick-one.md +++ b/docs/_posts/2015-02-14-a-quick-one.md @@ -27,13 +27,13 @@ As noted above, `db.info()` now provides adapter-specific debugging info, such a * `idb_attachment_format`: (IndexedDB) either `'base64'` or `'binary'`, depending on whether the browser [supports binary blobs](/faq.html#data_types). * `sqlite_plugin`: (WebSQL) true if the [SQLite Plugin][] is being used. -* `websql_encoding`: (WebSQL) either `'UTF-8'` or `'UTF-16'`, depending on the [WebSQL implementation](http://pouchdb.com/faq.html#data_types) +* `websql_encoding`: (WebSQL) either `'UTF-8'` or `'UTF-16'`, depending on the [WebSQL implementation]({{ site.baseurl }}/faq.html#data_types) This should not be considered a stable API, since it's only for debugging and could change at any time. ### RSS feed -Thanks to Nick Colley, the PouchDB blog is now available as an RSS feed! Point your RSS reader over to [pouchdb.com/feed.xml](http://pouchdb.com/feed.xml) and get notified whenever a new PouchDB version is released. +Thanks to Nick Colley, the PouchDB blog is now available as an RSS feed! Point your RSS reader over to [pouchdb.com/feed.xml]({{ site.baseurl }}/feed.xml) and get notified whenever a new PouchDB version is released. ### Couchbase Sync Gateway diff --git a/docs/_posts/2015-02-28-efficiently-managing-ui-state-in-pouchdb.md b/docs/_posts/2015-02-28-efficiently-managing-ui-state-in-pouchdb.md index 0a3738a266..609dde61a2 100644 --- a/docs/_posts/2015-02-28-efficiently-managing-ui-state-in-pouchdb.md +++ b/docs/_posts/2015-02-28-efficiently-managing-ui-state-in-pouchdb.md @@ -123,6 +123,6 @@ There's no performance benefit to using filter/view/1000 documents), I would also advise looking into other databases. PouchDB is designed for sync and it excels at that, but if you have different needs, then you should explore other libraries. diff --git a/docs/_posts/2015-10-06-pouchdb-5.0.0-five-years-of-pouchdb.md b/docs/_posts/2015-10-06-pouchdb-5.0.0-five-years-of-pouchdb.md index 78ea74ff2f..cc0584c752 100644 --- a/docs/_posts/2015-10-06-pouchdb-5.0.0-five-years-of-pouchdb.md +++ b/docs/_posts/2015-10-06-pouchdb-5.0.0-five-years-of-pouchdb.md @@ -60,7 +60,7 @@ db.changes({live: true}) Keep in mind that this "update vs. create" test is not foolproof (what happens if a `2-` document is the first version that gets synced? what happens if two conflicting `1-` revisions are synced?), but it will match the old behavior. -Most of the time, your UI should be able to handle document "updates" or "creates" equivalently, so `change.deleted` becomes the only special case. See [Efficiently managing UI state with PouchDB](http://pouchdb.com/2015/02/28/efficiently-managing-ui-state-in-pouchdb.html) for some details about how to do this. +Most of the time, your UI should be able to handle document "updates" or "creates" equivalently, so `change.deleted` becomes the only special case. See [Efficiently managing UI state with PouchDB]({{ site.baseurl }}/2015/02/28/efficiently-managing-ui-state-in-pouchdb.html) for some details about how to do this. * Remove `idb-alt` plugin ([#4222](http://github.com/pouchdb/pouchdb/issues/4222)) diff --git a/docs/_posts/2016-03-04-pouchdb-5.3.0-sqlite-support-in-node.md b/docs/_posts/2016-03-04-pouchdb-5.3.0-sqlite-support-in-node.md index b6152166bc..71aa24541b 100644 --- a/docs/_posts/2016-03-04-pouchdb-5.3.0-sqlite-support-in-node.md +++ b/docs/_posts/2016-03-04-pouchdb-5.3.0-sqlite-support-in-node.md @@ -23,7 +23,7 @@ This feature will also be available in [PouchDB Server](https://github.com/pouch Note that this doesn't change the behavior of the WebSQL adapter in the browser. That adapter is still bundled by default in PouchDB's browser version. For more -details, see the ["extras" API documentation](http://pouchdb.com/api.html#extras). +details, see the ["extras" API documentation]({{ site.baseurl }}/api.html#extras). ### Changelog diff --git a/docs/_posts/2016-04-28-prebuilt-databases-with-pouchdb.md b/docs/_posts/2016-04-28-prebuilt-databases-with-pouchdb.md index f53ac5d0af..196d87657e 100644 --- a/docs/_posts/2016-04-28-prebuilt-databases-with-pouchdb.md +++ b/docs/_posts/2016-04-28-prebuilt-databases-with-pouchdb.md @@ -143,7 +143,7 @@ $ cordova plugin add cordova-plugin-sqlite-2 --save (For Ionic, you can also do `ionic plugin add`, and it will have the same effect.) -We'll also need PouchDB itself. For expediency, let's just [download PouchDB](http://pouchdb.com/download.html) +We'll also need PouchDB itself. For expediency, let's just [download PouchDB]({{ site.baseurl }}/download.html) and include `pouchdb.js` in the app, under `www/js`. Then we'll add it to `index.html`: ```html diff --git a/docs/_posts/2016-06-06-introducing-pouchdb-custom-builds.md b/docs/_posts/2016-06-06-introducing-pouchdb-custom-builds.md index 7042875bcd..6458f84ac2 100644 --- a/docs/_posts/2016-06-06-introducing-pouchdb-custom-builds.md +++ b/docs/_posts/2016-06-06-introducing-pouchdb-custom-builds.md @@ -100,7 +100,7 @@ var PouchDB = require('pouchdb-core') .plugin(require('pouchdb-adapter-http')); ``` -This applies to all of the plugins we previously shipped in the ["extras" API](http://pouchdb.com/api.html#extras). Any of these can now be mixed and matched as desired: +This applies to all of the plugins we previously shipped in the ["extras" API]({{ site.baseurl }}/api.html#extras). Any of these can now be mixed and matched as desired: * `pouchdb-adapter-fruitdown` * `pouchdb-adapter-localstorage` diff --git a/docs/_posts/2018-06-21-pouchdb-7.0.0.md b/docs/_posts/2018-06-21-pouchdb-7.0.0.md index 7710f8fad4..f2c20937a9 100644 --- a/docs/_posts/2018-06-21-pouchdb-7.0.0.md +++ b/docs/_posts/2018-06-21-pouchdb-7.0.0.md @@ -10,7 +10,7 @@ As promised back in January it is time to drop WebSQL from our default builds. T ## Removed WebSQL -[#6943](https://github.com/pouchdb/pouchdb/issues/6943) - The WebSQL adapter is still available to [download and use](https://github.com/pouchdb/pouchdb/releases/tag/7.0.0), it will no longer be available as part of a default PouchDB build and will eventually be moved to the [pouchdb-community repo](https://github.com/pouchdb-community). If you need to migrate your users from WebSQL to IndexeDB then there is some advice available in our [previous release post](https://pouchdb.com/2018/01/23/pouchdb-6.4.2.html). +[#6943](https://github.com/pouchdb/pouchdb/issues/6943) - The WebSQL adapter is still available to [download and use](https://github.com/pouchdb/pouchdb/releases/tag/7.0.0), it will no longer be available as part of a default PouchDB build and will eventually be moved to the [pouchdb-community repo](https://github.com/pouchdb-community). If you need to migrate your users from WebSQL to IndexeDB then there is some advice available in our [previous release post]({{ site.baseurl }}/2018/01/23/pouchdb-6.4.2.html). ## Removed Promise Polyfill diff --git a/docs/adapters.md b/docs/adapters.md index db53a2a390..0b51618176 100644 --- a/docs/adapters.md +++ b/docs/adapters.md @@ -149,7 +149,7 @@ var db = new PouchDB('mydatabase.db', {adapter: 'websql'}); In this case, PouchDB is directly using SQLite queries to build the database, exactly as the WebSQL adapter would. -See ["Prebuilt databases with PouchDB"](https://pouchdb.com/2016/04/28/prebuilt-databases-with-pouchdb.html) +See ["Prebuilt databases with PouchDB"]({{ site.baseurl }}/2016/04/28/prebuilt-databases-with-pouchdb.html) for a guide to how you might use this adapter to create prebuilt SQLite database files for adapters such as Cordova or Electron. #### Other LevelDOWN adapters diff --git a/docs/download.md b/docs/download.md index 50463fec20..2b3627afa4 100644 --- a/docs/download.md +++ b/docs/download.md @@ -47,7 +47,7 @@ var PouchDB = require('pouchdb-browser'); var db = new PouchDB('my_database'); {% endhighlight %} -See [custom builds](http://pouchdb.com/custom.html) for more options. +See [custom builds]({{ site.baseurl }}/custom.html) for more options. {% include anchor.html class="h3" title="CDNs" hash="cdn" %} @@ -69,7 +69,7 @@ For third-party plugins, see the [plugins page](/external.html). {% include anchor.html class="h3" title="Custom builds" hash="custom" %} -For custom builds and first-party plugins, see the [custom builds](http://pouchdb.com/custom.html) page. +For custom builds and first-party plugins, see the [custom builds]({{ site.baseurl }}/custom.html) page. [latest]: https://github.com/pouchdb/pouchdb/releases/download/{{ site.version }}/pouchdb-{{ site.version }}.js [latest-min]: https://github.com/pouchdb/pouchdb/releases/download/{{ site.version }}/pouchdb-{{ site.version }}.min.js diff --git a/docs/errors.md b/docs/errors.md index b3b1f388b6..e473a3db35 100644 --- a/docs/errors.md +++ b/docs/errors.md @@ -214,7 +214,7 @@ The symptoms for this issues are: Chances are that your server runs inside a virtual machine. The host system, or hypervisor, imposes limits on how much data each virtual machine can use for networking. If you are on a cheap virtual server, it is possible, that the default settings for PouchDB pull-replication (10 parallel batches of 100 documents each) exhaust the narrow limit of your server. Even a single client can cause this. -The solution is to move to a better server, but if that is not an immediate option, a workaround would be reducing the `options.batch_size` and `options.batches_limit` [replication options](http://pouchdb.com/api.html#replication). +The solution is to move to a better server, but if that is not an immediate option, a workaround would be reducing the `options.batch_size` and `options.batches_limit` [replication options]({{ site.baseurl }}/api.html#replication). To find optimal values, start by setting them both to 1 (meaning that PouchDB should download one document after the other) and increase from there and stop when the symptoms begin again. Note that multiple concurrent clients can still cause an issue, if you get too many. If all your documents have one or more attachments (e.g. a photos database), setting both options to `1` is probably a good idea. @@ -277,7 +277,7 @@ If you are using Couchbase Lite to sync with PouchDB then you cannot use capital {% include anchor.html class="h3" title="Live changes pass undetected (Web Extension)" hash="webextension_live_changes" %} -When using PouchDB in a WebExtension (at least in Chromium 55 and Firefox 50), but apparently only if the `manifest.json` contains the `store` permission, a [live changes feed](https://pouchdb.com/guides/changes.html#live-changes-feed) in one tab or background process may not detect changes made in another tab/process. It will of course still report those changes upon the next change that it does detect. +When using PouchDB in a WebExtension (at least in Chromium 55 and Firefox 50), but apparently only if the `manifest.json` contains the `store` permission, a [live changes feed]({{ site.baseurl }}/guides/changes.html#live-changes-feed) in one tab or background process may not detect changes made in another tab/process. It will of course still report those changes upon the next change that it does detect. Minimal code to reproduce this can be found [here](https://gist.github.com/Treora/150dca4b57b1b881bd049303e82c5ced). {% include anchor.html class="h3" title="PouchDB install errors on Windows" hash="pouchdb_install_errors_windows" %} diff --git a/docs/external.md b/docs/external.md index 4a3d49f771..74537514e1 100644 --- a/docs/external.md +++ b/docs/external.md @@ -58,7 +58,7 @@ Fully replicate two PouchDB/CouchDB databases, preserving absolutely all revisio #### [PouchDB GQL](https://github.com/pouchdb/GQL) -Google Query Language (GQL) queries with PouchDB. ([Documentation](http://pouchdb.com/gql.html)) +Google Query Language (GQL) queries with PouchDB. ([Documentation]({{ site.baseurl }}/gql.html)) #### [PouchDB Hoodie API](https://github.com/hoodiehq/pouchdb-hoodie-api) diff --git a/docs/faq.md b/docs/faq.md index f3e213a123..b277e6d58e 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -45,7 +45,7 @@ In **Firefox**, PouchDB uses IndexedDB. Though Firefox has no upper limit beside **Internet Explorer 10+** has a hard 250MB limit, and will prompt the user with a non-modal dialog at 10MB. -**Mobile Safari** on iOS has a hard 50MB limit for WebSQL, whereas **desktop Safari** has no limit. Both will prompt the user with a modal dialog if an application requests more than 5MB of data, at increments of 5MB, 10MB, 50MB, 100MB, etc. Some versions of Safari have a bug where they only let you request additional storage once, so you'll need to request the desired space up-front. PouchDB allows you to do this using [the `size` option](http://pouchdb.com/api.html#create_database). +**Mobile Safari** on iOS has a hard 50MB limit for WebSQL, whereas **desktop Safari** has no limit. Both will prompt the user with a modal dialog if an application requests more than 5MB of data, at increments of 5MB, 10MB, 50MB, 100MB, etc. Some versions of Safari have a bug where they only let you request additional storage once, so you'll need to request the desired space up-front. PouchDB allows you to do this using [the `size` option]({{ site.baseurl }}/api.html#create_database). **iOS Web Application**, a page saved on the homescreen behaves differently than apps in Mobile Safari (at least from iOS 9.3.2+). No specifics are published online by Apple, but WebSQL storage seems not limited to 50mb and there will not be any prompts when requesting data storage. Use [``](https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html#//apple_ref/doc/uid/TP40002051-CH3-SW3) in your html header and use *Add to Home Screen* in the share menu of Safari. Please note, IndexedDB is now available as of iOS 10.3. It seems there is different behavior for different models of iPad and iPhone. You can check your mileage using the [storage abuser](http://demo.agektmr.com/storage/), which you can *Add to Home Screen* on your device. **Caveat**: when iOS is running low on storage space, the OS might decide to delete all data without any notice or warning to the end user. Be sure to use devices with plenty of spare space, or your users will lose unsynced data. @@ -126,7 +126,7 @@ Here are the strategies used by various browsers in PouchDB: Attachments are deduplicated based on their MD5 sum, so duplicate attachments won't take up extra space. -To truly remove an attachment from the data store, you will need to use [compaction](http://pouchdb.com/api.html#compaction) to remove document revisions that reference that attachment. +To truly remove an attachment from the data store, you will need to use [compaction]({{ site.baseurl }}/api.html#compaction) to remove document revisions that reference that attachment. {% include anchor.html class="h3" title="Is it safe to upgrade PouchDB?" hash="safe_to_upgrade" %} diff --git a/docs/learn.md b/docs/learn.md index 17873a6eea..2b543adcce 100644 --- a/docs/learn.md +++ b/docs/learn.md @@ -23,7 +23,7 @@ PouchDB supports all modern browsers, using [IndexedDB][] under the hood and fal * iOS 7.1+ * Windows Phone 8+ -PouchDB also runs in [Cordova/PhoneGap](https://github.com/nolanlawson/pouchdb-phonegap-cordova), [NW.js](https://github.com/nolanlawson/pouchdb-nw), [Electron](https://github.com/nolanlawson/pouchdb-atom-shell), and [Chrome apps](https://github.com/nolanlawson/pouchdb-chrome-app). It is framework-agnostic, and you can use it with Angular, React, Ember, Backbone, or your framework of choice. There are [many adapters](http://pouchdb.com/external.html#framework_adapters), or you can just use PouchDB as-is. +PouchDB also runs in [Cordova/PhoneGap](https://github.com/nolanlawson/pouchdb-phonegap-cordova), [NW.js](https://github.com/nolanlawson/pouchdb-nw), [Electron](https://github.com/nolanlawson/pouchdb-atom-shell), and [Chrome apps](https://github.com/nolanlawson/pouchdb-chrome-app). It is framework-agnostic, and you can use it with Angular, React, Ember, Backbone, or your framework of choice. There are [many adapters]({{ site.baseurl }}/external.html#framework_adapters), or you can just use PouchDB as-is. PouchDB requires a modern ES5 environment, so if you need to support older browsers (IE <10, Android <4.0, Opera Mini), then you should include the [es5-shim](https://github.com/es-shims/es5-shim) library. You can also use the [LocalStorage and in-memory adapters](/adapters.html#pouchdb_in_the_browser), or fall back to a live CouchDB.