File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1010import sys
1111import urllib3
1212import shutil
13+ import numpy as np
1314sys .path .insert (0 , os .path .abspath ('..' ))
1415
1516import imkar # noqa
117118 "navbar_start" : ["navbar-logo" ],
118119 "navbar_end" : ["navbar-icon-links" , "theme-switcher" ],
119120 "navbar_align" : "content" ,
120- "header_links_before_dropdown" : 8 ,
121+ "header_links_before_dropdown" : None , # will be automatically set later based on headers.rst
122+ "header_dropdown_text" : "Packages" , # Change dropdown name from "More" to "Packages"
121123 "icon_links" : [
122124 {
123125 "name" : "GitHub" ,
@@ -183,3 +185,13 @@ def download_files_from_gallery(link, folders_in):
183185 # add project to the list of projects if not in header
184186 if not contains_project :
185187 fout .write (f' { project } <{ project } >\n ' )
188+
189+ # count the number of gallery headings
190+ count_gallery_headings = np .sum (
191+ ['https://pyfar-gallery.readthedocs.io' in line for line in lines ])
192+
193+
194+ # set dropdown header after gallery headings
195+ html_theme_options ['header_links_before_dropdown' ] = count_gallery_headings + 1
196+
197+
You can’t perform that action at this time.
0 commit comments