1.1.4 • Published 5 months ago

astro-typed-links v1.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

astro-typed-links

This is an Astro integration that automatically get typed links to your pages.

Usage

Prerequisites

  • Requires Astro >=5.0.0

Installation

Install the integration automatically using the Astro CLI:

pnpm astro add astro-typed-links
npx astro add astro-typed-links
yarn astro add astro-typed-links

Or install it manually:

  1. Install the required dependencies
pnpm add astro-typed-links
npm install astro-typed-links
yarn add astro-typed-links
  1. Add the integration to your astro config
+import typedLinks from "astro-typed-links";

export default defineConfig({
  integrations: [
+    typedLinks(),
  ],
});

link helper

Import link from astro-typed-links and that's it!

import { link } from 'astro-typed-links'

link('/')
link('/blog/[slug]', { params: { slug: 'foo' }})
link('/about', { searchParams: { foo: 'bar' }, hash: 'contact' })

Contributing

This package is structured as a monorepo:

  • playground contains code for testing the package
  • package contains the actual package

Install dependencies using pnpm:

pnpm i --frozen-lockfile

Start the playground and package watcher:

pnpm dev

You can now edit files in package. Please note that making changes to those files may require restarting the playground dev server.

Licensing

MIT Licensed. Made with ❤️ by Florian Lefebvre.

1.1.4

5 months ago

1.1.3

6 months ago

1.1.2

6 months ago

1.1.1

7 months ago

1.1.0

7 months ago

1.0.0

7 months ago

0.1.1

12 months ago

0.1.0

12 months ago