@@ -192,9 +192,6 @@ crate struct SharedContext {
192
192
/// The base-URL of the issue tracker for when an item has been tagged with
193
193
/// an issue number.
194
194
pub issue_tracker_base_url : Option < String > ,
195
- /// The given user css file which allow to customize the generated
196
- /// documentation theme.
197
- pub css_file_extension : Option < PathBuf > ,
198
195
/// The directories that have already been created in this doc run. Used to reduce the number
199
196
/// of spurious `create_dir_all` calls.
200
197
pub created_dirs : RefCell < FxHashSet < PathBuf > > ,
@@ -209,9 +206,6 @@ crate struct SharedContext {
209
206
/// Optional path string to be used to load static files on output pages. If not set, uses
210
207
/// combinations of `../` to reach the documentation root.
211
208
pub static_root_path : Option < String > ,
212
- /// If false, the `select` element to have search filtering by crates on rendered docs
213
- /// won't be generated.
214
- pub generate_search_filter : bool ,
215
209
/// Option disabled by default to generate files used by RLS and some other tools.
216
210
pub generate_redirect_pages : bool ,
217
211
/// The fs handle we are working with.
@@ -545,14 +539,14 @@ pub fn run(mut krate: clean::Crate,
545
539
favicon : String :: new ( ) ,
546
540
external_html,
547
541
krate : krate. name . clone ( ) ,
542
+ css_file_extension : extension_css,
543
+ generate_search_filter,
548
544
} ,
549
- css_file_extension : extension_css,
550
545
created_dirs : Default :: default ( ) ,
551
546
sort_modules_alphabetically,
552
547
themes,
553
548
resource_suffix,
554
549
static_root_path,
555
- generate_search_filter,
556
550
generate_redirect_pages,
557
551
fs : DocFS :: new ( & errors) ,
558
552
} ;
@@ -932,7 +926,7 @@ themePicker.onblur = handleThemeButtonsBlur;
932
926
options. enable_minification ) ?;
933
927
}
934
928
935
- if let Some ( ref css) = cx. shared . css_file_extension {
929
+ if let Some ( ref css) = cx. shared . layout . css_file_extension {
936
930
let out = cx. dst . join ( & format ! ( "theme{}.css" , cx. shared. resource_suffix) ) ;
937
931
let buffer = try_err ! ( fs:: read_to_string( css) , css) ;
938
932
if !options. enable_minification {
@@ -1187,9 +1181,7 @@ themePicker.onblur = handleThemeButtonsBlur;
1187
1181
. collect:: <String >( ) ) ;
1188
1182
let v = layout:: render ( & cx. shared . layout ,
1189
1183
& page, & ( "" ) , & content,
1190
- cx. shared . css_file_extension . is_some ( ) ,
1191
- & cx. shared . themes ,
1192
- cx. shared . generate_search_filter ) ;
1184
+ & cx. shared . themes ) ;
1193
1185
cx. shared . fs . write ( & dst, v. as_bytes ( ) ) ?;
1194
1186
}
1195
1187
}
@@ -1940,9 +1932,7 @@ impl Context {
1940
1932
} ;
1941
1933
let v = layout:: render ( & self . shared . layout ,
1942
1934
& page, & sidebar, & all,
1943
- self . shared . css_file_extension . is_some ( ) ,
1944
- & self . shared . themes ,
1945
- self . shared . generate_search_filter ) ;
1935
+ & self . shared . themes ) ;
1946
1936
self . shared . fs . write ( & final_file, v. as_bytes ( ) ) ?;
1947
1937
1948
1938
// Generating settings page.
@@ -1958,10 +1948,7 @@ impl Context {
1958
1948
let v = layout:: render (
1959
1949
& self . shared . layout ,
1960
1950
& page, & sidebar, & settings,
1961
- self . shared . css_file_extension . is_some ( ) ,
1962
- & themes,
1963
- self . shared . generate_search_filter ,
1964
- ) ;
1951
+ & themes) ;
1965
1952
self . shared . fs . write ( & settings_file, v. as_bytes ( ) ) ?;
1966
1953
1967
1954
Ok ( ( ) )
@@ -2019,9 +2006,7 @@ impl Context {
2019
2006
layout:: render ( & self . shared . layout , & page,
2020
2007
& Sidebar { cx : self , item : it } ,
2021
2008
& Item { cx : self , item : it } ,
2022
- self . shared . css_file_extension . is_some ( ) ,
2023
- & self . shared . themes ,
2024
- self . shared . generate_search_filter )
2009
+ & self . shared . themes )
2025
2010
} else {
2026
2011
let mut url = self . root_path ( ) ;
2027
2012
if let Some ( & ( ref names, ty) ) = cache ( ) . paths . get ( & it. def_id ) {
0 commit comments