Skip to content

Commit 73eab0b

Browse files
committed
Clean up docs directory and fix links
1 parent 676f4f6 commit 73eab0b

File tree

7 files changed

+133
-135
lines changed

7 files changed

+133
-135
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,26 @@ Keep track of development news:
1010
* Watch the repository on [GitHub](https://github.com/freeCodeCamp/devdocs/subscription)
1111
* Follow [@DevDocs](https://twitter.com/DevDocs) on Twitter
1212

13-
**Table of Contents:** [Quick Start](#quick-start) · [Vision](#vision) · [App](#app) · [Scraper](#scraper) · [Commands](#available-commands) · [Contributing](#contributing) · [License](#copyright--license) · [Questions?](#questions)
13+
**Table of Contents:** [Plugins and Extensions](#plugins-and-extensions)[Quick Start](#quick-start) · [Vision](#vision) · [App](#app) · [Scraper](#scraper) · [Commands](#available-commands) · [Contributing](#contributing) · [Documentation](#documentation)[License](#copyright--license) · [Questions?](#questions)
14+
15+
## Plugins and Extensions
16+
17+
* [Chrome web app](https://chrome.google.com/webstore/detail/devdocs/mnfehgbmkapmjnhcnbodoamcioleeooe)
18+
* [Ubuntu Touch app](https://uappexplorer.com/app/devdocsunofficial.berkes)
19+
* [Sublime Text plugin](https://sublime.wbond.net/packages/DevDocs)
20+
* [Atom plugin](https://atom.io/packages/devdocs)
21+
* [Brackets extension](https://github.com/gruehle/dev-docs-viewer)
22+
* [Fluid](http://fluidapp.com) for turning DevDocs into a real OS X app
23+
* [GTK shell / Vim integration](https://github.com/naquad/devdocs-shell)
24+
* [Emacs lookup](https://github.com/skeeto/devdocs-lookup)
25+
* [Alfred Workflow](https://github.com/yannickglt/alfred-devdocs)
26+
* [Vim search plugin with Devdocs in its defaults](https://github.com/waiting-for-dev/vim-www) Just set `let g:www_shortcut_engines = { 'devdocs': ['Devdocs', '<leader>dd'] }` to have a `:Devdocs` command and a `<leader>dd` mapping.
27+
* [Visual Studio Code plugin](https://marketplace.visualstudio.com/items?itemName=akfish.vscode-devdocs ) (1)
28+
* [Visual Studio Code plugin](https://marketplace.visualstudio.com/items?itemName=deibit.devdocs) (2)
29+
* [Desktop application](https://github.com/egoist/devdocs-desktop)
30+
* [Doc Browser](https://github.com/qwfy/doc-browser) is a native Linux app that supports DevDocs docsets
31+
* [GNOME Application](https://github.com/hardpixel/devdocs-desktop) GTK3 application with search integrated in headerbar
32+
1433

1534
## Quick Start
1635

@@ -132,6 +151,13 @@ Contributions are welcome. Please read the [contributing guidelines](https://git
132151

133152
DevDocs's own documentation is available on the [wiki](https://github.com/freeCodeCamp/devdocs/wiki).
134153

154+
## Documentation
155+
156+
* [Adding documentations to DevDocs](./docs/adding-docs.md)
157+
* [Scraper Reference](./docs/scraper-reference.md)
158+
* [Filter Reference](./docs/filter-reference.md)
159+
* [Maintainers’ Guide](./docs/maintainers.md)
160+
135161
## Copyright / License
136162

137163
Copyright 2013-2018 Thibaut Courouble and [other contributors](https://github.com/freeCodeCamp/devdocs/graphs/contributors)

docs/Filter-Reference.md

Lines changed: 42 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
---
2-
31
**Table of contents:**
42

5-
* [Overview](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#overview)
6-
* [Instance methods](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#instance-methods)
7-
* [Core filters](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#core-filters)
8-
* [Custom filters](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#custom-filters)
9-
- [CleanHtmlFilter](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#cleanhtmlfilter)
10-
- [EntriesFilter](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#entriesfilter)
3+
* [Overview](#overview)
4+
* [Instance methods](#instance-methods)
5+
* [Core filters](#core-filters)
6+
* [Custom filters](#custom-filters)
7+
- [CleanHtmlFilter](#cleanhtmlfilter)
8+
- [EntriesFilter](#entriesfilter)
119

1210
## Overview
1311

@@ -25,52 +23,52 @@ module Docs
2523
end
2624
```
2725

28-
Filters which manipulate the Nokogiri node object (`doc` and related methods) are _HTML filters_ and must not manipulate the HTML string (`html`). Vice-versa, filters which manipulate the string representation of the document are _text filters_ and must not manipulate the Nokogiri node object. The two types are divided into two stacks within the scrapers. These stacks are then combined into a pipeline that calls the HTML filters before the text filters (more details [here](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference#filter-stacks)). This is to avoid parsing the document multiple times.
26+
Filters which manipulate the Nokogiri node object (`doc` and related methods) are _HTML filters_ and must not manipulate the HTML string (`html`). Vice-versa, filters which manipulate the string representation of the document are _text filters_ and must not manipulate the Nokogiri node object. The two types are divided into two stacks within the scrapers. These stacks are then combined into a pipeline that calls the HTML filters before the text filters (more details [here](./scraper-reference.md#filter-stacks)). This is to avoid parsing the document multiple times.
2927

3028
The `call` method must return either `doc` or `html`, depending on the type of filter.
3129

3230
## Instance methods
3331

34-
* `doc` [Nokogiri::XML::Node]
35-
The Nokogiri representation of the container element.
32+
* `doc` [Nokogiri::XML::Node]
33+
The Nokogiri representation of the container element.
3634
See [Nokogiri's API docs](http://www.rubydoc.info/github/sparklemotion/nokogiri/Nokogiri/XML/Node) for the list of available methods.
3735

38-
* `html` [String]
36+
* `html` [String]
3937
The string representation of the container element.
40-
41-
* `context` [Hash] **(frozen)**
38+
39+
* `context` [Hash] **(frozen)**
4240
The scraper's `options` along with a few additional keys: `:base_url`, `:root_url`, `:root_page` and `:url`.
4341

44-
* `result` [Hash]
45-
Used to store the page's metadata and pass back information to the scraper.
42+
* `result` [Hash]
43+
Used to store the page's metadata and pass back information to the scraper.
4644
Possible keys:
47-
45+
4846
- `:path` — the page's normalized path
4947
- `:store_path` — the path where the page will be stored (equal to `:path` with `.html` at the end)
5048
- `:internal_urls` — the list of distinct internal URLs found within the page
5149
- `:entries` — the [`Entry`](https://github.com/Thibaut/devdocs/blob/master/lib/docs/core/models/entry.rb) objects to add to the index
5250

53-
* `css`, `at_css`, `xpath`, `at_xpath`
51+
* `css`, `at_css`, `xpath`, `at_xpath`
5452
Shortcuts for `doc.css`, `doc.xpath`, etc.
5553

56-
* `base_url`, `current_url`, `root_url` [Docs::URL]
54+
* `base_url`, `current_url`, `root_url` [Docs::URL]
5755
Shortcuts for `context[:base_url]`, `context[:url]`, and `context[:root_url]` respectively.
58-
59-
* `root_path` [String]
56+
57+
* `root_path` [String]
6058
Shortcut for `context[:root_path]`.
6159

62-
* `subpath` [String]
63-
The sub-path from the base URL of the current URL.
60+
* `subpath` [String]
61+
The sub-path from the base URL of the current URL.
6462
_Example: if `base_url` equals `example.com/docs` and `current_url` equals `example.com/docs/file?raw`, the returned value is `/file`._
6563

66-
* `slug` [String]
67-
The `subpath` removed of any leading slash or `.html` extension.
64+
* `slug` [String]
65+
The `subpath` removed of any leading slash or `.html` extension.
6866
_Example: if `subpath` equals `/dir/file.html`, the returned value is `dir/file`._
6967

70-
* `root_page?` [Boolean]
68+
* `root_page?` [Boolean]
7169
Returns `true` if the current page is the root page.
7270

73-
* `initial_page?` [Boolean]
71+
* `initial_page?` [Boolean]
7472
Returns `true` if the current page is the root page or its subpath is one of the scraper's `initial_paths`.
7573

7674
## Core filters
@@ -148,34 +146,34 @@ The following two models are used under the hood to represent the metadata:
148146

149147
Each scraper must implement its own `EntriesFilter` by subclassing the [`Docs::EntriesFilter`](https://github.com/Thibaut/devdocs/blob/master/lib/docs/filters/core/entries.rb) class. The base class already implements the `call` method and includes four methods which the subclasses can override:
150148

151-
* `get_name` [String]
152-
The name of the default entry (aka. the page's name).
153-
It is usually guessed from the `slug` (documented above) or by searching the HTML markup.
149+
* `get_name` [String]
150+
The name of the default entry (aka. the page's name).
151+
It is usually guessed from the `slug` (documented above) or by searching the HTML markup.
154152
**Default:** modified version of `slug` (underscores are replaced with spaces and forward slashes with dots)
155153

156-
* `get_type` [String]
157-
The type of the default entry (aka. the page's type).
158-
Entries without a type can be searched for but won't be listed in the app's sidebar (unless no other entries have a type).
154+
* `get_type` [String]
155+
The type of the default entry (aka. the page's type).
156+
Entries without a type can be searched for but won't be listed in the app's sidebar (unless no other entries have a type).
159157
**Default:** `nil`
160158

161-
* `include_default_entry?` [Boolean]
162-
Whether to include the default entry.
163-
Used when a page consists of multiple entries (returned by `additional_entries`) but doesn't have a name/type of its own, or to remove a page from the index (if it has no additional entries), in which case it won't be copied on the local filesystem and any link to it in the other pages will be broken (as explained on the [Scraper Reference](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference) page, this is used to keep the `:skip` / `:skip_patterns` options to a maintainable size, or if the page includes links that can't reached from anywhere else).
159+
* `include_default_entry?` [Boolean]
160+
Whether to include the default entry.
161+
Used when a page consists of multiple entries (returned by `additional_entries`) but doesn't have a name/type of its own, or to remove a page from the index (if it has no additional entries), in which case it won't be copied on the local filesystem and any link to it in the other pages will be broken (as explained on the [Scraper Reference](./scraper-reference.md) page, this is used to keep the `:skip` / `:skip_patterns` options to a maintainable size, or if the page includes links that can't reached from anywhere else).
164162
**Default:** `true`
165163

166-
* `additional_entries` [Array]
167-
The list of additional entries.
168-
Each entry is represented by an Array of three attributes: its name, fragment identifier, and type. The fragment identifier refers to the `id` attribute of the HTML element (usually a heading) that the entry relates to. It is combined with the page's path to become the entry's path. If absent or `nil`, the page's path is used. If the type is absent or `nil`, the default `type` is used.
169-
Example: `[ ['One'], ['Two', 'id'], ['Three', nil, 'type'] ]` adds three additional entries, the first one named "One" with the default path and type, the second one named "Two" with the URL fragment "#id" and the default type, and the third one named "Three" with the default path and the type "type".
170-
The list is usually constructed by running through the markup. Exceptions can also be hard-coded for specific pages.
164+
* `additional_entries` [Array]
165+
The list of additional entries.
166+
Each entry is represented by an Array of three attributes: its name, fragment identifier, and type. The fragment identifier refers to the `id` attribute of the HTML element (usually a heading) that the entry relates to. It is combined with the page's path to become the entry's path. If absent or `nil`, the page's path is used. If the type is absent or `nil`, the default `type` is used.
167+
Example: `[ ['One'], ['Two', 'id'], ['Three', nil, 'type'] ]` adds three additional entries, the first one named "One" with the default path and type, the second one named "Two" with the URL fragment "#id" and the default type, and the third one named "Three" with the default path and the type "type".
168+
The list is usually constructed by running through the markup. Exceptions can also be hard-coded for specific pages.
171169
**Default:** `[]`
172170

173171
The following accessors are also available, but must not be overridden:
174172

175-
* `name` [String]
173+
* `name` [String]
176174
Memoized version of `get_name` (`nil` for the root page).
177175

178-
* `type` [String]
176+
* `type` [String]
179177
Memoized version of `get_type` (`nil` for the root page).
180178

181179
**Notes:**
@@ -223,4 +221,4 @@ end
223221
```
224222

225223

226-
return [[Home]]
224+
return [[Home]]

docs/Home.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)