devdocs
devdocs copied to clipboard
Rust Guide Document titles are all 'introduction'
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
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'