Module: Jekyll
- Defined in:
- lib/badpixxel-jekyll-flickr/config.rb,
lib/badpixxel-jekyll-flickr.rb,
lib/badpixxel-jekyll-flickr/photo.rb,
lib/badpixxel-jekyll-flickr/loader.rb,
lib/badpixxel-jekyll-flickr/filters.rb,
lib/badpixxel-jekyll-flickr/version.rb,
lib/badpixxel-jekyll-flickr/photoset.rb
Overview
Embed Flickr photos in a Jekyll blog.
Copyright © 2015 Lawrence Murray, www.indii.org. Copyright © 2020 BadPixxel, www.badpixxel.com.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Defined Under Namespace
Modules: FlickrFilters Classes: FlickrConfig, FlickrFancysetTag, FlickrLoader, FlickrPageGenerator, FlickrPhotosetTag, Photo, PhotoPost, Photoset
Constant Summary collapse
- FLICKR_CACHE_DIR =
'_data/flickr'
- FLICKR_SIZE_FULL =
'Large'
- FLICKR_SIZE_THUMB =
'Small 320'
- FLICKR_VERSION =
'0.0.3'
Class Method Summary collapse
-
.flickr_get_photoset(site, photoset_name) ⇒ Object
Get Flickr Photoset from Cache.
-
.flickr_setup(site) ⇒ Object
Setup Flickr Plugin.
Class Method Details
.flickr_get_photoset(site, photoset_name) ⇒ Object
Get Flickr Photoset from Cache
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/badpixxel-jekyll-flickr.rb', line 34 def self.flickr_get_photoset(site, photoset_name) # Build Photoset Slug slug = photoset_name.downcase.gsub(/ /, '-').gsub(/[^a-z\-]/, '') # Build Photoset Path photoset_file = File.join(site.config['flickr']['cache_dir'], "#{slug}.yml") # Check if Photoset is Already in Cache if !File.exists?(photoset_file) return false end return Photoset.new(site, photoset_file) end |
.flickr_setup(site) ⇒ Object
Setup Flickr Plugin
25 26 27 28 29 30 31 |
# File 'lib/badpixxel-jekyll-flickr.rb', line 25 def self.flickr_setup(site) # Complete Configuration with defaults Parameters FlickrConfig.resolve(site) # Load Flickr Contents from API FlickrLoader.setup(site) FlickrLoader.load(site) end |