https://github.com/nicekiwi/micro-blog-imgur-gallery-plugin
Add imgur galleries to a blog hosted on micro.blog
https://github.com/nicekiwi/micro-blog-imgur-gallery-plugin
imgur-api imgur-client microblog
Last synced: 8 months ago
JSON representation
Add imgur galleries to a blog hosted on micro.blog
- Host: GitHub
- URL: https://github.com/nicekiwi/micro-blog-imgur-gallery-plugin
- Owner: nicekiwi
- License: mpl-2.0
- Created: 2020-10-07T04:34:46.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-13T05:58:10.000Z (over 5 years ago)
- Last Synced: 2025-01-19T21:47:19.673Z (over 1 year ago)
- Topics: imgur-api, imgur-client, microblog
- Language: JavaScript
- Homepage:
- Size: 387 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Imgur Gallery Plugin
Built as a plugin for micro.blog blogs.
Pulls in albums from Imgur on the fly via it's API and displays them as thumbnails with a lighbox popup.
## Features
- Thumbnail gallery
- Simple lightbox
- Caption support
- Option to hide NFSW content
- Supports custom lightbox
- Supports custom CSS
- Mobile/touch friendly
And best of all you can use multiple galleries on the same page.
### Requires a Imgur API Client ID
Add your Imgur App Client ID into the plugin settings (not the secret).
https://api.imgur.com/oauth2/addclient
## Usage
Include the following snippet in a post.
```
```
## Example
`
`

### Required Attributes
```
class="imgur-gallery" // The identifier for the script to pickup.
---
data-id="ALBUM_ID" // The ID of the Imgur Album you want to display.
```
### Optional Attributes
```
data-title="true" // Weather or not to display a title above the thumbnails. The Title will be either the contents of the data-title-text attribute, the Imgur ALbum title, or the words "Photo Gallery". The number in the gallery is included after the title. E.g. "Photo Gallery (18)"
---
data-title-text="My Holiday Photos" // A custom Title for the gallery, data-title should be set to true.
---
data-nsfw="true" // Will initially hide the gallery thumbnails and display a message explaining the photos have been hidden and offer a link to reveal them.
---
data-nsfw-message="NFSW Content is hidden." // Specify a custom NSFW message
---
data-nsfw-link="Click here to reveal content" // Specify custom link text to reveal the photos
```
### Roadmap
- Use Hugo Shortcodes instead of HTML
- Get the Plugin into the Micro.Blog plugins list.
Enjoy! :)