jekyll-local-theme 0.3.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b17f900ebe6e165bf26992c5a0025ca26ef6e77c495f3dc692f539ce705e688e
4
- data.tar.gz: aefce4d6d44e19c7291157b0636a943a6e8aa1642a7e0c8171d27aad729a38cf
3
+ metadata.gz: 00fef92712fd20dc68176d7ed08c8c96946d042395b266518d2ff6f5404447a6
4
+ data.tar.gz: 68c8bc9195f6a3036acaa70bfa44385ce9717f791a3ea3065d33226bf67e7b13
5
5
  SHA512:
6
- metadata.gz: 9439ef36821e7f921cf335c8f9c2a30f46abe350b573a37e31c2acdeb1d49d0237624deee6c20693b04679eadbcd1145df3ea6fcf84eea5bfe653a7c4a0fae22
7
- data.tar.gz: f896cf76363d0aaffeb9603b214b67176b51fee3e6c90386dbb1feb2835aa4c2f0069e2116ebc7d94d52b0365a17b1ebb30d462f6d29fc9c0d6172062323428a
6
+ metadata.gz: 612620c55a760df07041cfb4fea45418f6ac042aada3cb9f1e9084b5824410f6006b35340c56cfea247d8d5290c3c02464384f896616f61d0e83e2d0051f2974
7
+ data.tar.gz: aa755030aa4b8b5a9bc0cd0ebfdae6e436b31ad49a66f775043ef52e5550b4aba3968e1381ea5671261aa37ed865bdba193fa88646fe24d896c99bf74c8edb4d
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 なつき
3
+ Copyright (c) 2024 なつき
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -6,19 +6,19 @@ module Jekyll
6
6
  module LocalTheme
7
7
  # The local {Theme} on file system.
8
8
  class Theme < Jekyll::Theme
9
- def initialize(name, root)
10
- gemspec = Gem::Util.glob_files_in_dir(::Bundler::Source::Path::DEFAULT_GLOB, root)
9
+ def initialize(root)
10
+ gemspec = Gem::Util.glob_files_in_dir(Bundler::Source::Path::DEFAULT_GLOB, root)
11
11
  .min_by { |p| -p.split(File::SEPARATOR).size }
12
12
 
13
13
  if gemspec
14
14
  @gemspec = Bundler.load_gemspec_uncached(gemspec)
15
- @gemspec.full_gem_path = Pathname.new(gemspec).dirname.to_s
15
+ @gemspec.full_gem_path = File.dirname(gemspec)
16
16
  else
17
- @gemspec = Gem::Specification.new
17
+ @gemspec = Gem::Specification.new(File.basename(root))
18
18
  @gemspec.full_gem_path = root
19
19
  end
20
20
 
21
- super(name)
21
+ super(@gemspec.name)
22
22
  end
23
23
  end
24
24
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module LocalTheme
5
- VERSION = '0.3.0'
5
+ VERSION = '1.0.0'
6
6
  end
7
7
  end
@@ -9,13 +9,14 @@ module Jekyll
9
9
  module_function
10
10
 
11
11
  def init(site)
12
- name = site.config['local_theme']
13
- return unless name
12
+ path = site.config['local_theme']
13
+ return unless path
14
14
 
15
- site.config['theme'] = name
16
- site.theme = Theme.new(name, Jekyll.sanitized_path(Jekyll.sanitized_path(site.source, '_themes'), name))
15
+ theme = Theme.new(Jekyll.sanitized_path(Jekyll.sanitized_path(site.source, '_themes'), path))
16
+ site.theme = theme
17
+ site.config['theme'] = theme.name
17
18
 
18
- Jekyll.logger.info 'Local theme:', site.theme.root
19
+ Jekyll.logger.info 'Local theme:', theme.root
19
20
 
20
21
  site.send(:configure_include_paths)
21
22
  site.plugin_manager.require_theme_deps
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-local-theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - なつき
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-15 00:00:00.000000000 Z
11
+ date: 2024-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -56,8 +56,8 @@ licenses:
56
56
  - MIT
57
57
  metadata:
58
58
  bug_tracker_uri: https://github.com/ntkme/jekyll-local-theme/issues
59
- documentation_uri: https://rubydoc.info/gems/jekyll-local-theme/0.3.0
60
- source_code_uri: https://github.com/ntkme/jekyll-local-theme/tree/v0.3.0
59
+ documentation_uri: https://rubydoc.info/gems/jekyll-local-theme/1.0.0
60
+ source_code_uri: https://github.com/ntkme/jekyll-local-theme/tree/v1.0.0
61
61
  funding_uri: https://github.com/sponsors/ntkme
62
62
  rubygems_mfa_required: 'true'
63
63
  post_install_message:
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  - !ruby/object:Gem::Version
76
76
  version: 3.2.0
77
77
  requirements: []
78
- rubygems_version: 3.5.6
78
+ rubygems_version: 3.5.9
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Jekyll plugin for building Jekyll sites with any local theme