Use h2 headings for Module::Concerning [ci-skip]
For SEO purposes, there should only be one `<h1>` per page, and the edge version of SDoc will provide one using the module name if none are present in documentation.
This commit is contained in:
parent
99ddec8d2d
commit
835d88bab9
@ -3,7 +3,7 @@
|
||||
require "active_support/concern"
|
||||
|
||||
class Module
|
||||
# = Bite-sized separation of concerns
|
||||
# == Bite-sized separation of concerns
|
||||
#
|
||||
# We often find ourselves with a medium-sized chunk of behavior that we'd
|
||||
# like to extract, but only mix in to a single class.
|
||||
@ -18,9 +18,9 @@ class Module
|
||||
# with a comment, as a least-bad alternative. Using modules in separate files
|
||||
# means tedious sifting to get a big-picture view.
|
||||
#
|
||||
# = Dissatisfying ways to separate small concerns
|
||||
# == Dissatisfying ways to separate small concerns
|
||||
#
|
||||
# == Using comments:
|
||||
# === Using comments:
|
||||
#
|
||||
# class Todo < ApplicationRecord
|
||||
# # Other todo implementation
|
||||
@ -37,7 +37,7 @@ class Module
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# == With an inline module:
|
||||
# === With an inline module:
|
||||
#
|
||||
# Noisy syntax.
|
||||
#
|
||||
@ -61,7 +61,7 @@ class Module
|
||||
# include EventTracking
|
||||
# end
|
||||
#
|
||||
# == Mix-in noise exiled to its own file:
|
||||
# === Mix-in noise exiled to its own file:
|
||||
#
|
||||
# Once our chunk of behavior starts pushing the scroll-to-understand-it
|
||||
# boundary, we give in and move it to a separate file. At this size, the
|
||||
@ -75,7 +75,7 @@ class Module
|
||||
# include TodoEventTracking
|
||||
# end
|
||||
#
|
||||
# = Introducing Module#concerning
|
||||
# == Introducing Module#concerning
|
||||
#
|
||||
# By quieting the mix-in noise, we arrive at a natural, low-ceremony way to
|
||||
# separate bite-sized concerns.
|
||||
|
Loading…
Reference in New Issue
Block a user