From 69a1911e630b2ab82b4a6a442673dbf3e8e6c99b Mon Sep 17 00:00:00 2001 From: OKURA Masafumi Date: Thu, 6 Jun 2024 21:57:25 +0900 Subject: [PATCH] feat(darkfish): Add `Attributes` section to TOC and sidebar --- .../template/darkfish/_sidebar_attributes.rhtml | 12 ++++++++++++ lib/rdoc/generator/template/darkfish/class.rhtml | 1 + .../template/darkfish/table_of_contents.rhtml | 12 ++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 lib/rdoc/generator/template/darkfish/_sidebar_attributes.rhtml diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_attributes.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_attributes.rhtml new file mode 100644 index 0000000000..60542e7e85 --- /dev/null +++ b/lib/rdoc/generator/template/darkfish/_sidebar_attributes.rhtml @@ -0,0 +1,12 @@ +<%- unless klass.attributes.empty? then %> + + +<%- end -%> diff --git a/lib/rdoc/generator/template/darkfish/class.rhtml b/lib/rdoc/generator/template/darkfish/class.rhtml index d6510336df..064d939a8c 100644 --- a/lib/rdoc/generator/template/darkfish/class.rhtml +++ b/lib/rdoc/generator/template/darkfish/class.rhtml @@ -12,6 +12,7 @@ <%= render '_sidebar_parent.rhtml' %> <%= render '_sidebar_includes.rhtml' %> <%= render '_sidebar_extends.rhtml' %> + <%= render '_sidebar_attributes.rhtml' %> <%= render '_sidebar_methods.rhtml' %> diff --git a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml index 54a376c9e5..190eb5ec17 100644 --- a/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +++ b/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml @@ -45,6 +45,18 @@ <%- end -%> +

Attributes

+ +

Methods