0.2.5 • Published 3 years ago

@presta/html v0.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@presta/html

Util for generating HTML pages.

Usage

Have a look at the source code and tests for all supported properties.

import { html } from '@presta/html'

export const route = '*'

export async function handler(ev, ctx) {
  return html({
    head: {
      title: 'Presta',
      image: '/social.png',
      description: 'SEO Description.',
      og: {
        url: 'https://presta.run',
      },
      twitter: {
        site: '@presta_run',
      },
      link: [{ rel: 'stylesheet', href: '/style.css' }],
      meta: [{ name: 'viewport', content: '' }],
      script: [{ src: '/critical.js' }],
    },
    body: '<h1>Hello world!</h1>',
    foot: {
      script: [{ src: '/critical.js' }],
    },
  })
}

License

MIT License © Sure Thing

0.2.1

3 years ago

0.2.0

4 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago