jekyll-shiki 0.1.0 → 0.1.1
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/README.md +16 -17
- data/lib/jekyll-shiki.rb +2 -4
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8497177fdb6ecfd49f90d3f911318f3222a237c692599b9c47c7e17427d880a
|
|
4
|
+
data.tar.gz: 57db7e764d5f6f40493babb1cd5493beec518f0a847b07840e7dda80fb914700
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a082dcba05993fc78aef2eeaf911a3f023dfaa61dea548fb2146721f70bb1dbb04a69b33969e661ede02bdbcf67279d390fce7db7d7d744484cbee484c94f080
|
|
7
|
+
data.tar.gz: 6f042cb0f7b057e2354c49cbb2c7b85a9cb325fda8022f593d586ae6e92ae7989628899653b8a672b53da89c24e7a75cfdeb8b8326f87c58c1fa90a4fa3812cb
|
data/README.md
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- markdownlint-disable MD033 -->
|
|
2
|
+
<!-- markdownlint-disable MD041 -->
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://susee.phothin.dev/logo/rubygems_logo.png" width="160" height="160" alt="rubygems" style="border-radius:50%" />
|
|
5
|
+
</p>
|
|
6
|
+
<h1 align="center">Jekyll::Shiki</h1>
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
## Overview
|
|
4
9
|
|
|
5
|
-
|
|
10
|
+
Jekyll plugin for [Shiki JS](https://shiki.style/)
|
|
6
11
|
|
|
7
|
-
|
|
12
|
+
> [!WARNING]
|
|
13
|
+
> The first build can take some time, depending on the number of code blocks, before the cache is generated. It also requires the path to the `shiki` code used on the Node.js side.
|
|
14
|
+
> This plugin was created for use with the `mmdocs` theme. Performance has not been thoroughly tested, and the documentation is not yet complete.
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
## Installation
|
|
10
17
|
|
|
11
18
|
Install the gem and add to the application's Gemfile by executing:
|
|
12
19
|
|
|
13
20
|
```bash
|
|
14
|
-
bundle add
|
|
21
|
+
bundle add jekyll-shiki
|
|
15
22
|
```
|
|
16
23
|
|
|
17
24
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
18
25
|
|
|
19
26
|
```bash
|
|
20
|
-
gem install
|
|
27
|
+
gem install jekyll-shiki
|
|
21
28
|
```
|
|
22
29
|
|
|
23
30
|
## Usage
|
|
24
31
|
|
|
25
|
-
TODO: Write usage instructions here
|
|
26
|
-
|
|
27
|
-
## Development
|
|
28
|
-
|
|
29
|
-
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.
|
|
30
|
-
|
|
31
|
-
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`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
32
|
-
|
|
33
32
|
## Contributing
|
|
34
33
|
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
|
34
|
+
Bug reports and pull requests are welcome on GitHub at <https://github.com/phothinmg/jekyll-shiki>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/phothinmg/jekyll-shiki/blob/master/CODE_OF_CONDUCT.md).
|
|
36
35
|
|
|
37
36
|
## License
|
|
38
37
|
|
|
@@ -40,4 +39,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
|
40
39
|
|
|
41
40
|
## Code of Conduct
|
|
42
41
|
|
|
43
|
-
Everyone interacting in the Jekyll::Shiki project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
|
42
|
+
Everyone interacting in the Jekyll::Shiki project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the [code of conduct](https://github.com/phothinmg/jekyll-shiki/blob/master/CODE_OF_CONDUCT.md).
|
data/lib/jekyll-shiki.rb
CHANGED
|
@@ -17,7 +17,7 @@ module Jekyll
|
|
|
17
17
|
shiki_config = site.config["shiki"]
|
|
18
18
|
raise "Shiki highlight failed: Shiki config not found in jekyll config" unless shiki_config
|
|
19
19
|
|
|
20
|
-
bundle_path = shiki_config["
|
|
20
|
+
bundle_path = shiki_config["file_path"]
|
|
21
21
|
raise "Shiki highlight failed: Required shiki bundle path." unless bundle_path
|
|
22
22
|
|
|
23
23
|
File.join(site.source, bundle_path)
|
|
@@ -67,9 +67,7 @@ module Jekyll
|
|
|
67
67
|
html_content.match?(/\A\s*(<!doctype\s+html|<html\b)/i)
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
-
def self.transform_html(html_content, site)
|
|
71
|
-
Jekyll.logger.info ""
|
|
72
|
-
Jekyll.logger.info "[jekyll-shiki] : Highlight with shiki will take time for first build"
|
|
70
|
+
def self.transform_html(html_content, site)
|
|
73
71
|
doc = if full_document?(html_content)
|
|
74
72
|
Nokogiri::HTML.parse(html_content)
|
|
75
73
|
else
|
data/lib/version.rb
CHANGED