3.0.2 • Published 1 year ago

ez-next v3.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Usage

Right now I've moved all generic react component based code to ez-react-lib

This is now going to be used to extend next based functionality

import { HeadMeta } from 'ez-next';

// example of global use, as it will apply opengraph data App wide
// anything not set can be overriden within the app

const Index = ({ Component, pageProps }: AppProps) => {
  return (
    <>
      {/* All props are optional */}
      <HeadMeta
        url='https://nextjs.org/'
        title='Next.js by Vercel - The React Framework'
        author='Vercel'
        siteName='Vercel'
        themeColor='#000000'
        description='Production grade React applications that scale. The world’s leading companies use Next.js by Vercel to build static and dynamic websites and web applications.'
        canonical='https://nextjs.org/'
        // videoHref='https://optional-video-url'
        iconApple='/apple-touch-icon.png'
        icon192x192='/android-chrome-192x192.png'
        icon512x512='/android-chrome-512x512.png'
        metaImageSrc='/android-chrome-512x512.png'
        locale='en-GB' // defaults to en-AU 🦘
        manifestPath='/manifest.json'
        type='OpenGraphTypes'
        twitter={{
          siteAtHandle: '@vercel',
          authorAtHandle: '@leeerob',
          titleOverride: 'Next JS',
          descriptionOverride:
            'Production grade React applications that scale.',
          imageSrcOverride: '/better-512x512.png',
        }}
        // all the below default to false so only enabled if included
        enableDarkMode // This is just the meta tag for dark mode
        enableTitleFromSlug
        enableUrlFromWindow
        enableCanonicalFromWindow
      />
      <Component {...pageProps} />
    </>
  );
};

export default Index;

When working with source code

Install the depenencies using your favourite package manager

npm i

or

yarn

or

pnpm i

Then compile with tsup from src/index.ts

npm run build

or

yarn build

or

pnpm run build

Run development to watch changes to re-run build

npm run dev

or

yarn dev

or

pnpm run dev
2.3.0

1 year ago

2.5.0

1 year ago

2.3.2

1 year ago

2.2.3

1 year ago

2.4.0

1 year ago

2.3.1

1 year ago

2.5.2

1 year ago

2.3.4

1 year ago

2.3.3

1 year ago

2.3.6

1 year ago

2.3.5

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

2.3.7

1 year ago

3.0.0

1 year ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.2.2

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago