0.2.5 • Published 2 years ago

@presta/html v0.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

0.2.0

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago