File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
tools/build-example-pages/src Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -127,10 +127,7 @@ name = "hello_world"
127
127
path = " examples/hello_world.rs"
128
128
129
129
[package .metadata .example .hello_world ]
130
- name = " Hello World"
131
- description = " The basics"
132
- category = " Hello World"
133
- wasm = true
130
+ hidden = true
134
131
135
132
# 2D Rendering
136
133
[[example ]]
Original file line number Diff line number Diff line change @@ -72,6 +72,17 @@ fn parse_examples(panic_on_missing: bool) -> Vec<Example> {
72
72
panic ! ( "Missing metadata for example {}" , technical_name) ;
73
73
}
74
74
}
75
+
76
+ if metadatas
77
+ . get ( & technical_name)
78
+ . and_then ( |metadata| metadata. get ( "hidden" ) )
79
+ . and_then ( |hidden| hidden. as_bool ( ) )
80
+ . and_then ( |hidden| hidden. then ( || ( ) ) )
81
+ . is_some ( )
82
+ {
83
+ return None ;
84
+ }
85
+
75
86
metadatas. get ( & technical_name) . map ( |metadata| Example {
76
87
technical_name,
77
88
path : val[ "path" ] . as_str ( ) . unwrap ( ) . to_string ( ) ,
You can’t perform that action at this time.
0 commit comments