servd / craft-asset-source-generator
Craft CMS plugin to create asset volumes when first installed
Installs: 4
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/aws-s3: 1.0.8
- craftcms/cms: ^3.0.0-RC1
This package is auto-updated.
Last update: 2024-10-29 05:22:37 UTC
README
Creates configured asset sources when the plugin is first installed
Requirements
This plugin requires Craft CMS 3.0.0-beta.23 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require servdhost/craft-asset-source-generator
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Craft Asset Source Generator.
Craft Asset Source Generator Overview
A Craft CMS plugin to create some asset volumes upon installation. Used within Servd's infrastructure.
Configuring Craft Asset Source Generator
Create a config file at config/craft-asset-source-generator.php
with something like the following contents:
<?php
return [
'sources' => [
[
'keyId' => 'your-AWS-key',
'secret' => 'your-AWS-secret',
'bucket' => 's3-bucket',
'region' => 's3-region',
'subfolder' => 'prepended-to-all-asset-keys',
'expires' => '5 minutes',
'cfDistributionId' => 'cloudfront-distro-id',
'name' => 'volume-name',
'handle' => 'volume-handle',
'hasUrls' => true,
'url' => 'https://url-to-your-volume.com'
]
]
];
You can add multiple volumes, they just need different handles.
Using Craft Asset Source Generator
Ensure craftcms/aws-s3 is installed prior to installing this plugin.
Then install this plugin.
Brought to you by Servd