devdocs icon indicating copy to clipboard operation
devdocs copied to clipboard

Rust Guide Document titles are all 'introduction'

Open JamesManningR opened this issue 4 months ago • 0 comments

Bug report

All headings for the rust guide are Introduction and not in order

OS information

  • Mac Osx - Chrome
  • IOS - Chrome

Steps to reproduce

Open rust docs > guide

More resources

Image

Possible fix

https://github.com/freeCodeCamp/devdocs/blob/bc77916eb6812bdad43ae3dad766222fcc680e1c/lib/docs/filters/rust/entries.rb#L7

Something like this?

      def get_name
        if slug.start_with?('book') || slug.start_with?('reference')
-         name = at_css("#sidebar a[href='#{File.basename(slug)}']")
+         name = at_css("#sidebar a.active")
          name ? name.content : 'Introduction'

JamesManningR avatar May 30 '25 08:05 JamesManningR