Skip to content
Permalink
Browse files
Fix child page inclusion on publish build
When building the website the child page inclusions did not work due to
path confusion. This commit fixes it.

Reviewed by Duncan Godwin.
  • Loading branch information
rdowner committed Apr 20, 2016
1 parent d8eb137 commit d14f7864b0390cc339f414c549d166dee5b8a346
Showing 1 changed file with 3 additions and 2 deletions.
@@ -7,6 +7,7 @@
require 'rubygems'
require 'yaml'
require "kramdown"
require 'pathname'

module PageStructureUtils

@@ -105,7 +106,7 @@ def self.sortYAMLSectionPositions(yaml)
#
def self.parseChildYAMLFromParent(page)
# get the base directory of the current file
$baseFile = Dir.pwd+page['dir']
$baseFile = Dir.pwd+"/"+(Pathname(page['path']).dirname.to_s)
# list all of the files in that directory
$listings = Dir[$baseFile+"/*.md"]
$allPages = []
@@ -143,7 +144,7 @@ def self.parseChildYAMLFromParent(page)
#
def self.parseChildPagesFromParent(page)
# get the base directory of the current file
$baseFile = Dir.pwd+page['dir']
$baseFile = Dir.pwd+"/"+(Pathname(page['path']).dirname.to_s)
# list all of the files in that directory
$listings = Dir[$baseFile+"/*"]
# filter by the key pattern

0 comments on commit d14f786

Please sign in to comment.