Skip to content

Commit 30c5672

Browse files
authored
Merge pull request #1 from Sprokets/craft3
Craft3
2 parents 2215d5f + cb89d3d commit 30c5672

File tree

18 files changed

+521
-390
lines changed

18 files changed

+521
-390
lines changed

.craftplugin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"pluginName":"Imgix Url","pluginDescription":"Build imgix urls, including secure images.","pluginVersion":"0.0.3","pluginAuthorName":"Sprokets","pluginAuthorUrl":"http://sprokets.net","pluginAuthorGithub":"","codeComments":"yes","pluginComponents":["variables"],"controllerName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","widgetName":"","apiVersion":"api_version_2_5"}
1+
{"pluginName":"imgixurl","pluginDescription":"Build imgix urls from assets, including secure images.","pluginVersion":"2.0.0","pluginAuthorName":"sprokets","pluginVendorName":"sprokets","pluginAuthorUrl":"https://sprokets.net","pluginAuthorGithub":"craft-imgixurl","codeComments":"yes","pluginComponents":["settings","variables"],"consolecommandName":"","controllerName":"","cpsectionName":"","elementName":"","fieldName":"","modelName":"","purchasableName":"","recordName":"","serviceName":"","taskName":"","utilityName":"","widgetName":"","apiVersion":"api_version_3_0"}

.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1+
# CRAFT ENVIRONMENT
2+
.env.php
3+
.env.sh
4+
.env
5+
6+
# COMPOSER
7+
/vendor
8+
9+
# BUILD FILES
10+
/bower_components/*
11+
/node_modules/*
12+
/build/*
13+
/yarn-error.log
14+
15+
# MISC FILES
16+
.cache
117
.DS_Store
18+
.idea
19+
.project
20+
.settings
21+
*.esproj
22+
*.sublime-workspace
23+
*.sublime-project
24+
*.tmproj
25+
*.tmproject
26+
.vscode/*
27+
!.vscode/settings.json
28+
!.vscode/tasks.json
29+
!.vscode/launch.json
30+
!.vscode/extensions.json
31+
config.codekit3
32+
prepros-6.config

CHANGELOG.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1-
# Imgix Url Changelog
1+
# imgixurl Changelog
22

3-
## 0.0.3 -- 2017-08-23
4-
- Fix config setting to disable url sources
3+
All notable changes to this project will be documented in this file.
54

6-
## 0.0.2 -- 2017-08-23
7-
- Rename repository
8-
9-
## 0.0.1 -- 2017-08-23
10-
11-
- Change `s3` property name to `original` in config
12-
13-
14-
## 0.0.0 -- 2017-08-22
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
156

7+
## 2.0.0 - 2018-02-14
8+
### Added
169
- Initial release
17-

ImgixUrlPlugin.php

Lines changed: 0 additions & 174 deletions
This file was deleted.

LICENSE.txt renamed to LICENSE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
The MIT License (MIT)
2-
Copyright (c) 2017 Sprokets
2+
3+
Copyright (c) 2018 sprokets
34

45
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
56

README.md

Lines changed: 25 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,43 @@
1-
# Imgix Url plugin for Craft CMS
1+
# imgixurl plugin for Craft CMS 3.x
22

3-
Build imgix urls, including secure images.
3+
Build imgix urls from assets, including secure images.
44

5-
```twig
6-
<img src="{{ craft.imgixUrl.getUrl(imageAsset, {w: 75}) }}" alt="75px Image from imgix!">
7-
```
5+
![Screenshot](resources/img/plugin-logo.png)
6+
7+
## Requirements
8+
9+
This plugin requires Craft CMS 3.0.0-beta.23 or later.
810

911
## Installation
1012

11-
To install Imgix Url, follow these steps:
13+
To install the plugin, follow these instructions.
14+
15+
1. Open your terminal and go to your Craft project:
16+
17+
cd /path/to/project
1218

13-
1. Download & unzip the file and place the `imgixurl` directory into your `craft/plugins` directory
14-
2. Install plugin in the Craft Control Panel under Settings > Plugins
15-
3. The plugin folder should be named `imgixurl` for Craft to see it. GitHub recently started appending `-master` (the branch name) to the name of the folder for zip file downloads.
16-
4. Copy the `config-sample.php` file to `craft/config/imgixurl.php` and make the needed changes
19+
2. Then tell Composer to load the plugin:
1720

18-
Imgix Url works on Craft 2.4.x and Craft 2.5.x.
21+
composer require craft-imgixurl/imgixurl
1922

20-
## Imgix Url Overview
23+
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for imgixurl.
2124

22-
This is a fairly basic plugin to build imgix urls from craft image assets. In the config file, you provide a list of sources, and optionally some default settings.
25+
## imgixurl Overview
2326

24-
Then in your templates, you can simply output imgix urls using [any settings you'd like](https://docs.imgix.com/apis/url).
27+
-Insert text here-
2528

26-
The sources can optionally support [secure image tokens](https://docs.imgix.com/setup/securing-images) as well.
29+
## Configuring imgixurl
2730

28-
## Configuring Imgix Url
31+
-Insert text here-
2932

30-
#### Config file:
31-
```php
32-
// Copy this file to /craft/config/imgixurl.php
33+
## Using imgixurl
3334

34-
return array(
35-
'*' => array(
36-
'defaultSettings' => array(
37-
"auto" => "compress,format"
38-
),
39-
'sources' => array(
40-
array(
41-
's3' => 'sampledomain.s3.amazonaws.com',
42-
'imgix' => 'https://sampledomain.imgix.net',
43-
'token' => 'abcde12345', // optional
44-
// see https://docs.imgix.com/setup/securing-images for more on secure token.
45-
)
46-
)
47-
)
48-
// '.dev' => array()
49-
// this would allow you to turn off imgix routing on .dev domains, saving you some bandwidth.
50-
// the full image url would be returned.
51-
);
52-
```
35+
-Insert text here-
5336

54-
## Using Imgix Url
37+
## imgixurl Roadmap
5538

56-
```twig
57-
<img src="{{ craft.imgixUrl.getUrl(imageAsset, {w: 75}) }}" alt="75px Image from imgix!">
58-
```
39+
Some things to do, and ideas for potential features:
5940

60-
The plugin simply outputs a url, so it's up to you to create any markup, including responsive images. Imgix makes a lot of this very simple though, especially for [simple pixel-density cases](https://docs.imgix.com/apis/url/dpr):
41+
* Release it
6142

62-
```twig
63-
<img
64-
src="{{ craft.imgixUrl.getUrl(imageAsset, {w: 75}) }}"
65-
srcset="{{ craft.imgixUrl.getUrl(imageAsset, {w: 75, dpr: 2}) }} 2x"
66-
alt="75px Image and 2x image from imgix!"
67-
>
68-
```
43+
Brought to you by [sprokets](https://sprokets.net)

composer.json

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,40 @@
11
{
2-
"name": "/imgixurl",
3-
"description": "Build imgix urls, including secure images.",
4-
"type": "craft-plugin",
5-
"authors": [
6-
{
7-
"name": "Sprokets",
8-
"homepage": "http://sprokets.net"
9-
}
10-
],
11-
"require": {
12-
"composer/installers": "~1.0"
13-
}
2+
"name": "sprokets/imgixurl",
3+
"description": "Build imgix urls from assets, including secure images.",
4+
"type": "craft-plugin",
5+
"version": "2.0.3",
6+
"keywords": [
7+
"craft",
8+
"cms",
9+
"craftcms",
10+
"craft-plugin",
11+
"imgixurl"
12+
],
13+
"support": {
14+
"docs": "https://github.com/craft-imgixurl/imgixurl/blob/master/README.md",
15+
"issues": "https://github.com/craft-imgixurl/imgixurl/issues"
16+
},
17+
"license": "MIT",
18+
"authors": [
19+
{
20+
"name": "sprokets",
21+
"homepage": "https://sprokets.net"
22+
}
23+
],
24+
"require": {
25+
"craftcms/cms": "^3.0.0-RC1"
26+
},
27+
"autoload": {
28+
"psr-4": {
29+
"sprokets\\imgixurl\\": "src/"
30+
}
31+
},
32+
"extra": {
33+
"name": "imgixurl",
34+
"handle": "imgixurl",
35+
"hasCpSettings": true,
36+
"hasCpSection": false,
37+
"changelogUrl": "https://raw.githubusercontent.com/craft-imgixurl/imgixurl/master/CHANGELOG.md",
38+
"class": "sprokets\\imgixurl\\Imgixurl"
39+
}
1440
}

0 commit comments

Comments
 (0)