Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mslinn/jekyll_archive_display

Jekyll tag plugin that lists the names and contents of each entry in a tar file
https://github.com/mslinn/jekyll_archive_display

jekyll jekyll-plugin tar

Last synced: 3 months ago
JSON representation

Jekyll tag plugin that lists the names and contents of each entry in a tar file

Awesome Lists containing this project

README

        

`jekyll_archive_display`
[![Gem Version](https://badge.fury.io/rb/jekyll_archive_display.svg)](https://badge.fury.io/rb/jekyll_archive_display)
===========

`jekyll_archive_display` is a Jekyll plugin, packaged as a Ruby gem, that lists the names and contents of each entry in a `tar` file.

The following HTML is emitted for each text file within the `tar`:
```HTML

{tar_entry.full_name}

{file_contents}

```

Binary files are displayed like this:

**`usr/bin/ruby2.7 (application/x-sharedlib; charset=binary)`**

*Binary file*

## Syntax
```
{% archive_display filename.tar %}
```

## Additional Information
More information is available on Mike Slinn's web site about
[Jekyll plugins](https://www.mslinn.com/blog/index.html#Jekyll).

## Installation

### Install dependencies:
- Ubuntu:
```shell
sudo apt install libmagic-dev
```
- Mac:
```shell
brew install libmagic
```

### Gems
Add this line to your Jekyll website's `_config.yml`:

```ruby
group :jekyll_plugins do
gem 'jekyll_archive_display'
end
```

Also add it to `_config.yml`:
```yaml
plugins:
- jekyll_archive_display
```

Install all dependent gems of your Jekyll website in the usual way:

$ bundle install

## Additional Information
More information is available on
[Mike Slinn’s website](https://www.mslinn.com/blog/2020/10/03/jekyll-plugins.html).

## Development

After checking out the repo, run `bin/setup` to install dependencies.

You can also run `bin/console` for an interactive prompt that will allow you to experiment.

### Build and Install Locally
To build and install this gem onto your local machine, run:
```shell
$ bundle exec rake install
jekyll_archive_display 1.0.0 built to pkg/jekyll_archive_display-0.1.0.gem.
jekyll_archive_display (1.0.0) installed.
```

Examine the newly built gem:
```shell
$ gem info jekyll_archive_display

*** LOCAL GEMS ***

jekyll_archive_display (1.0.0)
Author: Mike Slinn
Homepage:
https://github.com/mslinn/jekyll_archive_display
License: MIT
Installed at: /home/mslinn/.gems

Jekyll tag plugin that lists the names and contents of each entry in a tar file.
```

### Build and Push to RubyGems
To release a new version,
1. Update the version number in `version.rb`.
2. Commit all changes to git; if you don't the next step might fail with an unexplainable error message.
3. Run the following:
```shell
$ bundle exec rake release
```
The above creates a git tag for the version, commits the created tag,
and pushes the new `.gem` file to [RubyGems.org](https://rubygems.org).

## Contributing

1. Fork the project
2. Create a descriptively named feature branch
3. Add your feature
4. Submit a pull request

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).