This is a template to quickly test the NFT module: https://www.drupal.org/project/nft
Requirements:
First, start the beast:
git clone https://github.com/MatthieuScarset/drupal-nft-project.git
cd drupal-nft-project
cp .env.example .env
cp web/sites/example.settings.local.php web/sites/default/settings.local.php
lando start
lando composer install -o --ignore-platform-req=ext-gmp
Then install the pre-configured Drupal site.
lando drush site-install --existing-config -y
lando drush cache-rebuild -y
lando drush config-import -y
lando drush upwd admin admin
lando drush user-login
Create a page and import some NFTs:
- Go to Admin > Content > Add content.
- Add media in the field below title
- Save
- Enjoy the view...
Have fun buiDling!
Set your NFTPort.xyz API key in backoffice (Admin > Config > Media > NFTPort):
API Key: 'ENTER-YOUR-KEY'
Go to Admin > Content.
Click on the dropdown select in the last column and select the "Mint" operation.
Run this command to (re)create the NFT media type, if missing:
lando drush eval "_nft_media_create_media_type();"
You might have issue retrieving assets from OpensSea.io:
The provided URL does not represent a valid oEmbed resource.
If so, try to set the API key in .env
file at project's root:
opensea_api_key='ENTER-YOUR-KEY'
Still have questions? Feel free to contact me anytime.