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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -17
  3. data/lib/jekyll-shiki.rb +2 -4
  4. data/lib/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2f07a20e89e2fbbbda3fbf6d70bc9cfa218af8267e77f5f1db84ce33af33dd5
4
- data.tar.gz: 5677419d80f1d162ad84b36e56d570b9b000e566c7599bfa082a02ea19a58440
3
+ metadata.gz: e8497177fdb6ecfd49f90d3f911318f3222a237c692599b9c47c7e17427d880a
4
+ data.tar.gz: 57db7e764d5f6f40493babb1cd5493beec518f0a847b07840e7dda80fb914700
5
5
  SHA512:
6
- metadata.gz: f3935ddf6bbd692a45991eb8d4d67773df64c45e4adeb552ad251adbe922438edc800ed1d90efd5d795d07460cdbafec85450a806f2dd92dc8aaf81c14a39d02
7
- data.tar.gz: c12a5c2f1b15520b6f935efc5e21f9cd327eb208b5e2ac53bb45e7d99d7fe9df5f9547230b93c48a56f8cc3eb5b98cd9378a1cb9328d7c4b83e507f9a4735510
6
+ metadata.gz: a082dcba05993fc78aef2eeaf911a3f023dfaa61dea548fb2146721f70bb1dbb04a69b33969e661ede02bdbcf67279d390fce7db7d7d744484cbee484c94f080
7
+ data.tar.gz: 6f042cb0f7b057e2354c49cbb2c7b85a9cb325fda8022f593d586ae6e92ae7989628899653b8a672b53da89c24e7a75cfdeb8b8326f87c58c1fa90a4fa3812cb
data/README.md CHANGED
@@ -1,38 +1,37 @@
1
- # Jekyll::Shiki
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
- TODO: Delete this and the text below, and describe your gem
8
+ ## Overview
4
9
 
5
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/jekyll/shiki`. To experiment with that code, run `bin/console` for an interactive prompt.
10
+ Jekyll plugin for [Shiki JS](https://shiki.style/)
6
11
 
7
- ## Installation
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
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
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 UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
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 UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
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/[USERNAME]/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/[USERNAME]/jekyll-shiki/blob/master/CODE_OF_CONDUCT.md).
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/[USERNAME]/jekyll-shiki/blob/master/CODE_OF_CONDUCT.md).
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["bundle_path"]
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) # rubocop:disable Metrics/MethodLength
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module Shiki
5
- VERSION = "0.1.0"
5
+ VERSION = "0.1.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-shiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - phothinmg