mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
python: add glossary entries
This commit is contained in:
parent
1213629e9c
commit
1de7a61a97
1 changed files with 5 additions and 0 deletions
|
@ -31,6 +31,7 @@ module Docs
|
|||
return 'Tutorial' if slug.start_with? 'tutorial'
|
||||
return 'Software Packaging & Distribution' if slug.start_with? 'distributing'
|
||||
return 'Software Packaging & Distribution' if slug.start_with? 'distutils'
|
||||
return 'Glossary' if slug.start_with? 'glossary'
|
||||
|
||||
return 'Basics' unless slug.start_with? 'library/'
|
||||
return 'Basics' if slug.start_with? 'library/index'
|
||||
|
@ -76,6 +77,10 @@ module Docs
|
|||
entries << [node['id'], node['id']]
|
||||
end
|
||||
|
||||
css('.glossary > dt[id]').each do |node|
|
||||
entries << [node.content, node['id']]
|
||||
end
|
||||
|
||||
css('.function > dt[id]', '.method > dt[id]', '.staticmethod > dt[id]', '.classmethod > dt[id]').each do |node|
|
||||
entries << [node['id'] + '()', node['id']]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue