Commit Graph

34 Commits

Author SHA1 Message Date
Petrik
905ab23705 Use h1 from header for guides title tag [ci-skip]
As the main heading is now a h1, the h1 should be used for the title.
2023-04-20 08:09:41 +02:00
Petrik
4bd199301e Use h1 for guide titles
Currently the guides use the h1 tag for the guides logo instead of the
guides title. As the guides title is more important in describing the
content of a guide, the title should use the h1 instead.
This also move every other heading to a more important heading (h3 becomes h2, etc.).

This change should improve SEO for the guides.
2023-04-18 22:27:03 +02:00
Geon George
56e96d9344 Replaces mobi guide with epub for docs because of discontinued support
Removes kindlerb logic

Adds template for epub generator

Renames the kindle dir to /epub

Adds epub module to generator and replaces kindle

Fixes mimetype

Creates basic epub book

Deletes old kindle module

Adds zip package

Updates rubyzip gem name

Removes now unused gepub gem

Adds the required container file for epubs

Fixes media type

Adds new epub generation logic

Removes all buttons from output html

Refactors and generates valid epub files

Removes frontmatter logic used for kindlegen

Filters out epub files in zip

Updates link to kindle doc on sidebar

Fixes rubocop issues

Adds deprecation warning for the old kindle task

Refactors and cleans up epub module

Cleans up epub code

Cleans up private internal method code style

Removes unnecessary imagemagick check
2022-08-05 00:18:20 +05:30
KapilSachdev
a908d06c85
feat(rubocop): Add Style/RedundantRegexpEscape
- This cop will help in removing unnecessary escaping inside Regexp literals.
2020-12-08 18:57:09 +00:00
Ryuta Kamizono
c81af6ae72 Enable Layout/EmptyLinesAroundAccessModifier cop
We sometimes say "✂️ newline after `private`" in a code review (e.g.
https://github.com/rails/rails/pull/18546#discussion_r23188776,
https://github.com/rails/rails/pull/34832#discussion_r244847195).

Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style
`EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059).

That cop and enforced style will reduce the our code review cost.
2019-06-13 12:00:45 +09:00
toshimaru
4b56d60fe7 Add OG tags to layout.html.erb 2019-01-09 13:23:22 +09:00
wagurano
f92a8bfb94 Fix rails guides markdown.rb and renderer.rb to use custom header id 2018-09-23 19:57:36 +09:00
Bart de Water
eb5fea40a4 Enable Start/EndWith and RegexpMatch cops
In cases where the MatchData object is not used, this provides a speed-up:
https://github.com/JuanitoFatas/fast-ruby/#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end
2018-07-28 17:37:17 -04:00
Koichi ITO
1f37d846a9 Use frozen string literal in guides/ 2017-08-13 22:04:09 +09:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Rafael Mendonça França
0871e5e5c1
Fix all style guides violations
Closes #28382
Closes #28651
2017-04-19 20:13:42 -04:00
Ruy Diaz
b5c56090ee Add anchor links to all headers
To allow easy linking at all levels and not just from index
2017-04-01 21:35:20 -07:00
Xavier Noria
771a802c37 refactors and fixes in guides generation [ci skip]
This commit is not precisely atomic, but the changes have evolved, summary:

* The ENV-based interface has been moved upwards, the generator has now a conventional
  initializer.

* RAILS_VERSION is now assumed to be a Git tag. A blank RAILS_VERSION means edge guides.

* In consequence, the EDGE env variable is gone.

* The "local" version is also gone, the current SHA1 is computed for edge guides.

* Assumes guides are generated from a repo checkout (time ago users could
  generate them from gems.)

* The WARNINGS flag is gone in consequence, you cannot disable warnings.

* The `api_link` Markdown helper is fixed.

* Docs about usage have one single place: rake guides:help.

* Links in guides have been revised.
2017-02-12 10:33:50 +01:00
Rafael Mendonça França
8b3ed2b68a
Fix HTML escaping in the guides
render :html escapes the argument if not provided as html safe.
2016-10-25 11:19:28 -02:00
Rafael Mendonça França
1e7f6488f7
Generate HTML not plain text 2016-10-25 03:06:57 -02:00
Rafael Mendonça França
d34a2747cb
Fix plain option in the rails_guides generator 2016-10-25 00:08:39 -02:00
Ryuta Kamizono
f006de5dc5 Fix broken alignments caused by auto-correct commit 411ccbd
Hash syntax auto-correcting breaks alignments. 411ccbdab2608c62aabdb320d52cb02d446bb39c
2016-08-10 06:36:39 +09:00
Xavier Noria
411ccbdab2 remove redundant curlies from hash arguments 2016-08-06 19:44:11 +02:00
Xavier Noria
1607ee299d modernizes hash syntax in guides 2016-08-06 19:39:28 +02:00
Xavier Noria
6b3719b757 applies new string literal convention in guides
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:21:59 +02:00
Akira Matsuda
dcecbb4234 File encoding is defaulted to utf-8 in Ruby >= 2.1 2015-09-18 17:05:05 +09:00
Juanito Fatas
2735b9cf97 Fix guide anchor generation logic.
This could use in any translation because it's not limited to `[^a-z0-9]`.

Verify after this change, all guides still have same anchors.

[Robin Dupret & Juanito Fatas]
2014-08-24 11:58:01 +08:00
Juanito Fatas
597a666601 Revert "Do not gsub non ASCII characters in header anchor.".
This reverts commit 699babe.

Also change the upgrading_ruby_on_rails link back to original in 4_2_release_notes.
2014-08-20 19:18:10 +08:00
Juanito Fatas
699babe8e3 Do not gsub non ASCII characters in header anchor. 2014-05-22 16:14:31 +08:00
Nate Berkopec
220528548b Guides: output valid HTML5
[ci skip]
2014-05-05 17:42:04 -04:00
Gosha Arinich
af660ee717 place article name in the beginning of guides page title 2013-01-06 01:46:30 +03:00
Prem Sichanugrist
05b4d59a8d Change #id generation rule
* Use the current heading by default
* If duplicate, then use #[parent]-[current] as the id
2012-09-17 15:55:17 -04:00
Prem Sichanugrist
5a4622b8b8 Retain heading styles in the page chapters list 2012-09-17 15:54:23 -04:00
Prem Sichanugrist
ed62b1bf0b Enable table 2012-09-17 15:54:22 -04:00
Prem Sichanugrist
0867fcdb5a Update Markdown renderer to be more flexible 2012-09-17 15:54:22 -04:00
Prem Sichanugrist
848d13a8aa Reuse parent's id if it's already exists 2012-09-17 15:54:21 -04:00
Prem Sichanugrist
efa7717b7a 4.0 release note now renders correctly with index 2012-09-17 15:54:21 -04:00
Prem Sichanugrist
544f6bcb90 Start rewriting 4.0 release note into Markdown 2012-09-17 15:54:21 -04:00