yass 0.2.0 → 0.3.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 +4 -4
- data/README.md +7 -4
- data/lib/yass/cli/runner.rb +1 -1
- data/lib/yass/source.rb +2 -1
- data/lib/yass/version.rb +1 -1
- metadata +6 -4
- /data/site-template/site/{index.default.html.liquid → index.html.liquid} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2403483776bfafa63a1b62961f516a4419905c8392e4d76eb79fd48503bbd91
|
4
|
+
data.tar.gz: cc86724e2ae2474080e88f0e58aef30a8bb052875ffe8593d33a6db6c81bd89a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6d05f3567714a26ae05fc8b9ec8f9bf61eef897293e504b2745bb81e36c99470eff39f6a12be73081d4d27a1016ee32ebc73f7128cb8cb224735bf88bcccb07
|
7
|
+
data.tar.gz: '0814026244474ee279a5f8c45886bdeebece7da03d6c6523c798adaac2a3980ff038139f8603f388adac3cff061e7584598348e1f60ef4b2d1fa4b309bf298c4'
|
data/README.md
CHANGED
@@ -52,8 +52,6 @@ yass watch
|
|
52
52
|
|
53
53
|
Layouts live in `layouts/` and will be applied to files with matching names. The `content` variable contains the data to render in the layout.
|
54
54
|
|
55
|
-
*layouts/page.html.liquid*
|
56
|
-
|
57
55
|
```html
|
58
56
|
<!DOCTYPE html>
|
59
57
|
<html lang="en">
|
@@ -64,9 +62,14 @@ Layouts live in `layouts/` and will be applied to files with matching names. The
|
|
64
62
|
</html>
|
65
63
|
```
|
66
64
|
|
67
|
-
|
65
|
+
If the above layout is named *page.html.liquid*, it will match any file named `*.page.html*`. Examples:
|
66
|
+
|
67
|
+
* foo.page.html
|
68
|
+
* foo.page.html.*
|
69
|
+
* foo.page.md (because *.md* converts to *.html*)
|
70
|
+
* foo.page.md.*
|
68
71
|
|
69
|
-
|
72
|
+
The name of the layout (e.g. `page`) is removed from the final filename, resulting in `foo.html`.
|
70
73
|
|
71
74
|
## Templates
|
72
75
|
|
data/lib/yass/cli/runner.rb
CHANGED
@@ -39,7 +39,7 @@ module Yass
|
|
39
39
|
watcher = Filewatcher.new([config.src_dir, config.layout_dir, config.template_dir].map(&:to_s))
|
40
40
|
yield watcher if block_given?
|
41
41
|
watcher.watch do |changes|
|
42
|
-
files = changes.map { |f, _| Pathname.new(f).relative_path_from(config.root).to_s }
|
42
|
+
files = changes.map { |f, _| Pathname.new(f).relative_path_from(config.root).to_s }.reject { |f| Dir.exist? f }
|
43
43
|
config.stdout.puts "Building #{files.join ", "}"
|
44
44
|
config.clear_cache!
|
45
45
|
Yass::CLI::Runner.build(config, argv: argv)
|
data/lib/yass/source.rb
CHANGED
@@ -31,10 +31,11 @@ module Yass
|
|
31
31
|
return name, nil if exts.nil?
|
32
32
|
|
33
33
|
exts = exts.split(".").map { |x| EXT_CONVERSIONS[x] || x } - %w[liquid]
|
34
|
-
return "#{name}.#{exts
|
34
|
+
return "#{name}.#{exts[0]}", config.layout_cache["default.#{exts[0]}"] if exts.size == 1
|
35
35
|
|
36
36
|
layout = config.layout_cache["#{exts[-2..].join(".")}"]
|
37
37
|
exts.delete_at(-2) if layout
|
38
|
+
layout ||= config.layout_cache["default.#{exts[-1]}"]
|
38
39
|
|
39
40
|
return "#{name}.#{exts.join "."}", layout
|
40
41
|
end
|
data/lib/yass/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Hollinger
|
@@ -75,13 +75,15 @@ files:
|
|
75
75
|
- site-template/layouts/default.html.liquid
|
76
76
|
- site-template/site/assets/highlight-default.css
|
77
77
|
- site-template/site/assets/highlight.min.js
|
78
|
-
- site-template/site/index.
|
78
|
+
- site-template/site/index.html.liquid
|
79
79
|
- site-template/templates/css_links.liquid
|
80
80
|
- site-template/templates/js_scripts.liquid
|
81
|
-
homepage: https://github.com/jhollinger/yass
|
81
|
+
homepage: https://github.com/jhollinger/yass/
|
82
82
|
licenses:
|
83
83
|
- MIT
|
84
|
-
metadata:
|
84
|
+
metadata:
|
85
|
+
homepage_uri: https://github.com/jhollinger/yass/
|
86
|
+
source_code_uri: https://github.com/jhollinger/yass/
|
85
87
|
post_install_message:
|
86
88
|
rdoc_options: []
|
87
89
|
require_paths:
|
File without changes
|