0.4.1 • Published 8 months ago

@inox-tools/custom-routing v0.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Astro Custom Routing

This integration allows you to define custom routes for your Astro project independent of the file-system. Use whatever logic you want to define your routes.

// astro.config.mjs
import { customRouting } from '@inox-tools/custom-routing';

export default defineConfig({
  integrations: [
    customRouting({
      // Use Astro files outside of src/pages as the entrypoint
      '/blog/[...slug]': './src/routes/blog.astro',

      // Reuse the same entrypoint for more than one route for more precise control
      // here defining that the route should be only on the tag index and with a single segment
      tag: './src/routes/tags.astro',
      'tag/[tag]': './src/routes/tags.astro',

      // Publish common Astro files shared across projects as dependencies and use them here
      compliance: '@company/legal-pages/compliance.astro',
    }),
  ],
});

License

Custom Routing is available under the MIT license.

1.0.0-beta.0

8 months ago

0.4.1

9 months ago

0.3.2

12 months ago

0.4.0

11 months ago

0.3.3

11 months ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago