jekyll-glossary_tooltip 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +50 -0
- data/.qlty/.gitignore +7 -0
- data/.qlty/configs/.shellcheckrc +1 -0
- data/.qlty/qlty.toml +85 -0
- data/CHANGELOG.md +6 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +1 -2
- data/README.md +30 -47
- data/Rakefile +8 -1
- data/gemfiles/jekyll_3.7.x.gemfile +0 -1
- data/gemfiles/jekyll_4.x.x.gemfile +0 -1
- data/lib/jekyll-glossary_tooltip/options_parser.rb +1 -1
- data/lib/jekyll-glossary_tooltip/tag.rb +1 -3
- data/lib/jekyll-glossary_tooltip/version.rb +1 -1
- data/scripts/setup +4 -0
- metadata +10 -7
- data/.travis.yml +0 -31
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 91e6fca1d659df4ab67f4a9ef820714061537414e3abbe8f9a7c7dc6d38ae7b4
|
|
4
|
+
data.tar.gz: 8df03a1c8ce31c37f1515f48382b41cec4505d8642a543a0d3159f6dddd23da7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8bc49f67ef08dc212f0cea012a8c950952eacfd67c3e166d5c7312e0d4b402265e29ccbf98d5e01e2a7c538b5ea45d860e66a77d909f2041d43506810194b10b
|
|
7
|
+
data.tar.gz: 8da008c59ce1dc5c794e80423145254406350b2b0610ab8e0c927ed4b2dac139b7a7e74e53fb0167aef9bd583bb6a1555516a050c5d848247df2c5046dd3004f
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Continuous Integration
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: main
|
|
9
|
+
|
|
10
|
+
# OIDC permissions for qlty
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
id-token: write
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
strategy:
|
|
20
|
+
matrix:
|
|
21
|
+
ruby: [2.7.0, 3.0.1]
|
|
22
|
+
gemfile:
|
|
23
|
+
- gemfiles/jekyll_3.7.x.gemfile
|
|
24
|
+
- gemfiles/jekyll_4.x.x.gemfile
|
|
25
|
+
|
|
26
|
+
env:
|
|
27
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
|
28
|
+
|
|
29
|
+
steps:
|
|
30
|
+
- name: Checkout code
|
|
31
|
+
uses: actions/checkout@v4
|
|
32
|
+
|
|
33
|
+
- name: Set up Ruby
|
|
34
|
+
uses: ruby/setup-ruby@v1
|
|
35
|
+
with:
|
|
36
|
+
ruby-version: ${{ matrix.ruby }}
|
|
37
|
+
bundler-cache: true
|
|
38
|
+
bundler: 2.2.18
|
|
39
|
+
|
|
40
|
+
- name: Run tests
|
|
41
|
+
run: bundle exec rake spec
|
|
42
|
+
|
|
43
|
+
- name: Run linting
|
|
44
|
+
run: bundle exec rake rubocop
|
|
45
|
+
|
|
46
|
+
- uses: qltysh/qlty-action/coverage@v2
|
|
47
|
+
with:
|
|
48
|
+
oidc: true
|
|
49
|
+
format: simplecov
|
|
50
|
+
files: coverage/.resultset.json
|
data/.qlty/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
source-path=SCRIPTDIR
|
data/.qlty/qlty.toml
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# This file was automatically generated by `qlty init`.
|
|
2
|
+
# You can modify it to suit your needs.
|
|
3
|
+
# We recommend you to commit this file to your repository.
|
|
4
|
+
#
|
|
5
|
+
# This configuration is used by both Qlty CLI and Qlty Cloud.
|
|
6
|
+
#
|
|
7
|
+
# Qlty CLI -- Code quality toolkit for developers
|
|
8
|
+
# Qlty Cloud -- Fully automated Code Health Platform
|
|
9
|
+
#
|
|
10
|
+
# Try Qlty Cloud: https://qlty.sh
|
|
11
|
+
#
|
|
12
|
+
# For a guide to configuration, visit https://qlty.sh/d/config
|
|
13
|
+
# Or for a full reference, visit https://qlty.sh/d/qlty-toml
|
|
14
|
+
config_version = "0"
|
|
15
|
+
|
|
16
|
+
exclude_patterns = [
|
|
17
|
+
"*_min.*",
|
|
18
|
+
"*-min.*",
|
|
19
|
+
"*.min.*",
|
|
20
|
+
"**/.yarn/**",
|
|
21
|
+
"**/*.d.ts",
|
|
22
|
+
"**/assets/**",
|
|
23
|
+
"**/bower_components/**",
|
|
24
|
+
"**/build/**",
|
|
25
|
+
"**/cache/**",
|
|
26
|
+
"**/config/**",
|
|
27
|
+
"**/db/**",
|
|
28
|
+
"**/deps/**",
|
|
29
|
+
"**/dist/**",
|
|
30
|
+
"**/extern/**",
|
|
31
|
+
"**/external/**",
|
|
32
|
+
"**/generated/**",
|
|
33
|
+
"**/Godeps/**",
|
|
34
|
+
"**/gradlew/**",
|
|
35
|
+
"**/mvnw/**",
|
|
36
|
+
"**/node_modules/**",
|
|
37
|
+
"**/protos/**",
|
|
38
|
+
"**/seed/**",
|
|
39
|
+
"**/target/**",
|
|
40
|
+
"**/templates/**",
|
|
41
|
+
"**/testdata/**",
|
|
42
|
+
"**/vendor/**",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
test_patterns = [
|
|
46
|
+
"**/test/**",
|
|
47
|
+
"**/spec/**",
|
|
48
|
+
"**/*.test.*",
|
|
49
|
+
"**/*.spec.*",
|
|
50
|
+
"**/*_test.*",
|
|
51
|
+
"**/*_spec.*",
|
|
52
|
+
"**/test_*.*",
|
|
53
|
+
"**/spec_*.*",
|
|
54
|
+
]
|
|
55
|
+
|
|
56
|
+
[smells]
|
|
57
|
+
mode = "comment"
|
|
58
|
+
|
|
59
|
+
[smells.boolean_logic]
|
|
60
|
+
threshold = 4
|
|
61
|
+
|
|
62
|
+
[smells.file_complexity]
|
|
63
|
+
threshold = 55
|
|
64
|
+
|
|
65
|
+
[smells.return_statements]
|
|
66
|
+
threshold = 4
|
|
67
|
+
|
|
68
|
+
[smells.nested_control_flow]
|
|
69
|
+
threshold = 4
|
|
70
|
+
|
|
71
|
+
[smells.function_parameters]
|
|
72
|
+
threshold = 4
|
|
73
|
+
|
|
74
|
+
[smells.function_complexity]
|
|
75
|
+
threshold = 5
|
|
76
|
+
|
|
77
|
+
[[source]]
|
|
78
|
+
name = "default"
|
|
79
|
+
default = true
|
|
80
|
+
|
|
81
|
+
[[plugin]]
|
|
82
|
+
name = "rubocop"
|
|
83
|
+
version = "1.80.2"
|
|
84
|
+
package_file = "Gemfile"
|
|
85
|
+
package_filters = ["rubocop"]
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [2.1.0] - 2025-10-30
|
|
10
|
+
### Added
|
|
11
|
+
- Unicode support [#20](https://github.com/erikw/jekyll-glossary_tooltip/pull/20)
|
|
12
|
+
### Changed
|
|
13
|
+
- Migrated CI from Travis to GitHub Actions.
|
|
14
|
+
|
|
9
15
|
## [2.0.0] - 2025-03-31
|
|
10
16
|
### Added
|
|
11
17
|
- [BREAKING] Hidden with CSS parenthesis around term definition. These parenthesis will be revealed when jekyll produces a post.except as typically HTML and CSS stripped => the plain text rendering of the glossary tag will be "<term-name> (term-description> <term-url>)". [#7](https://github.com/erikw/jekyll-glossary_tooltip/issues/7)
|
data/CONTRIBUTING.md
CHANGED
data/Gemfile
CHANGED
|
@@ -16,14 +16,13 @@ group :development, :test do
|
|
|
16
16
|
gem "gem-release", "~> 2.0", require: false
|
|
17
17
|
gem "rake", "~> 13.0", require: false
|
|
18
18
|
gem "solargraph", require: false
|
|
19
|
-
gem "travis", "~> 1.0", require: false
|
|
20
19
|
end
|
|
21
20
|
|
|
22
21
|
group :test do
|
|
22
|
+
gem "json_pure", "~> 2.8", require: false # Solargraph pulls in v2.6.3 which fails build with " uninitialized constant JSON::Fragment"
|
|
23
23
|
gem "rspec", "~> 3.0"
|
|
24
24
|
gem "rubocop", "~> 1.18", require: false
|
|
25
25
|
gem "rubocop-rake", "~> 0.6", require: false
|
|
26
26
|
gem "rubocop-rspec", "~> 3.5", require: false
|
|
27
27
|
gem "simplecov", "~> 0.22"
|
|
28
|
-
gem "json_pure", "~> 2.8", require: false # Solargraph pulls in v2.6.3 which fails build with " uninitialized constant JSON::Fragment"
|
|
29
28
|
end
|
data/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
# Jekyll Glossary Tooltip Tag Plugin [](https://x.com/intent/tweet?text=Get%20a%20nifty%20tooltip%20for%20term%20definitions%20in%20your%20Jekyll%20blog%20with%20this%20plugin&url=https://github.com/erikw/jekyll-glossary_tooltip&via=erik_westrup&hashtags=jekyll,plugin)
|
|
2
2
|
[](https://badge.fury.io/rb/jekyll-glossary_tooltip)
|
|
3
3
|
[](https://rubygems.org/gems/jekyll-glossary_tooltip)
|
|
4
|
-
[](https://codeclimate.com/github/erikw/jekyll-glossary_tooltip/maintainability)
|
|
7
|
-
[](https://codeclimate.com/github/erikw/jekyll-glossary_tooltip/test_coverage)
|
|
4
|
+
[](https://github.com/erikw/jekyll-glossary_tooltip/actions/workflows/ci.yml)
|
|
5
|
+
[](https://github.com/erikw/jekyll-glossary_tooltip/actions/workflows/cd.yml)
|
|
8
6
|
[](https://github.com/erikw/jekyll-glossary_tooltip/actions/workflows/codeql-analysis.yml)
|
|
7
|
+
[](https://github.com/erikw/jekyll-glossary_tooltip/actions/workflows/pages/pages-build-deployment)
|
|
8
|
+
[](https://qlty.sh/gh/erikw/projects/jekyll-glossary_tooltip)
|
|
9
|
+
[](https://qlty.sh/gh/erikw/projects/jekyll-glossary_tooltip)
|
|
9
10
|
[](#)
|
|
10
11
|
[](#)
|
|
11
12
|
[](#)
|
|
@@ -23,9 +24,9 @@
|
|
|
23
24
|
|
|
24
25
|
<img src="/img/tooltip_screenshot.png" width="256" align="right" alt="Screenshot of the glossary tooltip term definition" title="Example of tooltip definition of the term 'Jekyll'.">
|
|
25
26
|
|
|
26
|
-
This plugin simplifies for your
|
|
27
|
+
This plugin simplifies things for your website visitors and you by making it easy to define terms or abbreviations that need an explanation. Define a common dictionary of terms and their definition in a YAML file. Then, inside the markdown file, you can use the provided glossary liquid tag to insert a tooltip for a defined word from the dictionary. The tooltip will show the term definition on mouse hover.
|
|
27
28
|
|
|
28
|
-
It's also possible to provide an optional URL
|
|
29
|
+
It's also possible to provide an optional URL for, for example, a term definition source reference. To also support mobile devices, this URL link is placed inside the tooltip pop-up itself, rather than making the term itself clickable. This is so that on a mobile device, you will first tap the word to get the hover tooltip, then click the link in the tooltip if desired.
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
# Installation
|
|
@@ -49,8 +50,8 @@ It's also possible to provide an optional URL to for example a term definition s
|
|
|
49
50
|
```
|
|
50
51
|
1. Create a `_data/glossary.yml` file, according to the 'Glossary Term Definition File' section below, with your terms.
|
|
51
52
|
1. Use the liquid tag in a page like `{% glossary term_name %}`
|
|
52
|
-
1. Add CSS styling for the tooltip from [jekyll-glossary_tooltip.css](lib/jekyll-glossary_tooltip/jekyll-glossary_tooltip.css). You need to make sure that the pages where you will use the glossary tag have this styling applied. Typically this would mean 1) copying this file to your `assets/css/` directory 2) editing your theme's template for blog posts (or what pages you desire) to include this CSS in the header like `<link rel="stylesheet" href="/assets/css/jekyll-glossary_tooltip.css">`. However you could also copy this file's content
|
|
53
|
-
1. Now just build your site and you will get nice nice term definition tooltips on mouse hover (or mobile, tap) for
|
|
53
|
+
1. Add CSS styling for the tooltip from [jekyll-glossary_tooltip.css](lib/jekyll-glossary_tooltip/jekyll-glossary_tooltip.css). You need to make sure that the pages where you will use the glossary tag have this styling applied. Typically, this would mean 1) copying this file to your `assets/css/` directory, 2) editing your theme's template for blog posts (or what pages you desire) to include this CSS in the header like `<link rel="stylesheet" href="/assets/css/jekyll-glossary_tooltip.css">`. However, you could also copy this file's content into your `main.css` or `main.scss` or however you build your site's CSS.
|
|
54
|
+
1. Now just build your site, and you will get nice, nice term definition tooltips on mouse hover (or mobile, tap) for your terms!
|
|
54
55
|
```shell
|
|
55
56
|
bundle exec jekyll build
|
|
56
57
|
```
|
|
@@ -70,15 +71,15 @@ Create a file `_data/glossary.yml` to host your shared term definition entries.
|
|
|
70
71
|
This could look something like:
|
|
71
72
|
```markdown
|
|
72
73
|
- term: Jekyll
|
|
73
|
-
definition: A Static Site Generator (SSG) built with
|
|
74
|
+
definition: A Static Site Generator (SSG) built with Ruby. Widely adopted as of GitHub Pages inclusion.
|
|
74
75
|
url: https://jekyllrb.com/
|
|
75
76
|
- term: SSG
|
|
76
|
-
definition: A Static Site Generator compiles the website before deployment. Then the generated web content is simply retrieved as-is by the client without any code running at
|
|
77
|
+
definition: A Static Site Generator compiles the website before deployment. Then the generated web content is simply retrieved as-is by the client without any code running at retrieval time.
|
|
77
78
|
- term: Jamstack
|
|
78
|
-
definition: JavaScript + API + Markup - a way of
|
|
79
|
+
definition: JavaScript + API + Markup - a way of building and hosting websites.
|
|
79
80
|
url: https://jamstack.org/
|
|
80
81
|
- term: EmbeddedLiquidURL
|
|
81
|
-
definition: This definition has
|
|
82
|
+
definition: This definition has a URL with embedded liquid tags to make it dynamic at build time. Note special YAML syntax for being able to use liquid (1.)
|
|
82
83
|
url: >
|
|
83
84
|
{{ site.baseurl }}{% link page2.md %}
|
|
84
85
|
```
|
|
@@ -87,19 +88,23 @@ This could look something like:
|
|
|
87
88
|
|
|
88
89
|
|
|
89
90
|
## Tag Usage
|
|
90
|
-
On any page where you've made sure include the needed CSS styling, you can use the glossary tag simply like
|
|
91
|
+
On any page where you've made sure to include the needed CSS styling, you can use the glossary tag simply like
|
|
91
92
|
|
|
92
93
|
```markdown
|
|
93
94
|
Here I'm talking about {% glossary term_name %} in a blog post.
|
|
94
95
|
|
|
95
96
|
The term name can contain spaces like {% glossary operating system %}.
|
|
96
97
|
|
|
97
|
-
Even if the term is defined in _data/glossary.yml as 'term_name', the matching is case-insensitive
|
|
98
|
+
Even if the term is defined in _data/glossary.yml as 'term_name', the matching is case-insensitive
|
|
99
|
+
meaning that I can look it up using {% glossary TeRM_NaME %}. Note that the term is displayed as
|
|
100
|
+
defined in the tag rather than the definition, here meaning 'TeRM_NaME'.
|
|
98
101
|
|
|
99
|
-
The case-styling above works as there's still a case-insensitive match. But what about when you
|
|
102
|
+
The case-styling above works as there's still a case-insensitive match. But what about when you
|
|
103
|
+
actually want to display the term differently? Maybe the term is defined as "cat," but you want to
|
|
104
|
+
use the plural "cats"? Then you can supply an optional `display` argument. The syntax is:
|
|
100
105
|
{% glossary <term>, display: <diplay name> %}
|
|
101
106
|
|
|
102
|
-
This could be e.g.
|
|
107
|
+
This could be, e.g.
|
|
103
108
|
{% glossary cat, display: cats %}
|
|
104
109
|
{% glossary some term, display: some other display text %}
|
|
105
110
|
```
|
|
@@ -113,7 +118,7 @@ Simply modify the rules [jekyll-glossary_tooltip.css](lib/jekyll-glossary_toolti
|
|
|
113
118
|
|
|
114
119
|
|
|
115
120
|
## Page listing all terms
|
|
116
|
-
Thanks to this user
|
|
121
|
+
Thanks to this user-submitted [idea](https://github.com/erikw/jekyll-glossary_tooltip/issues/6) we have a way to create a page listing all terms with definitions and URLs.
|
|
117
122
|
|
|
118
123
|
:point_right: **Live demo**: https://erikw.github.io/jekyll-glossary_tooltip/glossary.html
|
|
119
124
|
|
|
@@ -126,7 +131,7 @@ Steps:
|
|
|
126
131
|
The structure of this plugin was inspired by [https://ayastreb.me/writing-a-jekyll-plugin/](https://ayastreb.me/writing-a-jekyll-plugin/), the plugin jekyll-sitemap and the [Bundler Gem tutorial](https://bundler.io/guides/creating_gem.html).
|
|
127
132
|
|
|
128
133
|
After checking out the repo;
|
|
129
|
-
1. Install [RVM](https://rvm.io/rvm/install) and install a supported
|
|
134
|
+
1. Install [RVM](https://rvm.io/rvm/install) and install a supported Ruby version (see .gemspec)
|
|
130
135
|
1. run `scripts/setup` to install dependencies
|
|
131
136
|
1. run `scripts/test` to run the tests
|
|
132
137
|
* Run a specific test with `bundle exec rspec -e "name of test example"`
|
|
@@ -145,13 +150,13 @@ Following the setup at [how-to-specify-local-ruby-gems-in-your-gemfile](https://
|
|
|
145
150
|
1. Configure bundler to use a local path for this gem in this project:
|
|
146
151
|
- `$ bundle config --local local.jekyll-glossary_tooltip ~/src/jekyll-glossary_tooltip`
|
|
147
152
|
1. Update the project: `$ bundle install`
|
|
148
|
-
1. Now the project will build with the local clone of this plugin when issuing e.g
|
|
153
|
+
1. Now the project will build with the local clone of this plugin when issuing e.g., `bundle exec jekyll build`
|
|
149
154
|
1. When you're done:
|
|
150
155
|
- Remove the local override with: `$ bundle config --delete local.jekyll-glossary_tooltip`
|
|
151
|
-
- Optionally restore the original gem
|
|
156
|
+
- Optionally restore the original gem included in `Gemfile` or keep building from a branch in the GitHub repo.
|
|
152
157
|
|
|
153
158
|
## Releasing
|
|
154
|
-
Instructions for releasing on rubygems.org below. Optionally make a GitHub [release](https://github.com/erikw/jekyll-glossary_tooltip/releases) after this for the pushed git tag.
|
|
159
|
+
Instructions for releasing on rubygems.org are below. Optionally make a GitHub [release](https://github.com/erikw/jekyll-glossary_tooltip/releases) after this for the pushed git tag.
|
|
155
160
|
|
|
156
161
|
## Using bundler/gem_tasks rake tasks
|
|
157
162
|
Following instructions from [bundler.io](https://bundler.io/guides/creating_gem.html#releasing-the-gem):
|
|
@@ -166,16 +171,17 @@ gem install pkg/jekyll-glossary_tooltip-$ver.gem
|
|
|
166
171
|
bundle exec rake release
|
|
167
172
|
```
|
|
168
173
|
|
|
169
|
-
## Using gem-release gem extension
|
|
174
|
+
## [recommended] Using gem-release gem extension
|
|
170
175
|
Using [gem-release](https://github.com/svenfuchs/gem-release):
|
|
171
176
|
```shell
|
|
172
177
|
vi CHANGELOG.md && git add CHANGELOG.md && git commit -m "Update CHANGELOG.md" && git push
|
|
178
|
+
gem signin
|
|
173
179
|
gem bump --version minor --tag --push --release --sign
|
|
174
180
|
```
|
|
175
181
|
For `--version`, use `major|minor|patch` as needed.
|
|
176
182
|
|
|
177
183
|
## Multi-versions
|
|
178
|
-
* For
|
|
184
|
+
* For Ruby, just use RVM to switch between supported Ruby versions specified in `.gemspec`.
|
|
179
185
|
* To run with different jekyll versions, [Appraisal](https://github.com/thoughtbot/appraisal) is used with [`Appraisals`](Appraisals) to generate different [`gemfiles/`](gemfiles/)
|
|
180
186
|
- To use a specific Gemfile, run like
|
|
181
187
|
```shell
|
|
@@ -192,29 +198,6 @@ For `--version`, use `major|minor|patch` as needed.
|
|
|
192
198
|
bundle exec appraisal generate
|
|
193
199
|
```
|
|
194
200
|
|
|
195
|
-
## Travis
|
|
196
|
-
To use the [travis cli client](https://github.com/travis-ci/travis.rb) (installed from `Gemfile`):
|
|
197
|
-
1. Get a GitHub OAuth token by
|
|
198
|
-
- going to [github.com/settings/tokens](https://github.com/settings/tokens)
|
|
199
|
-
- create a new token named `travis-cli`
|
|
200
|
-
- Set the scopes `repo`, `read:org`, `user:email` according to the [docs](https://docs.travis-ci.com/user/github-oauth-scopes).
|
|
201
|
-
1. Set travis.com as the default so we don't need to add `--pro` to most commands
|
|
202
|
-
```shell
|
|
203
|
-
bundle exec travis endpoint --set-default --api-endpoint https://api.travis-ci.com/
|
|
204
|
-
```
|
|
205
|
-
1. Login with the cli client
|
|
206
|
-
```shell
|
|
207
|
-
bundle exec travis login --github-token $GITHUB_TOKEN
|
|
208
|
-
```
|
|
209
|
-
1. Now the cli client can be used (might need `--pro` to use travis.com)
|
|
210
|
-
```shell
|
|
211
|
-
bundle exec travis lint
|
|
212
|
-
bundle exec travis accounts
|
|
213
|
-
bundle exec travis status
|
|
214
|
-
bundle exec travis branches
|
|
215
|
-
bundle exec travis monitor
|
|
216
|
-
```
|
|
217
|
-
|
|
218
201
|
## Live Demo GitHub Pages
|
|
219
202
|
The live demo source is in the branch [`gh-pages-source`](https://github.com/erikw/jekyll-glossary_tooltip/tree/gh-pages-source). Check its `README.md`!
|
|
220
203
|
|
data/Rakefile
CHANGED
|
@@ -13,7 +13,14 @@ RSpec::Core::RakeTask.new(:spec)
|
|
|
13
13
|
require "rubocop/rake_task"
|
|
14
14
|
RuboCop::RakeTask.new(:rubocop) do |t|
|
|
15
15
|
# See https://docs.rubocop.org/rubocop/usage/basic_usage.html
|
|
16
|
-
t.options = [
|
|
16
|
+
t.options = ["--display-cop-names", "--parallel"]
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
desc "Run Qlty code analysis"
|
|
20
|
+
task :qlty do
|
|
21
|
+
sh "qlty smells --all"
|
|
22
|
+
sh "qlty metrics --all --max-depth=2 --sort complexity --limit 10"
|
|
23
|
+
# sh "qlty lint" # Just runs rubocop, not necessary as we have a task for this already
|
|
17
24
|
end
|
|
18
25
|
|
|
19
26
|
# default task: Add spec and rubocop to default tasks.
|
|
@@ -7,7 +7,7 @@ module Jekyll
|
|
|
7
7
|
# Stripped down & modified version of
|
|
8
8
|
# https://github.com/ayastreb/jekyll-maps/blob/master/lib/jekyll-maps/options_parser.rb
|
|
9
9
|
class OptionsParser
|
|
10
|
-
ARGS_PATTERN = %r{\s*(\
|
|
10
|
+
ARGS_PATTERN = %r{\s*([\p{L}_][-\p{L}_]*):\s*([\p{L}_][^,\n\r]*)}
|
|
11
11
|
ARGS_ALLOWED = %w[
|
|
12
12
|
display
|
|
13
13
|
].freeze
|
|
@@ -18,9 +18,7 @@ module Jekyll
|
|
|
18
18
|
html = <<~HTML
|
|
19
19
|
<span class="jekyll-glossary">
|
|
20
20
|
#{@opts[:display]}
|
|
21
|
-
<span class="jekyll-glossary-tooltip">
|
|
22
|
-
<span class="jekyll-glossary-tooltip-hidden">(</span>#{entry["definition"]}#{render_tooltip_url(entry, context)}<span class="jekyll-glossary-tooltip-hidden">)</span>
|
|
23
|
-
</span>
|
|
21
|
+
<span class="jekyll-glossary-tooltip"><span class="jekyll-glossary-tooltip-hidden">(</span>#{entry["definition"]}#{render_tooltip_url(entry, context)}<span class="jekyll-glossary-tooltip-hidden">)</span></span>
|
|
24
22
|
</span>
|
|
25
23
|
HTML
|
|
26
24
|
html.gsub("\n", "")
|
data/scripts/setup
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-glossary_tooltip
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Erik Westrup
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-
|
|
11
|
+
date: 2025-10-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: jekyll
|
|
@@ -47,13 +47,16 @@ files:
|
|
|
47
47
|
- ".editorconfig"
|
|
48
48
|
- ".github/dependabot.yml"
|
|
49
49
|
- ".github/workflows/cd.yml"
|
|
50
|
+
- ".github/workflows/ci.yml"
|
|
50
51
|
- ".github/workflows/codeql-analysis.yml"
|
|
51
52
|
- ".gitignore"
|
|
53
|
+
- ".qlty/.gitignore"
|
|
54
|
+
- ".qlty/configs/.shellcheckrc"
|
|
55
|
+
- ".qlty/qlty.toml"
|
|
52
56
|
- ".rspec"
|
|
53
57
|
- ".rubocop.yml"
|
|
54
58
|
- ".ruby-version"
|
|
55
59
|
- ".simplecov"
|
|
56
|
-
- ".travis.yml"
|
|
57
60
|
- Appraisals
|
|
58
61
|
- CHANGELOG.md
|
|
59
62
|
- CONTRIBUTING.md
|
|
@@ -88,7 +91,7 @@ metadata:
|
|
|
88
91
|
homepage_uri: https://github.com/erikw/jekyll-glossary_tooltip/
|
|
89
92
|
source_code_uri: https://github.com/erikw/jekyll-glossary_tooltip/
|
|
90
93
|
changelog_uri: https://github.com/erikw/jekyll-glossary_tooltip/blob/main/CHANGELOG.md
|
|
91
|
-
post_install_message:
|
|
94
|
+
post_install_message:
|
|
92
95
|
rdoc_options: []
|
|
93
96
|
require_paths:
|
|
94
97
|
- lib
|
|
@@ -106,8 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
106
109
|
- !ruby/object:Gem::Version
|
|
107
110
|
version: '0'
|
|
108
111
|
requirements: []
|
|
109
|
-
rubygems_version: 3.
|
|
110
|
-
signing_key:
|
|
112
|
+
rubygems_version: 3.3.3
|
|
113
|
+
signing_key:
|
|
111
114
|
specification_version: 4
|
|
112
115
|
summary: Jekyll plugin providing a glossary liquid tag that will show a tooltip of
|
|
113
116
|
a term definition in your site.
|
data/.travis.yml
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# NOTE run $(travis lint) after modyifing this file.
|
|
2
|
-
|
|
3
|
-
# Travis
|
|
4
|
-
# - build lifecycle: https://docs.travis-ci.com/user/job-lifecycle
|
|
5
|
-
# - config doc: https://config.travis-ci.com/
|
|
6
|
-
# - ruby defaults: https://docs.travis-ci.com/user/languages/ruby/
|
|
7
|
-
# Codeclimate setup: https://docs.codeclimate.com/docs/travis-ci-test-coverage
|
|
8
|
-
|
|
9
|
-
version: ~> 1.0
|
|
10
|
-
env:
|
|
11
|
-
global:
|
|
12
|
-
- CC_TEST_REPORTER_ID=8b8822cdaba8bb6c0a9d3f05bea9bc94dbf866ccdd1204913f5673b61caa61b1
|
|
13
|
-
language: ruby
|
|
14
|
-
dist: focal # TODO Remove this when solved: https://github.com/rvm/rvm/issues/5133
|
|
15
|
-
# Buid matrix (rvm x gemfile = 2x2) with one version from each supported major version in range defined in .gemspec for
|
|
16
|
-
rvm:
|
|
17
|
-
- 2.7.0
|
|
18
|
-
- 3.0.1
|
|
19
|
-
gemfile:
|
|
20
|
-
- gemfiles/jekyll_3.7.x.gemfile
|
|
21
|
-
- gemfiles/jekyll_4.x.x.gemfile
|
|
22
|
-
cache: bundler
|
|
23
|
-
before_install: gem install bundler -v 2.2.18
|
|
24
|
-
#install: bundle install # Default
|
|
25
|
-
before_script:
|
|
26
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
|
27
|
-
- chmod +x ./cc-test-reporter
|
|
28
|
-
- ./cc-test-reporter before-build
|
|
29
|
-
#script: bundle exec rake # Default
|
|
30
|
-
after_script:
|
|
31
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|