History

Clean up docs directory and fix links

Jed Fox committed 7 years ago

Commit 73eab0b1 parent 676f4f67 files · +133 −135Browse files

Showing the changes to docs (6 of 7 files). Show all

Unified · Split

6 files
  1. docs/Filter-Reference.md +42 −44
  2. docs/Home.md +0 −23
  3. docs/Scraper-Reference.md +57 −59
  4. docs/_Footer.md +0 −1
  5. docs/adding-docs.md +7 −7
  6. docs/maintainers.md +0 −0
docs/Filter-Reference.md+42−44
@@ -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 · 11 unmodified lines
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: · 71 unmodified lines
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 · 41 unmodified lines
223221 ```
224222
225223
226−return [[Home]]
224+return [[Home]]
docs/Home.md+0−23
@@ -1,23 +0,0 @@
1−### Development
2−
3−* [Adding documentations to DevDocs](https://github.com/Thibaut/devdocs/wiki/Adding-documentations-to-DevDocs)
4−* [Scraper Reference](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference)
5−* [Filter Reference](https://github.com/Thibaut/devdocs/wiki/Filter-Reference)
6−
7−### Plugins and Extensions
8−
9−* [Chrome web app](https://chrome.google.com/webstore/detail/devdocs/mnfehgbmkapmjnhcnbodoamcioleeooe)
10−* [Ubuntu Touch app](https://uappexplorer.com/app/devdocsunofficial.berkes)
11−* [Sublime Text plugin](https://sublime.wbond.net/packages/DevDocs)
12−* [Atom plugin](https://atom.io/packages/devdocs)
13−* [Brackets extension](https://github.com/gruehle/dev-docs-viewer)
14−* [Fluid](http://fluidapp.com) for turning DevDocs into a real OS X app
15−* [GTK shell / Vim integration](https://github.com/naquad/devdocs-shell)
16−* [Emacs lookup](https://github.com/skeeto/devdocs-lookup)
17−* [Alfred Workflow](https://github.com/yannickglt/alfred-devdocs)
18−* [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.
19−* [Visual Studio Code plugin](https://marketplace.visualstudio.com/items?itemName=akfish.vscode-devdocs ) (1)
20−* [Visual Studio Code plugin](https://marketplace.visualstudio.com/items?itemName=deibit.devdocs) (2)
21−* [Desktop application](https://github.com/egoist/devdocs-desktop)
22−* [Doc Browser](https://github.com/qwfy/doc-browser) is a native Linux app that supports DevDocs docsets
23−* [GNOME Application](https://github.com/hardpixel/devdocs-desktop) GTK3 application with search integrated in headerbar
docs/Scraper-Reference.md+57−59
@@ -1,12 +1,10 @@
1−---
2−
31 **Table of contents:**
42
5−* [Overview](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference#overview)
6−* [Configuration](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference#configuration)
7− - [Attributes](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference#attributes)
8− - [Filter stacks](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference#filter-stacks)
9− - [Filter options](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference#filter-options)
3+* [Overview](#overview)
4+* [Configuration](#configuration)
5+ - [Attributes](#attributes)
6+ - [Filter stacks](#filter-stacks)
7+ - [Filter options](#filter-options)
108
119 ## Overview
1210
@@ -34,51 +32,51 @@ Each URL is requested only once (case-insensitive). · 21 unmodified lines
3432
3533 Configuration is done via class attributes and divided into three main categories:
3634
37−* [Attributes](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference#attributes) — essential information such as name, version, URL, etc.
38−* [Filter stacks](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference#filter-stacks) — the list of filters that will be applied to each page.
39−* [Filter options](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference#filter-options) — the options passed to said filters.
35+* [Attributes](#attributes) — essential information such as name, version, URL, etc.
36+* [Filter stacks](#filter-stacks) — the list of filters that will be applied to each page.
37+* [Filter options](#filter-options) — the options passed to said filters.
4038
4139 **Note:** scrapers are located in the [`lib/docs/scrapers`](https://github.com/Thibaut/devdocs/tree/master/lib/docs/scrapers/) directory. The class's name must be the [CamelCase](http://api.rubyonrails.org/classes/String.html#method-i-camelize) equivalent of the filename.
4240
4341 ### Attributes
4442
45−* `name` [String]
46− Must be unique.
43+* `name` [String]
44+ Must be unique.
4745 Defaults to the class's name.
4846
49−* `slug` [String]
50− Must be unique, lowercase, and not include dashes (underscores are ok).
47+* `slug` [String]
48+ Must be unique, lowercase, and not include dashes (underscores are ok).
5149 Defaults to `name` lowercased.
5250
53−* `type` [String] **(required, inherited)**
54− Defines the CSS class name (`_[type]`) and custom JavaScript class (`app.views.[Type]Page`) that will be added/loaded on each page. Documentations sharing a similar structure (e.g. generated with the same tool or originating from the same website) should use the same `type` to avoid duplicating the CSS and JS.
51+* `type` [String] **(required, inherited)**
52+ Defines the CSS class name (`_[type]`) and custom JavaScript class (`app.views.[Type]Page`) that will be added/loaded on each page. Documentations sharing a similar structure (e.g. generated with the same tool or originating from the same website) should use the same `type` to avoid duplicating the CSS and JS.
5553 Must include lowercase letters only.
5654
57−* `release` [String] **(required)**
55+* `release` [String] **(required)**
5856 The version of the software at the time the scraper was last run. This is only informational and doesn't affect the scraper's behavior.
5957
60−* `base_url` [String] **(required in `UrlScraper`)**
61− The documents' location. Only URLs _inside_ the `base_url` will be scraped. "inside" more or less means "starting with" except that `/docs` is outside `/doc` (but `/doc/` is inside).
62− Defaults to `localhost` in `FileScraper`. _(Note: any iframe, image, or skipped link pointing to localhost will be removed by the `CleanLocalUrls` filter; the value should be overridden if the documents are available online.)_
58+* `base_url` [String] **(required in `UrlScraper`)**
59+ The documents' location. Only URLs _inside_ the `base_url` will be scraped. "inside" more or less means "starting with" except that `/docs` is outside `/doc` (but `/doc/` is inside).
60+ Defaults to `localhost` in `FileScraper`. _(Note: any iframe, image, or skipped link pointing to localhost will be removed by the `CleanLocalUrls` filter; the value should be overridden if the documents are available online.)_
6361 Unless `root_path` is set, the root/initial URL is equal to `base_url`.
6462
65−* `root_path` [String] **(inherited)**
63+* `root_path` [String] **(inherited)**
6664 The path from the `base_url` of the root URL.
6765
68−* `initial_paths` [Array] **(inherited)**
69− A list of paths (from the `base_url`) to add to the initial queue. Useful for scraping isolated documents.
66+* `initial_paths` [Array] **(inherited)**
67+ A list of paths (from the `base_url`) to add to the initial queue. Useful for scraping isolated documents.
7068 Defaults to `[]`. _(Note: the `root_path` is added to the array at runtime.)_
7169
72−* `dir` [String] **(required, `FileScraper` only)**
73− The absolute path where the files are located on the local filesystem.
70+* `dir` [String] **(required, `FileScraper` only)**
71+ The absolute path where the files are located on the local filesystem.
7472 _Note: `FileScraper` works exactly like `UrlScraper` (manipulating the same kind of URLs) except that it substitutes `base_url` with `dir` in order to read files instead of making HTTP requests._
7573
76−* `params` [Hash] **(inherited, `UrlScraper` only)**
77− Query string parameters to append to every URL. (e.g. `{ format: 'raw' }` → `?format=raw`)
74+* `params` [Hash] **(inherited, `UrlScraper` only)**
75+ Query string parameters to append to every URL. (e.g. `{ format: 'raw' }` → `?format=raw`)
7876 Defaults to `{}`.
7977
80−* `abstract` [Boolean]
81− Make the scraper abstract / not runnable. Used for sharing behavior with other scraper classes (e.g. all MDN scrapers inherit from the abstract [`Mdn`](https://github.com/Thibaut/devdocs/blob/master/lib/docs/scrapers/mdn/mdn.rb) class).
78+* `abstract` [Boolean]
79+ Make the scraper abstract / not runnable. Used for sharing behavior with other scraper classes (e.g. all MDN scrapers inherit from the abstract [`Mdn`](https://github.com/Thibaut/devdocs/blob/master/lib/docs/scrapers/mdn/mdn.rb) class).
8280 Defaults to `false`.
8381
8482 ### Filter stacks
@@ -122,67 +120,67 @@ Additionally: · 37 unmodified lines
122120
123121 The filter options are stored in the `options` Hash. The Hash is inheritable (a recursive copy) and empty by default.
124122
125−More information about how filters work is available on the [Filter Reference](https://github.com/Thibaut/devdocs/wiki/Filter-Reference) page.
123+More information about how filters work is available on the [Filter Reference](./filter-reference.md) page.
126124
127125 * [`ContainerFilter`](https://github.com/Thibaut/devdocs/blob/master/lib/docs/filters/core/container.rb)
128126
129− - `:container` [String or Proc]
130− A CSS selector of the container element. Everything outside of it will be removed and become unavailable to the other filters. If more than one element match the selector, the first one inside the DOM is used. If no elements match the selector, an error is raised.
131− If the value is a Proc, it is called for each page with the filter instance as argument, and should return a selector or `nil`.
132− The default container is the `<body>` element.
133− _Note: links outside of the container element will not be followed by the scraper. To remove links that should be followed, use a [`CleanHtml`](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#cleanhtmlfilter) filter later in the stack._
127+ - `:container` [String or Proc]
128+ A CSS selector of the container element. Everything outside of it will be removed and become unavailable to the other filters. If more than one element match the selector, the first one inside the DOM is used. If no elements match the selector, an error is raised.
129+ If the value is a Proc, it is called for each page with the filter instance as argument, and should return a selector or `nil`.
130+ The default container is the `<body>` element.
131+ _Note: links outside of the container element will not be followed by the scraper. To remove links that should be followed, use a [`CleanHtml`](./filter-reference.md#cleanhtmlfilter) filter later in the stack._
134132
135−* [`NormalizeUrlsFilter`](https://github.com/Thibaut/devdocs/blob/master/lib/docs/filters/core/normalize_urls.rb)
133+* [`NormalizeUrlsFilter`](https://github.com/Thibaut/devdocs/blob/master/lib/docs/filters/core/normalize_urls.rb)
136134 The following options are used to modify URLs in the pages. They are useful to remove duplicates (when the same page is accessible from multiple URLs) and fix websites that have a bunch of redirections in place (when URLs that should be scraped, aren't, because they are behind a redirection which is outside of the `base_url` — see the MDN scrapers for examples of this).
137−
138− - `:replace_urls` [Hash]
139− Replaces all instances of a URL with another.
135+
136+ - `:replace_urls` [Hash]
137+ Replaces all instances of a URL with another.
140138 Format: `{ 'original_url' => 'new_url' }`
141− - `:replace_paths` [Hash]
142− Replaces all instances of a sub-path (path from the `base_url`) with another.
139+ - `:replace_paths` [Hash]
140+ Replaces all instances of a sub-path (path from the `base_url`) with another.
143141 Format: `{ 'original_path' => 'new_path' }`
144− - `:fix_urls` [Proc]
142+ - `:fix_urls` [Proc]
145143 Called with each URL. If the returned value is `nil`, the URL isn't modified. Otherwise the returned value is used as replacement.
146−
144+
147145 _Note: before these rules are applied, all URLs are converted to their fully qualified counterpart (http://...)._
148146
149147 * [`InternalUrlsFilter`](https://github.com/Thibaut/devdocs/blob/master/lib/docs/filters/core/internal_urls.rb)
150148
151149 Internal URLs are the ones _inside_ the scraper's `base_url` ("inside" more or less means "starting with", except that `/docs` is outside `/doc`). They will be scraped unless excluded by one of the following rules. All internal URLs are converted to relative URLs inside the pages.
152150
153− - `:skip_links` [Boolean or Proc]
154− If `false`, does not convert or follow any internal URL (creating a single-page documentation).
151+ - `:skip_links` [Boolean or Proc]
152+ If `false`, does not convert or follow any internal URL (creating a single-page documentation).
155153 If the value is a Proc, it is called for each page with the filter instance as argument.
156− - `:follow_links` [Proc]
154+ - `:follow_links` [Proc]
157155 Called for page with the filter instance as argument. If the returned value is `false`, does not add internal URLs to the queue.
158− - `:trailing_slash` [Boolean]
159− If `true`, adds a trailing slash to all internal URLs. If `false`, removes it.
156+ - `:trailing_slash` [Boolean]
157+ If `true`, adds a trailing slash to all internal URLs. If `false`, removes it.
160158 This is another option used to remove duplicate pages.
161− - `:skip` [Array]
159+ - `:skip` [Array]
162160 Ignores internal URLs whose sub-paths (path from the `base_url`) are in the Array (case-insensitive).
163− - `:skip_patterns` [Array]
161+ - `:skip_patterns` [Array]
164162 Ignores internal URLs whose sub-paths match any Regexp in the Array.
165− - `:only` [Array]
163+ - `:only` [Array]
166164 Ignores internal URLs whose sub-paths aren't in the Array (case-insensitive) and don't match any Regexp in `:only_patterns`.
167− - `:only_patterns` [Array]
165+ - `:only_patterns` [Array]
168166 Ignores internal URLs whose sub-paths don't match any Regexp in the Array and aren't in `:only`.
169167
170− If the scraper has a `root_path`, the empty and `/` paths are automatically skipped.
168+ If the scraper has a `root_path`, the empty and `/` paths are automatically skipped.
171169 If `:only` or `:only_patterns` is set, the root path is automatically added to `:only`.
172170
173− _Note: pages can be excluded from the index based on their content using the [`Entries`](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#entriesfilter) filter. However, their URLs will still be converted to relative in the other pages and trying to open them will return a 404 error. Although not ideal, this is often better than having to maintain a long list of `:skip` URLs._
171+ _Note: pages can be excluded from the index based on their content using the [`Entries`](./filter-reference.md#entriesfilter) filter. However, their URLs will still be converted to relative in the other pages and trying to open them will return a 404 error. Although not ideal, this is often better than having to maintain a long list of `:skip` URLs._
174172
175173 * [`AttributionFilter`](https://github.com/Thibaut/devdocs/blob/master/lib/docs/filters/core/attribution.rb)
176174
177− - `:attribution` [String] **(required)**
175+ - `:attribution` [String] **(required)**
178176 An HTML string with the copyright and license information. See the other scrapers for examples.
179177
180178 * [`TitleFilter`](https://github.com/Thibaut/devdocs/blob/master/lib/docs/filters/core/title.rb)
181179
182− - `:title` [String or Boolean or Proc]
183− Unless the value is `false`, adds a title to every page.
184− If the value is `nil`, the title is the name of the page as determined by the [`Entries`](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#entriesfilter) filter. Otherwise the title is the String or the value returned by the Proc (called for each page, with the filter instance as argument). If the Proc returns `nil` or `false`, no title is added.
185− - `:root_title` [String or Boolean]
180+ - `:title` [String or Boolean or Proc]
181+ Unless the value is `false`, adds a title to every page.
182+ If the value is `nil`, the title is the name of the page as determined by the [`Entries`](./filter-reference.md#entriesfilter) filter. Otherwise the title is the String or the value returned by the Proc (called for each page, with the filter instance as argument). If the Proc returns `nil` or `false`, no title is added.
183+ - `:root_title` [String or Boolean]
186184 Overrides the `:title` option for the root page only.
187185
188186 _Note: this filter is disabled by default._
docs/_Footer.md+0−1
@@ -1 +0,0 @@
1−Feel free to edit this page or ask for improvements on the [mailing list](https://groups.google.com/d/forum/devdocs).
docs/adding-docs.mdrenamed from docs/Adding-documentations-to-DevDocs.md+7−7
@@ -1,14 +1,14 @@
1−Adding a documentation may look like a daunting task but once you get the hang of it, it's actually quite simple. Don't hesitate to ask for help on the [mailing list](https://groups.google.com/d/forum/devdocs) if you ever get stuck.
1+Adding a documentation may look like a daunting task but once you get the hang of it, it's actually quite simple. Don't hesitate to ask for help [in Gitter](https://gitter.im/FreeCodeCamp/DevDocs) if you ever get stuck.
22
33 **Note:** please read the [contributing guidelines](https://github.com/Thibaut/devdocs/blob/master/.github/CONTRIBUTING.md) before submitting a new documentation.
44
55 1. Create a subclass of `Docs::UrlScraper` or `Docs::FileScraper` in the `lib/docs/scrapers/` directory. Its name should be the [PascalCase](http://api.rubyonrails.org/classes/String.html#method-i-camelize) equivalent of the filename (e.g. `my_doc` → `MyDoc`)
6−2. Add the appropriate class attributes and filter options (see the [Scraper Reference](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference) page).
6+2. Add the appropriate class attributes and filter options (see the [Scraper Reference](./scraper-reference.md) page).
77 3. Check that the scraper is listed in `thor docs:list`.
8−4. Create filters specific to the scraper in the `lib/docs/filters/[my_doc]/` directory and add them to the class's [filter stacks](https://github.com/Thibaut/devdocs/wiki/Scraper-Reference#filter-stacks). You may create any number of filters but will need at least the following two:
9− * A [`CleanHtml`](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#cleanhtmlfilter) filter whose task is to clean the HTML markup (e.g. adding `id` attributes to headings) and remove everything superfluous and/or nonessential.
10− * An [`Entries`](https://github.com/Thibaut/devdocs/wiki/Filter-Reference#entriesfilter) filter whose task is to determine the pages' metadata (the list of entries, each with a name, type and path).
11− The [Filter Reference](https://github.com/Thibaut/devdocs/wiki/Filter-Reference) page has all the details about filters.
8+4. Create filters specific to the scraper in the `lib/docs/filters/[my_doc]/` directory and add them to the class's [filter stacks](./scraper-reference.md#filter-stacks). You may create any number of filters but will need at least the following two:
9+ * A [`CleanHtml`](./filter-reference.md#cleanhtmlfilter) filter whose task is to clean the HTML markup (e.g. adding `id` attributes to headings) and remove everything superfluous and/or nonessential.
10+ * An [`Entries`](./filter-reference.md#entriesfilter) filter whose task is to determine the pages' metadata (the list of entries, each with a name, type and path).
11+ The [Filter Reference](./filter-reference.md) page has all the details about filters.
1212 5. Using the `thor docs:page [my_doc] [path]` command, check that the scraper works properly. Files will appear in the `public/docs/[my_doc]/` directory (but not inside the app as the command doesn't touch the index). `path` in this case refers to either the remote path (if using `UrlScraper`) or the local path (if using `FileScraper`).
1313 6. Generate the full documentation using the `thor docs:generate [my_doc] --force` command. Additionally, you can use the `--verbose` option to see which files are being created/updated/deleted (useful to see what changed since the last run), and the `--debug` option to see which URLs are being requested and added to the queue (useful to pin down which page adds unwanted URLs to the queue).
1414 7. Start the server, open the app, enable the documentation, and see how everything plays out.
@@ -19,4 +19,4 @@ Adding a documentation may look like a daunting task but once you get the hang o · 4 unmodified lines
1919
2020 If the documentation includes more than a few hundreds pages and is available for download, try to scrape it locally (e.g. using `FileScraper`). It'll make the development process much faster and avoids putting too much load on the source site. (It's not a problem if your scraper is coupled to your local setup, just explain how it works in your pull request.)
2121
22−Finally, try to document your scraper and filters' behavior as much as possible using comments (e.g. why some URLs are ignored, HTML markup removed, metadata that way, etc.). It'll make updating the documentation much easier.
22+Finally, try to document your scraper and filters' behavior as much as possible using comments (e.g. why some URLs are ignored, HTML markup removed, metadata that way, etc.). It'll make updating the documentation much easier.
docs/maintainers.mdrenamed from docs/maintainers_guide.md+0−0

File renamed without changes.