Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jessp01/jekyll-react-player
Provides a Liquid tag for embedding all formats supported by react-player (https://github.com/cookpete/react-player#supported-media) in Jekyll sites.
https://github.com/jessp01/jekyll-react-player
embed jekyll liquid media react-player video
Last synced: about 1 month ago
JSON representation
Provides a Liquid tag for embedding all formats supported by react-player (https://github.com/cookpete/react-player#supported-media) in Jekyll sites.
- Host: GitHub
- URL: https://github.com/jessp01/jekyll-react-player
- Owner: jessp01
- License: agpl-3.0
- Created: 2023-07-31T14:42:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-02T11:40:54.000Z (over 1 year ago)
- Last Synced: 2024-07-14T11:07:21.318Z (5 months ago)
- Topics: embed, jekyll, liquid, media, react-player, video
- Language: Ruby
- Homepage:
- Size: 28.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jekyll-plugins - **ReactPlayer** - react-player.svg)](https://rubygems.org/gems/jekyll-react-player) [![Gem Version](https://badge.fury.io/rb/jekyll-react-player.svg)](https://badge.fury.io/rb/jekyll-react-player) -- a tag for embedding react-player supported formats in your Jekyll pages. (Videos & Screencasts)
README
# Jekyll::ReactPlayer
[![.github/workflows/gem-build.yml][badge-build]][build]
[![Gem Version][badge-gem]][rubygems]
[![Gem][badge-dl]][rubygems]
[![License][badge-license]][license]Provides a [Liquid][liquid] tag for embedding all formats supported by [react-player](https://github.com/cookpete/react-player#supported-media) in [Jekyll][jekyll] sites.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'jekyll-react-player'
```And then execute:
```sh
$ bundle
```Or install it yourself with:
```
$ gem install jekyll-react-player
```## Usage
Use the tag as follows in your Jekyll pages and posts:
```ruby
{% reactplayer https://example.com/asset %}
```This will render the below code:
```jsconst container = document.getElementById("#{id}")
const url = '#{url}'
renderReactPlayer(container, { url, playing: true, controls: true, width: '100%', height: '100%' })```
## Development
After cloning the repo, run `bin/setup` to install dependencies.
Then, run `bin/console` for an interactive prompt that will allow you
to experiment.To install this gem onto your local machine, run `bundle exec rake
install`. To release a new version, update the version number in
`version.rb`, and then run `bundle exec rake release` to create a git
tag for the version, push git commits and tags, and push the `.gem`
file to [rubygems.org](https://rubygems.org).## Contributing
Contributions are, of course, welcome. Please submit a pull request.
## License
Code is under [AGPLv3 License][license].
[badge-build]: https://github.com/jessp01/jekyll-react-player/actions/workflows/gem-build.yml/badge.svg
[build]: https://github.com/jessp01/jekyll-react-player/actions/workflows/gem-build.yml
[badge-coveralls]: https://coveralls.io/repos/jessp01/jekyll-react-player/badge.svg
[badge-gem]: https://badge.fury.io/rb/jekyll-react-player.svg
[badge-license]: https://img.shields.io/github/license/jessp01/jekyll-react-player.svg?maxAge=604800
[badge-dl]: https://img.shields.io/gem/dt/jekyll-react-player.svg
[rubygems]: https://rubygems.org/gems/jekyll-react-player
[liquid]: http://liquidmarkup.org "Liquid templating language"
[jekyll]: http://jekyllrb.com "Jekyll"
[license]: ./LICENSE