diff options
author | Xavier Noria <fxn@hashref.com> | 2017-02-12 11:39:38 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2017-02-12 11:41:01 +0100 |
commit | b61a029782fb843eb30bec8f36784717fddc4ba8 (patch) | |
tree | 44c5093f1ca4174c39a7ad04c20438416338ee56 /guides | |
parent | 771a802c374ebe7b2931ba6cf8ffa3b7bf0e92e0 (diff) | |
download | rails-b61a029782fb843eb30bec8f36784717fddc4ba8.tar.gz rails-b61a029782fb843eb30bec8f36784717fddc4ba8.tar.bz2 rails-b61a029782fb843eb30bec8f36784717fddc4ba8.zip |
document link processing in guides generation [ci skip]
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/ruby_on_rails_guides_guidelines.md | 44 |
1 files changed, 42 insertions, 2 deletions
diff --git a/guides/source/ruby_on_rails_guides_guidelines.md b/guides/source/ruby_on_rails_guides_guidelines.md index 50866350f8..de63e193f4 100644 --- a/guides/source/ruby_on_rails_guides_guidelines.md +++ b/guides/source/ruby_on_rails_guides_guidelines.md @@ -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: ``` |