Add clickable anchors to docs headers

Closes #434
This commit is contained in:
Cheng Lou
2013-10-21 14:38:57 -07:00
committed by Paul O’Shannessy
parent ba166b9652
commit d82181e4b9
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -391,6 +391,16 @@ section.black content {
font-size: 24px;
}
h1, h2, h3, h4, h5, h6 {
a {
color: $darkTextColor;
&:hover {
text-decoration: underline;
}
}
}
// H2s form documentation topic dividers. Extra space helps.
h2 {
margin-top: 30px;
+1 -1
View File
@@ -11,7 +11,7 @@ class Redcarpet::Render::HTML
.gsub(/\s+/, "-")
.gsub(/[^A-Za-z0-9\-_.]/, "")
return "<h#{level} id=\"#{clean_title}\">#{title}</h#{level}>"
return "<h#{level} id=\"#{clean_title}\"><a href=\"##{clean_title}\">#{title}</a></h#{level}>"
end
end