-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from dharmafly/development
Update the documentation #9
- Loading branch information
Showing
14 changed files
with
112 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
heading: "How does it work?" | ||
category: overview | ||
--- | ||
Whether you use Elsewhere as a server or as part of your own node project, it works by you first providing it with a url. | ||
|
||
Elsewhere searches the page at this url for links, marked up with `rel=me`, linking to other pages. It then searches these subsequent pages for more links and so on. | ||
|
||
Any link found on any of these subsequent pages that links back to the original url, verifies the page. Any page that links to a verified page is then also marked as verified and so on. | ||
|
||
Any pages with these reciprical links to other pages in the graph can be reliably thought of belonging to the owner of the url you initially provided Elsewhere. | ||
|
||
Many profile pages do lack `rel=me` markup however and thus the reciprical links cannot be reliably established. As a result many legitimate profiles cannot be reliably marked as verified. When using the server you can choose to include these unverified links or not. | ||
|
||
Once Elsewhere has run out of links it returns with a graph representing the owner of your initial url, which you can then do what you like with. |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
category: overview | ||
--- | ||
* v0.0.2 | ||
- Tweaks to the signature of the graph method. Various internal changes. | ||
* v0.0.1 | ||
- First viable version of {{ site.PROJECT_NAME }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
category: reference | ||
--- | ||
Elsewhere is available on [NPM][npm]. To install it just run: | ||
|
||
npm install elsewhere | ||
|
||
Once you have it installed you may require it and interact with it using the `graph` method. | ||
|
||
var elsewhere = require('elsewhere'); | ||
|
||
elsewhere.graph('http://premasagar.com'); | ||
|
||
[npm]: https://npmjs.org/package/elsewhere |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
category: reference | ||
--- | ||
The `graph` method takes the following three parameters. | ||
|
||
**url** This is the url that you wish to graph. The assumption is that it represents a person and has `rel=me` links to other urls also representing that person. | ||
|
||
**options** (optional) This object literal contains a few properties used to configure the graph. These properties are: | ||
|
||
- strict (boolean) `true` for strict mode, `false` otherwise. Strict mode only returns urls that link back to either the url provided in the first parameter or another url that does. | ||
|
||
- crawlLimit (integer) The number of links Elsewhere will follow without a successful verification before it abandons the chain. Defaults to 3. | ||
|
||
- stripDeeperLinks (boolean) If set to `true` then Elsewhere will discard links that share a domain with another link or links at a shallower level. E.g. plus.google.com/{id} is kept, while plus.google.com/{id}/posts is discarded. | ||
|
||
**callback** (optional) The function provided as this parameter will be called once the graph has been completely constructed. The callback is provided with one parameter: a completed `Graph` object. | ||
|
||
Here are some examples of valid calls to the graph method. | ||
|
||
var options = { | ||
strict: true | ||
} | ||
|
||
var callback = function (graph) {}; | ||
|
||
elsewhere.graph('http://premasagar.com', options, callback); | ||
|
||
elsewhere.graph('http://chrisnewtn.com', callback); | ||
|
||
elsewhere.graph('http://glennjones.net').then(callback); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
category: reference | ||
--- | ||
Instead of using a local `options` object each time you call the graph method, you can also set options in the global options object. | ||
|
||
Options shared between the global options object and local objects that are set via the global object act as defaults for each call to the graph method, any options that are then provided directly to the graph method via a local object will override those of the global object. | ||
|
||
The two options shared between the global options object and local objects are `crawlLimit` and `stripDeeperLinks`. | ||
|
||
**logging** (boolean) If set to `true` then Elsewhere will output the progress of the graph construction out to the terminal. | ||
|
||
**jsdomInstanceLimit** (integer) The maximum allowed number of concurrent JSDom instances. Set too low and graphs to be constructed too slowly, too high and you'll run out of memory. Defaults to 10. | ||
|
||
**crawlLimit** (integer) The number of links Elsewhere will follow without a successful verification before it abandons the chain. Defaults to 3. | ||
|
||
**stripDeeperLinks** (boolean) If set to `true` then Elsewhere will discard links that share a domain with another link or links at a shallower level. E.g. plus.google.com/{id} is kept, while plus.google.com/{id}/posts is discarded. | ||
|
||
**cacheLimit** (integer) The maximum amount of time (in milliseconds) that the constituent links of a graph are kept in memory for. If you are running the Elsewhere server then this figure also goes for complete graphs as well. | ||
|
||
If you are running Elsewhere as a server then you may set these options directly in `lib/options.js`. Here is some example usage of the options object: | ||
|
||
elsewhere.options.jsdomInstanceLimit = 20; | ||
|
||
elsewhere.options.logging = false; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters