liquidoc 0.12.0 → 0.12.1.pre.rc1

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: a6d74a9496774cfbc632e3710395229511d743d659f02231590a81088cb8d5df
4
- data.tar.gz: 9f1c23073ea028aeba49e1f7cc2dd69b03db07eb797c62a9d79c617ed3138cf1
3
+ metadata.gz: f107b641cfd1830bbd0981ddfcd9fb70a26530e5ae2f5170fe0158a52fa6c127
4
+ data.tar.gz: 044732dfd60b6791b5f53b36800e9fb47d554ff310f3a47fd55fd272e0204560
5
5
  SHA512:
6
- metadata.gz: a999074ce1451b31b34090b06243af452f80b5b3d1073066af0ca99ec7dd6ecbd1184b0b76a8b9bf12642f1178003f9cd167c4c02c199ac37a5bb116714a1bcc
7
- data.tar.gz: 2d68508810718ce919494d244a70ad65198039a28bec78dc5152e62423f4ae17792d89ad7cd1341e6910af871388e2cc5778f962095551fdb50d5a5d563cac25
6
+ metadata.gz: e9081fed78ee715f97e142bc6533d70c023f7c251dc73b678e0e3b4210a9495abe64f2d4a64bb5dd1fa436594cece5c30f0dad5c3e8626a469564fbd91e8408d
7
+ data.tar.gz: c3fd2845f42e0bc41ef9aac90efaceca577fb699a57710e639092f9451a5d24befcd0e663a506a6ee9ffd48b45a2d69482cc038c875569ff5eda2ddf5d220e7f
@@ -112,13 +112,14 @@ MSG
112
112
 
113
113
  # Array of directories where includes are stored
114
114
  def tag_includes_dirs(context)
115
- # context[:includes_dirs]
116
- ['_templates','_templates/liquid','_templates/liquid/ops','theme/_includes','_theme/layouts']
115
+ context.stack do
116
+ context['includes_dirs']
117
+ end
117
118
  end
118
119
 
119
120
  # Traverse includes dirs, setting paths for includes
120
121
  def locate_include_file(context, file, safe)
121
- includes_dirs = ['_templates','_templates/liquid','_templates/liquid/ops','_templates/ops','theme/_includes','theme/_layouts']
122
+ includes_dirs = self.tag_includes_dirs(context)
122
123
  includes_dirs.each do |dir|
123
124
  path = File.join(dir.to_s, file.to_s)
124
125
  return path if File.exist?(path)
@@ -1,3 +1,3 @@
1
1
  module Liquidoc
2
- VERSION = "0.12.0"
2
+ VERSION = "0.12.1-rc1"
3
3
  end
data/lib/liquidoc.rb CHANGED
@@ -42,7 +42,7 @@ require 'sterile'
42
42
  @build_dir = @build_dir_def
43
43
  @configs_dir = @base_dir + '_configs'
44
44
  @templates_dir = @base_dir + '_templates/'
45
- @includes_dirs_def = ['.','_templates','_templates/liquid','_templates/liquid/ops','_templates/ops','theme/_includes','_theme/layouts']
45
+ @includes_dirs_def = ['_templates','_templates/liquid','_templates/liquid/ops','_templates/ops','theme/_includes','theme/_layouts']
46
46
  @includes_dirs = @includes_dirs_def
47
47
  @data_dir = @base_dir + '_data/'
48
48
  @data_files = nil
@@ -155,7 +155,8 @@ def iterate_build cfg
155
155
  build.add_data!(build.variables, "vars") if build.variables
156
156
  includes_dirs = @includes_dirs
157
157
  includes_dirs = build.includes_dirs if build.includes_dirs
158
- build.add_data!({:includes_dirs=>includes_dirs})
158
+ includes_dirs.unshift(File.dirname(build.template))
159
+ build.add_data!(includes_dirs: includes_dirs)
159
160
  liquify(build.data, build.template, build.output) # perform the liquify operation
160
161
  else # Prep & perform a direct conversion
161
162
  # Delete nested data and vars objects
@@ -1636,7 +1637,7 @@ command_parser = OptionParser.new do|opts|
1636
1637
  @template_file = @base_dir + n
1637
1638
  end
1638
1639
 
1639
- opts.on("--includes PATH[,PATH]", "Paths to directories where includes (partials) can be found." ) do |n|
1640
+ opts.on("--includes_dirs PATH[,PATH]", "Paths to directories where includes (partials) can be found. Overrides default directories." ) do |n|
1640
1641
  n = n.force_array
1641
1642
  # n.map { |p| @base_dir + p }
1642
1643
  @includes_dirs = @includes_dirs.concat n
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquidoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1.pre.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Dominick
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-07 00:00:00.000000000 Z
11
+ date: 2022-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -218,7 +218,7 @@ licenses:
218
218
  - MIT
219
219
  metadata:
220
220
  allowed_push_host: https://rubygems.org
221
- post_install_message:
221
+ post_install_message:
222
222
  rdoc_options: []
223
223
  require_paths:
224
224
  - lib
@@ -233,8 +233,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  - !ruby/object:Gem::Version
234
234
  version: 2.7.0
235
235
  requirements: []
236
- rubygems_version: 3.0.3
237
- signing_key:
236
+ rubygems_version: 3.1.2
237
+ signing_key:
238
238
  specification_version: 4
239
239
  summary: A highly configurable command-line tool for parsing data and content in common
240
240
  flat-file formats.