diff --git a/docs/examples/index.md b/docs/examples/index.md index cc01568a..1bf1978e 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -7,3 +7,5 @@ In this chapter of the Fresh documentation, you can find examples of features that you may like in your Fresh project. If there's a specific example you'd like to see here, please open [a GitHub discussion](https://github.com/denoland/fresh/discussions/new?category=ideas). + +- [Modifying the `
` Element](modifying-the-head-element) diff --git a/docs/examples/modifying-the-head-element.md b/docs/examples/modifying-the-head-element.md new file mode 100644 index 00000000..5700bd46 --- /dev/null +++ b/docs/examples/modifying-the-head-element.md @@ -0,0 +1,39 @@ +--- +description: | + By adding inner components to Fresh's head element, we add inner components to the HTML head element of the web page. +--- + +We can use the `` component in `$fresh/runtime.ts` to modify the +`
` element. By adding inner components to `
`, we add inner +components to the `
` element of the web page. Some uses include: + +- Setting the document title using `