|
|
@@ -4,7 +4,7 @@ DevDocs combines multiple API documentations in a fast, organized, and searchabl
|
|
|
|
|
|
* Created by [Thibaut Courouble](http://thibaut.me)
|
|
|
|
|
|
-Keep track of development and community news:
|
|
|
+Keep track of development news:
|
|
|
|
|
|
* Watch the repository on [GitHub](https://github.com/Thibaut/devdocs/subscription)
|
|
|
* Follow [@DevDocs](https://twitter.com/DevDocs) on Twitter
|
|
|
@@ -18,9 +18,9 @@ DevDocs is free and open source. If you like it, please consider supporting my w
|
|
|
|
|
|
Unless you wish to contribute to the project, I recommend using the hosted version at [devdocs.io](http://devdocs.io). It's up-to-date and works offline out-of-the-box.
|
|
|
|
|
|
-DevDocs is made of two separate pieces: a Ruby scraper that generates the documentation and metadata, and a JavaScript app powered by a small Sinatra app.
|
|
|
+DevDocs is made of two pieces: a Ruby scraper that generates the documentation and metadata, and a JavaScript app powered by a small Sinatra app.
|
|
|
|
|
|
-DevDocs requires Ruby 2.3.0, libcurl, and a JavaScript runtime supported by [ExecJS](https://github.com/sstephenson/execjs#readme) (included in OS X and Windows; [Node.js](http://nodejs.org/) on Linux). Once you have these installed, run the following commands:
|
|
|
+DevDocs requires Ruby 2.3.0, libcurl, and a JavaScript runtime supported by [ExecJS](https://github.com/rails/execjs#readme) (included in OS X and Windows; [Node.js](https://nodejs.org/en/) on Linux). Once you have these installed, run the following commands:
|
|
|
|
|
|
```
|
|
|
git clone https://github.com/Thibaut/devdocs.git && cd devdocs
|
|
|
@@ -53,11 +53,11 @@ DevDocs aims to make reading and searching reference documentation fast, easy an
|
|
|
|
|
|
The app's main goals are to: keep load times as short as possible; improve the quality, speed, and order of search results; maximize the use of caching and other performance optimizations; maintain a clean and readable user interface; be fully functional offline; support full keyboard navigation; reduce “context switch” by using a consistent typography and design across all documentations; reduce clutter by focusing on a specific category of content (API/reference) and indexing only the minimum useful to most developers.
|
|
|
|
|
|
-**Note:** DevDocs is neither a programming guide nor a search engine. All our content is pulled from third-party sources and the project doesn't intend to compete with full-text search engines. Its backbone is metadata: each piece of content is identified by a unique, "obvious" and short string. Tutorials, guides and other content that don't meet this requirement are outside the scope of the project.
|
|
|
+**Note:** DevDocs is neither a programming guide nor a search engine. All our content is pulled from third-party sources and the project doesn't intend to compete with full-text search engines. Its backbone is metadata; each piece of content is identified by a unique, "obvious" and short string. Tutorials, guides and other content that don't meet this requirement are outside the scope of the project.
|
|
|
|
|
|
## App
|
|
|
|
|
|
-The web app is all client-side JavaScript, written in [CoffeeScript](http://coffeescript.org), and powered by a small [Sinatra](http://www.sinatrarb.com)/[Sprockets](https://github.com/sstephenson/sprockets) application. It relies on files generated by the [scraper](#scraper).
|
|
|
+The web app is all client-side JavaScript, written in [CoffeeScript](http://coffeescript.org), and powered by a small [Sinatra](http://www.sinatrarb.com)/[Sprockets](https://github.com/rails/sprockets) application. It relies on files generated by the [scraper](#scraper).
|
|
|
|
|
|
Many of the code's design decisions were driven by the fact that the app uses XHR to load content directly into the main frame. This includes stripping the original documents of most of their HTML markup (e.g. scripts and stylesheets) to avoid polluting the main frame, and prefixing all CSS class names with an underscore to prevent conflicts.
|
|
|
|
|
|
@@ -92,9 +92,9 @@ Modifications made to each document include:
|
|
|
* replacing all internal (scraped) URLs with their unqualified and relative counterpart
|
|
|
* adding content, such as a title and link to the original document
|
|
|
|
|
|
-These modifications are applied via a set of filters using the [HTML::Pipeline](https://github.com/jch/html-pipeline) library. Each scraper includes filters specific to its documentation, one of which is tasked with figuring out the pages' metadata.
|
|
|
+These modifications are applied via a set of filters using the [HTML::Pipeline](https://github.com/jch/html-pipeline) library. Each scraper includes filters specific to itself, one of which is tasked with figuring out the pages' metadata.
|
|
|
|
|
|
-The end result is a set of normalized HTML partials and a JSON index file. Because the index files are loaded separately by the [app](#app) following the user's preferences, the code also creates a JSON manifest file containing information about the documentations currently available on the system (such as their name, version, update date, etc.).
|
|
|
+The end result is a set of normalized HTML partials and two JSON files (index + offline data). Because the index files are loaded separately by the [app](#app) following the user's preferences, the scraper also creates a JSON manifest file containing information about the documentations currently available on the system (such as their name, version, update date, etc.).
|
|
|
|
|
|
More information about scrapers and filters is available on the [wiki](https://github.com/Thibaut/devdocs/wiki).
|
|
|
|