Skip to content

Commit debb717

Browse files
authored
Create README.md
1 parent b60a26a commit debb717

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Grav Flickr Plugin
2+
==================
3+
4+
This plugin allows you to fetch flickr photos, photosets and collections, and display them in page.
5+
6+
The current template make use of `featherlight`, with the `gallery` option enabled, to open your images in a slideshow.
7+
If you wish to change this behaviour, please modify templates in the `templates/partial` directory.
8+
9+
Flickr data is provided via shortcodes, the `shortcode-core` plugin is therefore another dependency.
10+
11+
Quick usage
12+
-----------
13+
14+
First you must configure your Flickr account, getting an API key and secret.
15+
You should register to the [Flickr App Garden](https://www.flickr.com/services).
16+
You will also need to find out your user id from your Flickr username, some services like [IdGettr](http://idgettr.com/) can get this for you.
17+
Configure the flickr plugin (`flickr.yaml` in `user/config/plugins/`, or even better using Grav Admin), with these values:
18+
19+
flickr_api_key: "<your api key>"
20+
flickr_api_secret: "<your api secret>"
21+
flickr_user_id: "<your user id>"
22+
23+
To test the plugin you need to find the id of the Flickr daya you want to display.
24+
Currently the plugin supports single photos, photosets (albums) and collections.
25+
The id can usually be found on the url of the resource you are currently browsing.
26+
27+
### Single Photo
28+
29+
[flickr-photo id=27313730662]
30+
31+
### Photoset
32+
33+
[flickr-photoset id=72157669449388725]
34+
35+
### Collections
36+
37+
[flickr-collection id=139636693-72157668802262691
38+
39+
40+
Advanced Options
41+
----------------
42+
43+
Each shortcode accepts additional values beside the `id` parameter.
44+
This is a list for each shortcode.
45+
46+
* flickr-photo:
47+
* `display-format-photo`: single letter, defining the image size to be displayed. Look [Flickr URL reference](https://www.flickr.com/services/api/misc.urls.html) for all possible values.
48+
* `display-format-photo-lightbox`: same values as the previous parameter, but used to define image size in the lightbox popup.
49+
* flickr-photoset:
50+
* `photoset-title-tag`: HTML tag to use for the photoset title.
51+
* `photoset-description-tag`: HTML tag to use for the photoset description.
52+
* All the parameters for **flickr-photo** are also accepted, to properly display child photos.
53+
* flickr-collection
54+
* `hide-empty-collections`: if set to `true`, skips title and description for collections without sets. Default `false`
55+
* `collection-title-tag`: HTML tag to use for the collection title.
56+
* `collection-description-tag`: HTML tag to use for the collection description.
57+
* All the parameters for **flickr-photo** and **flickr-photoset** are also supported to properly display child photos and photosets.
58+

0 commit comments

Comments
 (0)