![]() This PR adds the ability to control `<head>` tags using a new `HTMLTitle` view and `HTMLMeta` view. Taking inspiration from Next.js `<NextHead>`, you can use these views anywhere in your view hierarchy and they will be hoisted to the top `<head>` section of the html. Use as a view: ```swift var body: some View { VStack { ... HTMLTitle("Hello, Tokamak") HTMLMeta(charset: "utf-8") ... } } ``` Use as a view modifier: ```swift var body: some View { VStack { ... } .htmlTitle("Hello, Tokamak") .htmlMeta(charset: "utf-8") } ``` And the resulting html (no matter where these are used in your view hierarchy): ```html <html> <head> <title>Hello, Tokamak</title> <meta charset="utf-8"> </head> <body> ... </body> </html> ``` |
||
---|---|---|
.. | ||
Preferences.swift |