1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! A module to manipulate common tags under the `<head />` element.
//!
//! The Helmet component supports the following elements:
//!
//! - `title`
//! - `style`
//! - `script`
//! - `base`
//! - `link`
//! - `meta`
//!
//! The Helmet component supports setting attributes of the following elements:
//!
//! - `html`
//! - `body`
//!
//! # Example
//!
//! ```
//! # use yew::prelude::*;
//! # use bounce::BounceRoot;
//! # use bounce::prelude::*;
//! use bounce::helmet::{Helmet, HelmetBridge};
//!
//! #[function_component(PageA)]
//! fn page_a() -> Html {
//! html! {
//! <>
//! <Helmet>
//! // The title to apply.
//! <title>{"page a title"}</title>
//! </Helmet>
//! <div>{"This is page A."}</div>
//! </>
//! }
//! }
//!
//! #[function_component(App)]
//! fn app() -> Html {
//! html! {
//! <BounceRoot>
//! // A helmet bridge is required to apply helmet elements to the head element.
//! // You only need 1 helmet bridge per bounce root.
//! // The helmet bridge is intended to live as long as the BounceRoot.
//! <HelmetBridge default_title="default title" />
//! <Helmet>
//! // The title to apply.
//! //
//! // However, as <PageA /> also renders a title element, elements rendered later
//! // will have a higher priority. Hence, "page a title" will become the document
//! // title.
//! <title>{"app title"}</title>
//! </Helmet>
//! <PageA />
//! </BounceRoot>
//! }
//! }
//! ```
//!
//! Bounce Helmet also supports [Server-side rendering](render_static).
use *;
pub use ;
pub use ;
pub use StaticWriterState;
pub use ;
pub use HelmetTag;
type FormatTitle = ;