module Jekyll
Embed Flickr photos in a Jekyll
blog.
Copyright (C) 2015 Lawrence Murray, www.indii.org. Copyright (C) 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.
Embed Flickr photos in a Jekyll
blog.
Copyright (C) 2015 Lawrence Murray, www.indii.org. Copyright (C) 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.
Constants
- FLICKR_CACHE_DIR
- FLICKR_SIZE_FULL
- FLICKR_SIZE_THUMB
- FLICKR_VERSION
Public Class Methods
Get Flickr Photoset
from Cache
# 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
Setup Flickr Plugin
# 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