jekyll-no-matter 0.0.0.pre
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 +7 -0
- data/.gitignore +9 -0
- data/README.md +32 -0
- data/jekyll-no-matter.gemspec +30 -0
- data/lib/jekyll-no-matter.rb +37 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7ab2db4e9d2d9b8a739d317d26a86e91299383b5
|
4
|
+
data.tar.gz: 971d5fdfeacc32acbaed63a57bf90f6abd76c48c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3da2c622050df9f1ae1b73cf3ceb2f925584ef4a1dc9b0555b5f5220f8790bb210888e7ecce0eecf70afdaa98c9d865e364b63f3531622b71d5a42bef772847f
|
7
|
+
data.tar.gz: c2e4a8fae19686fbd3d20ba276cd28ca606fea73b1406859b852a89b11fe45636bced408a006e2cace4906b94c347ce1669e3e2cd76d7f465c280782872058ee
|
data/.gitignore
ADDED
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
jekyll-no-matter
|
2
|
+
================
|
3
|
+
|
4
|
+
this is a [jekyll](https://jekyllrb.com) plugin to allow files with certain
|
5
|
+
extensions to be converted even without front matter
|
6
|
+
|
7
|
+
### step 1
|
8
|
+
|
9
|
+
install the plug through one of the ways mentioned at
|
10
|
+
https://jekyllrb.com/docs/plugins/#installing-a-plugin
|
11
|
+
|
12
|
+
### step 2
|
13
|
+
|
14
|
+
add a `no_matter` array to your site's `_config.yml`
|
15
|
+
|
16
|
+
```yml
|
17
|
+
# sass and Markdown don't matter
|
18
|
+
no_matter:
|
19
|
+
- .sass
|
20
|
+
- .scss
|
21
|
+
- .md
|
22
|
+
```
|
23
|
+
|
24
|
+
### step 3
|
25
|
+
|
26
|
+
if you're using sass `@include` set the load paths in your site's `_config.yml`
|
27
|
+
|
28
|
+
```yml
|
29
|
+
sass:
|
30
|
+
load_paths:
|
31
|
+
- _sass
|
32
|
+
```
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
require File.join(File.dirname(__FILE__), "lib", "jekyll-no-matter")
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "jekyll-no-matter"
|
7
|
+
s.version = JekyllNoMatter::VERSION
|
8
|
+
s.authors = ["Taye Adeyemi"]
|
9
|
+
s.email = "dev@taye.me"
|
10
|
+
|
11
|
+
s.summary = "a jekyll plugin for writing less front matter"
|
12
|
+
s.description = <<-EOF
|
13
|
+
this plugin patches Jekyll::Reader so that it pretends that files with
|
14
|
+
endings specified in the `site.no_matter` array always have front matter
|
15
|
+
in them so that they may be converted or processed in some other way
|
16
|
+
EOF
|
17
|
+
|
18
|
+
s.files = [".gitignore", "README.md", "jekyll-no-matter.gemspec",
|
19
|
+
"lib/jekyll-no-matter.rb"]
|
20
|
+
s.homepage = "https://github.com/taye/jekyll-no-matter"
|
21
|
+
s.license = "WTFPL"
|
22
|
+
s.require_paths = ["lib"]
|
23
|
+
|
24
|
+
s.add_dependency "jekyll", "~> 3.3"
|
25
|
+
|
26
|
+
s.post_install_message = <<-EOF
|
27
|
+
you may need to set `site.sass.load_paths` if you're using sass
|
28
|
+
`@includes`"
|
29
|
+
EOF
|
30
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
2
|
+
# Version 2, December 2004
|
3
|
+
#
|
4
|
+
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
5
|
+
# TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
6
|
+
#
|
7
|
+
# 0. You just DO WHAT THE FUCK YOU WANT TO.
|
8
|
+
|
9
|
+
module JekyllNoMatter
|
10
|
+
VERSION = "0.0.0.pre"
|
11
|
+
end
|
12
|
+
|
13
|
+
module Jekyll
|
14
|
+
class Reader
|
15
|
+
# same as the original method except that files whose endings match any of those
|
16
|
+
# listed in `@site.config["no_matter"]` will be processed even without
|
17
|
+
# front matter
|
18
|
+
def read_directories(dir = "")
|
19
|
+
base = site.in_source_dir(dir)
|
20
|
+
|
21
|
+
dot = Dir.chdir(base) { filter_entries(Dir.entries("."), base) }
|
22
|
+
dot_dirs = dot.select { |file| File.directory?(@site.in_source_dir(base, file)) }
|
23
|
+
dot_files = (dot - dot_dirs)
|
24
|
+
dot_pages = dot_files.select do |file|
|
25
|
+
Utils.has_yaml_header?(@site.in_source_dir(base, file)) ||
|
26
|
+
# this is where the interesting is
|
27
|
+
(@site.config["no_matter"] || []).index { |ext| file.index(ext) == file.length - ext.length }
|
28
|
+
end
|
29
|
+
dot_static_files = dot_files - dot_pages
|
30
|
+
|
31
|
+
retrieve_posts(dir)
|
32
|
+
retrieve_dirs(base, dir, dot_dirs)
|
33
|
+
retrieve_pages(dir, dot_pages)
|
34
|
+
retrieve_static_files(dir, dot_static_files)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-no-matter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0.pre
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Taye Adeyemi
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-01-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.3'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.3'
|
27
|
+
description: |2
|
28
|
+
this plugin patches Jekyll::Reader so that it pretends that files with
|
29
|
+
endings specified in the `site.no_matter` array always have front matter
|
30
|
+
in them so that they may be converted or processed in some other way
|
31
|
+
email: dev@taye.me
|
32
|
+
executables: []
|
33
|
+
extensions: []
|
34
|
+
extra_rdoc_files: []
|
35
|
+
files:
|
36
|
+
- ".gitignore"
|
37
|
+
- README.md
|
38
|
+
- jekyll-no-matter.gemspec
|
39
|
+
- lib/jekyll-no-matter.rb
|
40
|
+
homepage: https://github.com/taye/jekyll-no-matter
|
41
|
+
licenses:
|
42
|
+
- WTFPL
|
43
|
+
metadata: {}
|
44
|
+
post_install_message: |2
|
45
|
+
you may need to set `site.sass.load_paths` if you're using sass
|
46
|
+
`@includes`"
|
47
|
+
rdoc_options: []
|
48
|
+
require_paths:
|
49
|
+
- lib
|
50
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ">"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: 1.3.1
|
60
|
+
requirements: []
|
61
|
+
rubyforge_project:
|
62
|
+
rubygems_version: 2.5.2
|
63
|
+
signing_key:
|
64
|
+
specification_version: 4
|
65
|
+
summary: a jekyll plugin for writing less front matter
|
66
|
+
test_files: []
|