wax_tasks 1.0.0.pre.beta → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +35 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
- data/.gitignore +7 -0
- data/.rspec +3 -0
- data/.rubocop.yml +16 -0
- data/.travis.yml +27 -0
- data/CHANGELOG.md +42 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +5 -2
- data/LICENSE +21 -0
- data/README.md +171 -0
- data/lib/tasks/clobber.rake +16 -0
- data/lib/tasks/derivatives_iiif.rake +9 -4
- data/lib/tasks/derivatives_simple.rake +8 -4
- data/lib/tasks/pages.rake +23 -0
- data/lib/tasks/search.rake +23 -0
- data/lib/wax_tasks.rb +30 -36
- data/lib/wax_tasks/asset.rb +57 -0
- data/lib/wax_tasks/collection.rb +42 -73
- data/lib/wax_tasks/collection/images.rb +126 -0
- data/lib/wax_tasks/collection/metadata.rb +101 -0
- data/lib/wax_tasks/config.rb +79 -0
- data/lib/wax_tasks/error.rb +17 -31
- data/lib/wax_tasks/index.rb +45 -0
- data/lib/wax_tasks/item.rb +116 -0
- data/lib/wax_tasks/record.rb +69 -0
- data/lib/wax_tasks/site.rb +86 -0
- data/lib/wax_tasks/utils.rb +58 -107
- data/lib/wax_tasks/version.rb +5 -0
- data/spec/setup.rb +1 -1
- data/spec/spec_helper.rb +14 -9
- data/wax_tasks.gemspec +33 -0
- metadata +52 -44
- data/lib/tasks/jspackage.rake +0 -17
- data/lib/tasks/lunr.rake +0 -9
- data/lib/tasks/pagemaster.rake +0 -11
- data/lib/tasks/push.rake +0 -12
- data/lib/tasks/test.rake +0 -18
- data/lib/wax_tasks/branch.rb +0 -70
- data/lib/wax_tasks/iiif/derivatives.rb +0 -86
- data/lib/wax_tasks/iiif/manifest.rb +0 -26
- data/lib/wax_tasks/image_collection.rb +0 -137
- data/lib/wax_tasks/local_branch.rb +0 -21
- data/lib/wax_tasks/lunr/index.rb +0 -82
- data/lib/wax_tasks/lunr/page_set.rb +0 -57
- data/lib/wax_tasks/pagemaster_collection.rb +0 -60
- data/lib/wax_tasks/task_runner.rb +0 -148
- data/lib/wax_tasks/travis_branch.rb +0 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d6b199887d4f473d837b2115169191e7ba1761b6402715ef2ef5dc390f0a7e9
|
4
|
+
data.tar.gz: 3518140ad547ab96d258ce5de5ee9f8bac47dab868409318c7036a89bc85f3fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba2e755b8068a428edcb8b57ad727bef86108fa5ba6c651ff3191b521e3a71b4d5a2d9a55a8036efa3b27cbae97a03acdacff29fbfc459033af2b287fb018d52
|
7
|
+
data.tar.gz: 53fe1a0275839addf3b0d98b58ab02982c52885d3d2029a6c2424364b38f17e68ef426bd02449d9900d6dc30ce2f19b9cff577250470fa2ce3edfc9336cec15a
|
@@ -0,0 +1,35 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
**Describe the bug**
|
8
|
+
A clear and concise description of what the bug is.
|
9
|
+
|
10
|
+
**To Reproduce**
|
11
|
+
Steps to reproduce the behavior:
|
12
|
+
1. Go to '...'
|
13
|
+
2. Click on '....'
|
14
|
+
3. Scroll down to '....'
|
15
|
+
4. See error
|
16
|
+
|
17
|
+
**Expected behavior**
|
18
|
+
A clear and concise description of what you expected to happen.
|
19
|
+
|
20
|
+
**Screenshots**
|
21
|
+
If applicable, add screenshots to help explain your problem.
|
22
|
+
|
23
|
+
**Desktop (please complete the following information):**
|
24
|
+
- OS: [e.g. iOS]
|
25
|
+
- Browser [e.g. chrome, safari]
|
26
|
+
- Version [e.g. 22]
|
27
|
+
|
28
|
+
**Smartphone (please complete the following information):**
|
29
|
+
- Device: [e.g. iPhone6]
|
30
|
+
- OS: [e.g. iOS8.1]
|
31
|
+
- Browser [e.g. stock browser, safari]
|
32
|
+
- Version [e.g. 22]
|
33
|
+
|
34
|
+
**Additional context**
|
35
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest an idea for this project
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
**Is your feature request related to a problem? Please describe.**
|
8
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
9
|
+
|
10
|
+
**Describe the solution you'd like**
|
11
|
+
A clear and concise description of what you want to happen.
|
12
|
+
|
13
|
+
**Describe alternatives you've considered**
|
14
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
15
|
+
|
16
|
+
**Additional context**
|
17
|
+
Add any other context or screenshots about the feature request here.
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
AllCops:
|
2
|
+
NewCops: enable
|
3
|
+
TargetRubyVersion: 2.4
|
4
|
+
Exclude: ['spec/**/*', 'test_build/**/*']
|
5
|
+
Layout/LineLength:
|
6
|
+
IgnoredPatterns: ['raise', 'puts', 'set', 'warn', 'ÈÉÊË', 'EEEE', 'safe_join', 'spec']
|
7
|
+
Metrics/AbcSize:
|
8
|
+
Max: 28
|
9
|
+
Metrics/MethodLength:
|
10
|
+
Max: 15
|
11
|
+
Layout/EmptyComment:
|
12
|
+
Enabled: false
|
13
|
+
Layout/EmptyLineAfterGuardClause:
|
14
|
+
Enabled: false
|
15
|
+
Style/SingleArgumentDig:
|
16
|
+
Enabled: false
|
data/.travis.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# sudo: true
|
2
|
+
language: ruby
|
3
|
+
rvm:
|
4
|
+
- 2.4
|
5
|
+
- 2.5
|
6
|
+
- 2.6
|
7
|
+
addons:
|
8
|
+
apt:
|
9
|
+
packages:
|
10
|
+
- ghostscript
|
11
|
+
- tree
|
12
|
+
env:
|
13
|
+
global:
|
14
|
+
- CC_TEST_REPORTER_ID=9ef8644063d4113becf719844a0f9c0f8a452f87d69a8315c6fb090123e52cc8
|
15
|
+
before_install:
|
16
|
+
- gem update --system
|
17
|
+
- gem install bundler
|
18
|
+
- sudo rm /etc/ImageMagick-6/policy.xml
|
19
|
+
before_script:
|
20
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
21
|
+
- chmod +x ./cc-test-reporter
|
22
|
+
- ./cc-test-reporter before-build
|
23
|
+
script:
|
24
|
+
- bundle exec bundle-audit
|
25
|
+
- bundle exec rspec
|
26
|
+
after_script:
|
27
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
Welcome to the Changelog! Below is the first attempt at a log for this project.
|
4
|
+
|
5
|
+
Please note that we define ___breaking changes___ as those changes which force users to change how they interact with __wax_tasks__
|
6
|
+
via their site's `_config.yml` file or how they invoke the tasks on the command line.
|
7
|
+
|
8
|
+
## v1.0.3
|
9
|
+
#### Date: ???
|
10
|
+
|
11
|
+
#### Non-breaking Changes:
|
12
|
+
- :white_check_mark: Allows use of `wax_iiif < 0.3` (was `<0.2`)
|
13
|
+
- :white_check_mark: Fix bug where command options (e.g., `--trace`) were being parsed as task ARGV args.
|
14
|
+
|
15
|
+
## v1.0.2
|
16
|
+
#### Date: 06/12/2019
|
17
|
+
|
18
|
+
#### Non-breaking Changes:
|
19
|
+
- :white_check_mark: Fixes [32](https://github.com/minicomp/wax_tasks/issues/32); accepts narrow images (< 1140px)
|
20
|
+
- :white_check_mark: Fixes [33](https://github.com/minicomp/wax_tasks/issues/33); better image extension handling
|
21
|
+
- :white_check_mark: Fixes [34](https://github.com/minicomp/wax_tasks/issues/34); ^
|
22
|
+
- :white_check_mark: Fixes [36](https://github.com/minicomp/wax_tasks/issues/36); fixes bug if an image item doesn't have a record
|
23
|
+
|
24
|
+
## v1.0.1
|
25
|
+
#### Date: 06/05/2019
|
26
|
+
|
27
|
+
#### Non-breaking Changes:
|
28
|
+
- :white_check_mark: Uses `wax_iiif v0.1.2` with better progress bar handling on IIIF derivative generation
|
29
|
+
- :white_check_mark: Has better progress bar handling on simple derivative generation
|
30
|
+
|
31
|
+
## v1.0.0
|
32
|
+
#### Date: 06/04/2019
|
33
|
+
|
34
|
+
#### Breaking Changes:
|
35
|
+
- :bangbang: __Search index generation__ is now handled under the variable `search` in `_config.yml` instead of `lunr_index` and accepts a hash instead of an array.
|
36
|
+
- :bangbang: __Search index generation__ is now run with `bundle exec rake wax:search NAME` instead of `bundle exec rake wax:lunr`
|
37
|
+
- :x: __Search UI__ is now handled dynamically by `wax_theme`; as such the `UI=true` option on the rake task has been depricated.
|
38
|
+
- :x:: The __site testing__ task `bundle exec rake wax:test` was deprecated and moved to `wax_theme`, since it deals with site presentation and not the handling of collection data.
|
39
|
+
- :x: The `wax:jspackage` task was depricated, since it was arbitrary and unused.
|
40
|
+
|
41
|
+
#### Non-breaking Changes:
|
42
|
+
- :white_check_mark: The __page generation__ task `bundle exec rake wax:pagemaster NAME` has become `bundle exec rake wax:pages NAME`. However, this is currently aliased for backwards compatibility.
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'https://rubygems.org'
|
2
4
|
gemspec
|
3
5
|
|
4
6
|
# dev/test utilities
|
7
|
+
gem 'bundle-audit', require: false
|
5
8
|
gem 'diane', require: false
|
6
|
-
gem 'rubocop',
|
7
|
-
gem 'simplecov', require: false
|
9
|
+
gem 'rubocop', require: false
|
10
|
+
gem 'simplecov', '0.17.1', require: false
|
8
11
|
gem 'yard', require: false
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 marii nyrop
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
# wax_tasks 🐝
|
2
|
+
[![Build Status](https://travis-ci.com/minicomp/wax_tasks.svg?branch=main)](https://travis-ci.com/minicomp/wax_tasks) [![Depfu](https://badges.depfu.com/badges/6105c55b9634e74b1c27055b19bad8f0/overview.svg)](https://depfu.com/github/minicomp/wax_tasks?project_id=10548)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/wax_tasks.svg)](https://badge.fury.io/rb/wax_tasks)
|
4
|
+
[![Gem Downloads](https://img.shields.io/gem/dt/wax_tasks.svg?color=046d0b)](https://badge.fury.io/rb/wax_tasks)
|
5
|
+
[![docs](http://img.shields.io/badge/docs-rdoc.info-blue.svg?style=flat)](https://www.rubydoc.info/github/minicomp/wax_tasks/)
|
6
|
+
|
7
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/14408e7e962b9b84ec65/maintainability)](https://codeclimate.com/github/minicomp/wax_tasks/maintainability)
|
8
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/14408e7e962b9b84ec65/test_coverage)](https://codeclimate.com/github/minicomp/wax_tasks/test_coverage)
|
9
|
+
![License](https://img.shields.io/github/license/minicomp/wax_tasks.svg?color=c6a1e0)
|
10
|
+
|
11
|
+
__wax_tasks__ is gem-packaged set of [Rake](https://ruby.github.io/rake/) tasks for creating minimal exhibition sites with [Wax](https://github.com/minicomp/wax/).
|
12
|
+
|
13
|
+
It can be used to:
|
14
|
+
- generate collection markdown pages from a metadata file ([wax:pages](#waxpages))
|
15
|
+
- generate a client-side search index ([wax:search](#waxsearch))
|
16
|
+
- generate either IIIF-compliant derivatives ([wax:derivatives:iiif](#waxderivativesiiif)) or simple image derivatives ([wax:derivatives:simple](#waxderivativessimple)) from local image and pdf files
|
17
|
+
|
18
|
+
<br>
|
19
|
+
<img src="https://github.com/minicomp/wiki/blob/main/assets/wax_screen.gif?raw=true"/>
|
20
|
+
|
21
|
+
|
22
|
+
# Getting Started
|
23
|
+
|
24
|
+
## Prerequisites
|
25
|
+
|
26
|
+
You'll need `Ruby >= 2.4` with `bundler` installed. Check your versions with:
|
27
|
+
```bash
|
28
|
+
$ ruby -v
|
29
|
+
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin15]
|
30
|
+
|
31
|
+
$ bundler -v
|
32
|
+
Bundler version 1.16.1
|
33
|
+
```
|
34
|
+
|
35
|
+
To use the image derivative tasks, you will also need to have ImageMagick and Ghostscript installed and functional. You can check to see if you have ImageMagick by running:
|
36
|
+
```bash
|
37
|
+
$ convert -version
|
38
|
+
Version: ImageMagick 6.9.9-20 Q16 x86_64 2017-10-15 http://www.imagemagick.org
|
39
|
+
Copyright: (c) 1999-2017 ImageMagick Studio LLC
|
40
|
+
License: http://www.imagemagick.org/script/license.php
|
41
|
+
Features: Cipher DPC Modules
|
42
|
+
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
|
43
|
+
```
|
44
|
+
|
45
|
+
... and check Ghostscript with:
|
46
|
+
```bash
|
47
|
+
$ gs -version
|
48
|
+
GPL Ghostscript 9.21 (2017-03-16)
|
49
|
+
Copyright (C) 2017 Artifex Software, Inc. All rights reserved.
|
50
|
+
```
|
51
|
+
|
52
|
+
Next, you'll need a Jekyll site. You can clone the [minicomp/wax demo site](https://github.com/minicomp/wax/) or start a site from scratch with:
|
53
|
+
|
54
|
+
```sh
|
55
|
+
$ gem install jekyll
|
56
|
+
$ jekyll new wax && cd wax
|
57
|
+
```
|
58
|
+
|
59
|
+
## Installation
|
60
|
+
|
61
|
+
Add `wax_tasks` to your Jekyll site's `Gemfile`:
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
gem 'wax_tasks'
|
65
|
+
```
|
66
|
+
|
67
|
+
... and install with bundler:
|
68
|
+
|
69
|
+
```bash
|
70
|
+
$ bundle install
|
71
|
+
```
|
72
|
+
|
73
|
+
Create a `Rakefile` with the following:
|
74
|
+
```ruby
|
75
|
+
spec = Gem::Specification.find_by_name 'wax_tasks'
|
76
|
+
Dir.glob("#{spec.gem_dir}/lib/tasks/*.rake").each { |r| load r }
|
77
|
+
```
|
78
|
+
|
79
|
+
# Usage
|
80
|
+
|
81
|
+
After following the installation instructions above, you will have access to the Rake tasks in your shell by running `$ bundle exec rake wax:taskname` in the root directory of your Jekyll site.
|
82
|
+
To see the available tasks, run
|
83
|
+
|
84
|
+
```ruby
|
85
|
+
$ bundle exec rake --tasks
|
86
|
+
```
|
87
|
+
|
88
|
+
## Sample site `_config.yml` file:
|
89
|
+
|
90
|
+
```yaml
|
91
|
+
# basic settings
|
92
|
+
title: Wax.
|
93
|
+
description: a jekyll theme for minimal exhibitions
|
94
|
+
url: 'https://minicomp.github.io'
|
95
|
+
baseurl: '/wax'
|
96
|
+
|
97
|
+
# build settings
|
98
|
+
permalink: pretty # optional, creates `/page/` link instead of `page.html` links
|
99
|
+
|
100
|
+
# wax collection settings
|
101
|
+
collections:
|
102
|
+
objects: # the collection name
|
103
|
+
layout: 'iiif-image-page'
|
104
|
+
output: true # this must be true for your .md pages to be built to html!
|
105
|
+
metadata:
|
106
|
+
source: 'objects.csv' # path to the metadata file, must be within '_data'
|
107
|
+
images:
|
108
|
+
source 'source_images/objects' # path to the directory of source images, must be within '_data'
|
109
|
+
|
110
|
+
# wax search index settings
|
111
|
+
lunr_index:
|
112
|
+
main:
|
113
|
+
index: 'js/lunr-index.json' # where the index will be generated
|
114
|
+
collections: # the collections to index
|
115
|
+
objects:
|
116
|
+
content: false # whether or not to index the markdown page content (below the YAML)
|
117
|
+
fields: # the metadata fields to index
|
118
|
+
- 'label'
|
119
|
+
- 'artist'
|
120
|
+
- 'location'
|
121
|
+
- 'object_type'
|
122
|
+
```
|
123
|
+
|
124
|
+
The above example includes a single collection `objects` that comprises:
|
125
|
+
1. a CSV `metadata:source` file (`objects.csv`), and
|
126
|
+
2. a `images:source` directory of image and pdf files.
|
127
|
+
|
128
|
+
For more information on configuring Jekyll collections for __wax_tasks__, check out the [minicomp/wax wiki](https://minicomp.github.io/wiki/#/wax/) and <https://jekyllrb.com/docs/collections/>.
|
129
|
+
|
130
|
+
## Running the tasks
|
131
|
+
|
132
|
+
### wax:pages
|
133
|
+
|
134
|
+
Takes a CSV, JSON, or YAML file of collection metadata and generates a [markdown](https://daringfireball.net/projects/markdown/syntax) page for each record to a directory using a specified layout. [Read More](#TODO).
|
135
|
+
|
136
|
+
`$ bundle exec rake wax:pages collection-name`
|
137
|
+
|
138
|
+
### wax:search
|
139
|
+
|
140
|
+
Generates a client-side JSON search index of your site for use with [ElasticLunr.js](http://elasticlunr.com/). [Read More](#TODO).
|
141
|
+
|
142
|
+
`$ bundle exec rake wax:search search-name`
|
143
|
+
|
144
|
+
|
145
|
+
### wax:derivatives:simple
|
146
|
+
|
147
|
+
Takes a local directory of images and pdf files and generates a few image derivatives (i.e., 'thumbnail' 250w and 'full' 1140w) for Jekyll layouts and includes to use. [Read More](#TODO).
|
148
|
+
|
149
|
+
`$ bundle exec rake wax:derivatives:iiif collection-name`
|
150
|
+
|
151
|
+
### wax:derivatives:iiif
|
152
|
+
|
153
|
+
Takes a local directory of images and pdf files and generates tiles and data that work with a IIIF compliant image viewer like [OpenSeaDragon](https://openseadragon.github.io/), [Mirador](http://projectmirador.org/), or [Leaflet IIIF](https://github.com/mejackreed/Leaflet-IIIF). [Read More](#TODO).
|
154
|
+
|
155
|
+
`$ bundle exec rake wax:derivatives:iiif collection-name`
|
156
|
+
|
157
|
+
### wax:clobber
|
158
|
+
|
159
|
+
Destroys (or "clobbers") wax-generated files, i.e., pages generated from `wax:pagemaster`, derivatives generated from `wax:derivatives`, and search indexes generated with `wax:search` so you can start from scratch.
|
160
|
+
|
161
|
+
This task does *not* touch your source metadata or source image files! Instead, it simply clears a path for you to regenerate your collection materials in case you add/edit source materials.
|
162
|
+
|
163
|
+
`$ bundle exec rake wax:clobber collection-name`
|
164
|
+
|
165
|
+
# Contributing
|
166
|
+
|
167
|
+
Fork/clone the repository. After making code changes, run the tests (`$ bundle exec rubocop` and `$ bundle exec rspec`) before submitting a pull request. You can enable verbose tests with `$ DEBUG=true bundle exec rspec`.
|
168
|
+
|
169
|
+
# License
|
170
|
+
|
171
|
+
The gem is available as open source under the terms of the [MIT License](LICENSE).
|