jekyll-graphviz-dot 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +56 -17
- data/docs/.gitignore +5 -0
- data/docs/Gemfile +22 -0
- data/{Gemfile.lock → docs/Gemfile.lock} +9 -13
- data/docs/_config.yml +5 -0
- data/docs/_layouts/default.html +12 -0
- data/docs/graph.dot +28 -0
- data/docs/index.md +5 -0
- data/lib/jekyll-graphviz/version.rb +1 -1
- data/lib/jekyll/converters/graphviz.rb +4 -1
- metadata +9 -4
- data/CODE_OF_CONDUCT.md +0 -84
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5065ace291d856ceb70107ee7b23e7270d4ca1cc484c52961b8a4e939941965
|
4
|
+
data.tar.gz: 4fd2f4b39734cbfa890a765e41c70c66f52b399fcc390998211a7f9ded93bb9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcb6a12febb3178ad525b0466bef0cb8b4e2e67fbaef35732aca2b8bd887b154a03b5217ea52bfc887aa857ed95431b33b0f704cefbe6c7e470cf10b46591e50
|
7
|
+
data.tar.gz: e284146bd65db43ae5984b815546e3b59a7ab0ea2acbebac4da600c6dbbaceefb2b8300902383ea45d458181064afe695869daeafd2ffe572844cdc90d5cfe5a
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,39 +1,78 @@
|
|
1
1
|
# Jekyll::Graphviz
|
2
2
|
|
3
|
-
|
3
|
+
[![CI](https://github.com/DerekStride/jekyll-graphviz/actions/workflows/ci.yml/badge.svg)](https://github.com/DerekStride/jekyll-graphviz/actions/workflows/ci.yml) [![Deploy to GitHub Pages](https://github.com/DerekStride/jekyll-graphviz/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/DerekStride/jekyll-graphviz/actions/workflows/gh-pages.yml) [![Publish to rubygems](https://github.com/DerekStride/jekyll-graphviz/actions/workflows/publish-gem.yml/badge.svg)](https://github.com/DerekStride/jekyll-graphviz/actions/workflows/publish-gem.yml)
|
4
4
|
|
5
|
-
|
5
|
+
A GraphViz converter for Jekyll.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
Add this line to your
|
9
|
+
Add this line to your site's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
|
12
|
+
group :jekyll_plugins do
|
13
|
+
gem "jekyll-graphviz-dot"
|
14
|
+
end
|
13
15
|
```
|
14
16
|
|
15
|
-
And then
|
17
|
+
And then add this line to your site's `_config.yml`:
|
16
18
|
|
17
|
-
|
19
|
+
```yml
|
20
|
+
plugins:
|
21
|
+
- jekyll-graphviz
|
22
|
+
```
|
18
23
|
|
19
|
-
|
24
|
+
## Usage
|
20
25
|
|
21
|
-
|
26
|
+
In your Jekyll site, create a GraphViz files that start with the following lines:
|
22
27
|
|
23
|
-
|
28
|
+
```
|
29
|
+
---
|
30
|
+
---
|
31
|
+
```
|
24
32
|
|
25
|
-
TODO: Write usage instructions here
|
26
33
|
|
27
|
-
|
34
|
+
You need those three dashes in order for Jekyll to recognize it as "convertible". They won't be included in the content
|
35
|
+
passed to the GraphViz parser.
|
36
|
+
|
37
|
+
Below is an example file that generate the following image:
|
28
38
|
|
29
|
-
|
39
|
+
```dot
|
40
|
+
---
|
41
|
+
---
|
42
|
+
|
43
|
+
digraph X {
|
44
|
+
a -> b
|
45
|
+
}
|
46
|
+
```
|
30
47
|
|
31
|
-
|
48
|
+
![foo](https://user-images.githubusercontent.com/6456191/126874946-81e25b07-fceb-45eb-bef1-5a1d3e79fe37.jpg)
|
32
49
|
|
33
|
-
|
50
|
+
By default the images will be outputted as an `svg` to change to another [compatible
|
51
|
+
type](https://github.com/glejeune/Ruby-Graphviz/blob/c3be805fc5e62ea1326eb9bb3708a807d1178525/lib/graphviz/constants.rb#L47-L92)
|
52
|
+
use the `graphviz.format` option in your site's `_config.yml`.
|
34
53
|
|
35
|
-
|
54
|
+
```yml
|
55
|
+
graphviz:
|
56
|
+
format: jpg
|
57
|
+
```
|
58
|
+
|
59
|
+
### GraphViz
|
60
|
+
|
61
|
+
This plugin depends on [ruby-graphviz](https://github.com/glejeune/Ruby-Graphviz) which requires the GraphViz command
|
62
|
+
line tool to be installed locally. You can find [Installation Instructions Here](https://graphviz.org/download/).
|
63
|
+
|
64
|
+
### Github Pages
|
65
|
+
|
66
|
+
To use this plugin with Github pages you'll need to use
|
67
|
+
[limjh16/jekyll-action-ts](https://github.com/limjh16/jekyll-action-ts) to setup a custom Github Pages deploy pipeline
|
68
|
+
and install GraphViz with [ts-graphviz/setup-graphviz](https://github.com/ts-graphviz/setup-graphviz). Check out this
|
69
|
+
repo's [Github Actions
|
70
|
+
Workflow](https://github.com/DerekStride/jekyll-graphviz/blob/main/.github/workflows/gh-pages.yml) for an example.
|
71
|
+
|
72
|
+
There is an example jekyll site in the [`docs/`](https://github.com/DerekStride/jekyll-graphviz/tree/main/docs) folder
|
73
|
+
of this repo.
|
74
|
+
|
75
|
+
## Development
|
36
76
|
|
37
|
-
|
77
|
+
After checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests.
|
38
78
|
|
39
|
-
Everyone interacting in the Jekyll::Graphviz project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-graphviz/blob/main/CODE_OF_CONDUCT.md).
|
data/docs/.gitignore
ADDED
data/docs/Gemfile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
gem "jekyll", "~> 4.2.0"
|
4
|
+
|
5
|
+
group :jekyll_plugins do
|
6
|
+
gem "jekyll-graphviz-dot"
|
7
|
+
end
|
8
|
+
|
9
|
+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
|
10
|
+
# and associated library.
|
11
|
+
platforms :mingw, :x64_mingw, :mswin, :jruby do
|
12
|
+
gem "tzinfo", "~> 1.2"
|
13
|
+
gem "tzinfo-data"
|
14
|
+
end
|
15
|
+
|
16
|
+
# Performance-booster for watching directories on Windows
|
17
|
+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
|
18
|
+
|
19
|
+
group :development do
|
20
|
+
gem 'webrick'
|
21
|
+
gem 'pry-byebug'
|
22
|
+
end
|
@@ -1,9 +1,3 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
jekyll-graphviz-dot (0.1.0)
|
5
|
-
ruby-graphviz (~> 1.2)
|
6
|
-
|
7
1
|
GEM
|
8
2
|
remote: https://rubygems.org/
|
9
3
|
specs:
|
@@ -37,6 +31,8 @@ GEM
|
|
37
31
|
rouge (~> 3.0)
|
38
32
|
safe_yaml (~> 1.0)
|
39
33
|
terminal-table (~> 2.0)
|
34
|
+
jekyll-graphviz-dot (0.1.3)
|
35
|
+
ruby-graphviz (~> 1.2)
|
40
36
|
jekyll-sass-converter (2.1.0)
|
41
37
|
sassc (> 2.0.1, < 3.0)
|
42
38
|
jekyll-watch (2.2.1)
|
@@ -51,7 +47,6 @@ GEM
|
|
51
47
|
rb-inotify (~> 0.9, >= 0.9.10)
|
52
48
|
mercenary (0.4.0)
|
53
49
|
method_source (1.0.0)
|
54
|
-
minitest (5.14.4)
|
55
50
|
pathutil (0.16.2)
|
56
51
|
forwardable-extended (~> 2.6)
|
57
52
|
pry (0.13.1)
|
@@ -61,7 +56,6 @@ GEM
|
|
61
56
|
byebug (~> 11.0)
|
62
57
|
pry (~> 0.13.0)
|
63
58
|
public_suffix (4.0.6)
|
64
|
-
rake (13.0.6)
|
65
59
|
rb-fsevent (0.11.0)
|
66
60
|
rb-inotify (0.10.1)
|
67
61
|
ffi (~> 1.0)
|
@@ -75,18 +69,20 @@ GEM
|
|
75
69
|
terminal-table (2.0.0)
|
76
70
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
77
71
|
unicode-display_width (1.7.0)
|
72
|
+
webrick (1.7.0)
|
78
73
|
|
79
74
|
PLATFORMS
|
80
75
|
x86_64-darwin-20
|
81
76
|
x86_64-linux
|
82
77
|
|
83
78
|
DEPENDENCIES
|
84
|
-
|
85
|
-
jekyll
|
86
|
-
jekyll-graphviz-dot!
|
87
|
-
minitest
|
79
|
+
jekyll (~> 4.2.0)
|
80
|
+
jekyll-graphviz-dot
|
88
81
|
pry-byebug
|
89
|
-
|
82
|
+
tzinfo (~> 1.2)
|
83
|
+
tzinfo-data
|
84
|
+
wdm (~> 0.1.1)
|
85
|
+
webrick
|
90
86
|
|
91
87
|
BUNDLED WITH
|
92
88
|
2.2.22
|
data/docs/_config.yml
ADDED
data/docs/graph.dot
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
---
|
3
|
+
|
4
|
+
digraph treeSitterParse2 {
|
5
|
+
graph [fontsize=24, fontname = "roboto"]
|
6
|
+
edge [fontsize=24, fontname = "roboto"]
|
7
|
+
node [fontsize=24, fontname = "roboto"]
|
8
|
+
ranksep = 1
|
9
|
+
nodesep = .25
|
10
|
+
edge [style="setlinewidth(3)"]
|
11
|
+
|
12
|
+
subgraph cluster_1 {
|
13
|
+
color=black;
|
14
|
+
rankdir = "TB";
|
15
|
+
|
16
|
+
v1 [label="x"]
|
17
|
+
product [label="product"]
|
18
|
+
product -> v1
|
19
|
+
star [label="*"]
|
20
|
+
product -> star
|
21
|
+
v2 [label="y"]
|
22
|
+
product -> v2
|
23
|
+
}
|
24
|
+
|
25
|
+
|
26
|
+
plus [shape=box, label="+"]
|
27
|
+
v3 [shape=box, label="z"]
|
28
|
+
}
|
data/docs/index.md
ADDED
@@ -6,9 +6,12 @@ module Jekyll
|
|
6
6
|
safe true
|
7
7
|
priority :low
|
8
8
|
|
9
|
+
attr_accessor :cache
|
10
|
+
|
9
11
|
def setup
|
10
12
|
require 'ruby-graphviz'
|
11
13
|
@format = (@config.dig("graphviz", "format") || :svg).to_sym
|
14
|
+
@cache = {}
|
12
15
|
@setup = true
|
13
16
|
end
|
14
17
|
|
@@ -23,7 +26,7 @@ module Jekyll
|
|
23
26
|
|
24
27
|
def convert(content)
|
25
28
|
setup unless @setup
|
26
|
-
GraphViz.parse_string(content).output(@format => String)
|
29
|
+
@cache[content] ||= GraphViz.parse_string(content).output(@format => String)
|
27
30
|
end
|
28
31
|
end
|
29
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-graphviz-dot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- derekstride
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-graphviz
|
@@ -108,13 +108,18 @@ files:
|
|
108
108
|
- ".github/workflows/publish-gem.yml"
|
109
109
|
- ".gitignore"
|
110
110
|
- ".rubocop.yml"
|
111
|
-
- CODE_OF_CONDUCT.md
|
112
111
|
- Gemfile
|
113
|
-
- Gemfile.lock
|
114
112
|
- README.md
|
115
113
|
- Rakefile
|
116
114
|
- bin/console
|
117
115
|
- bin/setup
|
116
|
+
- docs/.gitignore
|
117
|
+
- docs/Gemfile
|
118
|
+
- docs/Gemfile.lock
|
119
|
+
- docs/_config.yml
|
120
|
+
- docs/_layouts/default.html
|
121
|
+
- docs/graph.dot
|
122
|
+
- docs/index.md
|
118
123
|
- jekyll-graphviz.gemspec
|
119
124
|
- lib/jekyll-graphviz.rb
|
120
125
|
- lib/jekyll-graphviz/version.rb
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
-
|
7
|
-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
-
|
9
|
-
## Our Standards
|
10
|
-
|
11
|
-
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
-
|
13
|
-
* Demonstrating empathy and kindness toward other people
|
14
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
-
* Giving and gracefully accepting constructive feedback
|
16
|
-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
-
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
-
|
19
|
-
Examples of unacceptable behavior include:
|
20
|
-
|
21
|
-
* The use of sexualized language or imagery, and sexual attention or
|
22
|
-
advances of any kind
|
23
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
-
* Public or private harassment
|
25
|
-
* Publishing others' private information, such as a physical or email
|
26
|
-
address, without their explicit permission
|
27
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
-
professional setting
|
29
|
-
|
30
|
-
## Enforcement Responsibilities
|
31
|
-
|
32
|
-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
-
|
34
|
-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
-
|
36
|
-
## Scope
|
37
|
-
|
38
|
-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
-
|
40
|
-
## Enforcement
|
41
|
-
|
42
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at djgstride@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
-
|
44
|
-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
-
|
46
|
-
## Enforcement Guidelines
|
47
|
-
|
48
|
-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
-
|
50
|
-
### 1. Correction
|
51
|
-
|
52
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
-
|
54
|
-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
-
|
56
|
-
### 2. Warning
|
57
|
-
|
58
|
-
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
-
|
60
|
-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
-
|
62
|
-
### 3. Temporary Ban
|
63
|
-
|
64
|
-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
-
|
66
|
-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
-
|
68
|
-
### 4. Permanent Ban
|
69
|
-
|
70
|
-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
-
|
72
|
-
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
-
|
74
|
-
## Attribution
|
75
|
-
|
76
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
-
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
-
|
79
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
-
|
81
|
-
[homepage]: https://www.contributor-covenant.org
|
82
|
-
|
83
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
-
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|