mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
document link processing in guides generation [ci skip]
This commit is contained in:
parent
771a802c37
commit
b61a029782
1 changed files with 42 additions and 2 deletions
|
@ -50,6 +50,48 @@ Use the same inline formatting as regular text:
|
|||
##### The `:content_type` Option
|
||||
```
|
||||
|
||||
Linking to the API
|
||||
------------------
|
||||
|
||||
Links to the API (`api.rubyonrails.org`) are processed by the guides generator in the following manner:
|
||||
|
||||
Links that include a release tag are left untouched. For example
|
||||
|
||||
```
|
||||
http://api.rubyonrails.org/v5.0.1/classes/ActiveRecord/Attributes/ClassMethods.html
|
||||
```
|
||||
|
||||
is not modified.
|
||||
|
||||
Please use these in release notes, since they should point to the corresponding version no matter the target being generated.
|
||||
|
||||
If the link does not include a release tag and edge guides are being generated, the domain is replaced by `edgeapi.rubyonrails.org`. For example,
|
||||
|
||||
```
|
||||
http://api.rubyonrails.org/classes/ActionDispatch/Response.html
|
||||
```
|
||||
|
||||
becomes
|
||||
|
||||
```
|
||||
http://edgeapi.rubyonrails.org/classes/ActionDispatch/Response.html
|
||||
```
|
||||
|
||||
If the link does not include a release tag and release guides are being generated, the Rails version is injected. For example, if we are generating the guides for v5.1.0 the link
|
||||
|
||||
```
|
||||
http://api.rubyonrails.org/classes/ActionDispatch/Response.html
|
||||
```
|
||||
|
||||
becomes
|
||||
|
||||
```
|
||||
http://api.rubyonrails.org/v5.1.0/classes/ActionDispatch/Response.html
|
||||
```
|
||||
|
||||
Please don't link to `edgeapi.rubyonrails.org` manually.
|
||||
|
||||
|
||||
API Documentation Guidelines
|
||||
----------------------------
|
||||
|
||||
|
@ -97,8 +139,6 @@ By default, guides that have not been modified are not processed, so `ONLY` is r
|
|||
|
||||
To force processing all the guides, pass `ALL=1`.
|
||||
|
||||
It is also recommended that you work with `WARNINGS=1`. This detects duplicate IDs and warns about broken internal links.
|
||||
|
||||
If you want to generate guides in a language other than English, you can keep them in a separate directory under `source` (eg. `source/es`) and use the `GUIDES_LANGUAGE` environment variable:
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue