Skip to content

How to add headComponents from within the framework #501

Closed Answered by nascode
csdswarm asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, I agree this should be documented.

Anyway, here is a snippet to add header in a route:

import { Head } from "$fresh/src/runtime/head.ts";
import { Fragment, h } from "preact";

export default function TestHead() {
  return (
    <>
      <Head>
        <meta charSet="utf-8" />
        <meta
          name="description"
          content="Author: A.N. Author, Illustrator: P. Picture, Category: Books, Price:  £9.24, Length: 784 pages"
        />
        <meta
          name="google-site-verification"
          content="+nxGUDJ4QpAZ5l9Bsjdi102tLVC21AIh5d1Nl23908vVuFHs34="
        />
        <title>Example Books - high-quality used books for children</title>
        <meta name="robots" c…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@marvinhagemeister
Comment options

Answer selected by lucacasonato
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants