next-assetlinks
v1.0.0
Published
Generate an assetlinks.json file for Next.js projects
Downloads
810
Readme
next-assetlinks
Easily generate an assetlinks.json
for Android app association in your Next.js
project. This tool creates .well-known/assetlinks.json
, allowing Android apps
to handle URLs.
Installation
Install via npm:
npm i next-assetlinks
# or
yarn add next-assetlinks
Setup
Create a Config File
Addnext-assetlinks.config.js
to your project root:// next-assetlinks.config.js module.exports = { packageName: "com.example.app", sha256Fingerprint: ["FINGERPRINT_1", "FINGERPRINT_2"], };
packageName
: Your Android app's package name.sha256Fingerprint
: Array of SHA-256 fingerprints for your app's signing certificates.
Add Script to
package.json
Update package.json to add the generate-assetlinks script:"scripts": { "generate-assetlinks": "node ./node_modules/next-assetlinks/cli.js" }
Usage
Run the command to generate assetlinks.json
:
npm run generate-assetlinks
# or
yarn generate-assetlinks
This will create or update public/.well-known/assetlinks.json
with the
configured package name and fingerprints.
Contributing
Contributions are welcome!
Credits
Package by Reach Digital
License
Licensed under MIT. See LICENSE for details.