diff --git a/doc-src/FAQ.md b/doc-src/FAQ.md index 2a7d293e..340e6485 100644 --- a/doc-src/FAQ.md +++ b/doc-src/FAQ.md @@ -1,5 +1,8 @@ # Frequently Asked Questions +* Table of contents +{:toc} + ## Haml ### How do I put a punctuation mark after an element, like "`I like cake!`"? diff --git a/doc-src/HAML_REFERENCE.md b/doc-src/HAML_REFERENCE.md index b2e10ca8..2fa4192b 100644 --- a/doc-src/HAML_REFERENCE.md +++ b/doc-src/HAML_REFERENCE.md @@ -1,5 +1,8 @@ # Haml (XHTML Abstraction Markup Language) +* Table of contents +{:toc} + Haml is a markup language that's used to cleanly and simply describe the XHTML of any web document, without the use of inline code. @@ -117,7 +120,7 @@ is compiled to: Any string is a valid element name; Haml will automatically generate opening and closing tags for any element. -#### {} +#### `{}` Brackets represent a Ruby hash that is used for specifying the attributes of an element. @@ -905,7 +908,7 @@ is compiled to: 2?

-#### -# +#### `-#` The hyphen followed immediately by the pound sign signifies a silent comment. diff --git a/doc-src/SASS_REFERENCE.md b/doc-src/SASS_REFERENCE.md index 48960a47..0be48c41 100644 --- a/doc-src/SASS_REFERENCE.md +++ b/doc-src/SASS_REFERENCE.md @@ -1,5 +1,8 @@ # Sass (Syntactically Awesome StyleSheets) +* Table of contents +{:toc} + Sass is a meta-language on top of CSS that's used to describe the style of a document cleanly and structurally, diff --git a/yard/full_doc_mods.rb b/yard/full_doc_mods.rb new file mode 100644 index 00000000..388e0833 --- /dev/null +++ b/yard/full_doc_mods.rb @@ -0,0 +1,17 @@ +class YARD::Generators::FullDocGenerator + protected + + def generate_assets_with_haml + generate_assets_without_haml + + if format == :html && serializer + template_file = find_template template_path(css_file) + serializer.serialize(css_file, + File.read(template_file) + File.read(File.dirname(__FILE__) + "/haml-style.css")) + end + + true + end + alias_method :generate_assets_without_haml, :generate_assets + alias_method :generate_assets, :generate_assets_with_haml +end diff --git a/yard/haml-style.css b/yard/haml-style.css new file mode 100644 index 00000000..37fc9438 --- /dev/null +++ b/yard/haml-style.css @@ -0,0 +1,15 @@ +.maruku_toc { + background: #ddd; + border: 1px solid #ccc; + margin-right: 2em; + float: left; +} + +.maruku_toc ul { + padding: 0 1em; +} + +#frequently_asked_questions + .maruku_toc { + float: none; + margin: 0 2em; +}