@sidetrails/astro-cname
v0.1.1
Published
Generate a CNAME file for your Astro site
Maintainers
Readme
@sidetrails/astro-cname
An Astro Integration for generating a CNAME file using the configured site.
Installation
npx astro add astro-cnameManual Install
Install the @sidetrails/astro-cname package.
npm install @sidetrails/astro-cnameThen, add the integration to astro.config.*.
import { defineConfig } from 'astro/config';
import cname from '@sidetrails/astro-cname';
export default defineConfig({
// ...
integrations: [cname()],
});Usage
Configure the site in astro.config.*.
import { defineConfig } from 'astro/config';
export default defineConfig({
// ...
site: "https://my-site.com"
});Or, pass the --site argument to astro build.
npm run astro build --site https://my-site.comWith the site configured, a CNAME file containing the hostname will be created in your output directory.
CNAME:
my-site.comLicense
MIT
Copyright (c) 2025-present Spencer Haan, Side Trails Software Development
