Indicates whether the asset is located in the :locale, the :global, the :convention, or an :other_dir folder. This can be useful to sort assets in a comparitor by priority if there are assets of the same name.
Returns an array of resources leading to this resource.
Returns an array of all of the siblings of this page, taking into account their eligibility for display.
sort_order
.The returned array will be sorted by each item’s
sort_order
.
Returns the next sibling based on order, or nil
if
there is no next sibling.
Returns the previous sibling based on order, or nil
if there is no previous sibling.
Returns the quantity of pages in the current page’s
group, including this current page, i.e., the number
of brethren + 1
.
Returns the locale for the current resource, based on which language.lproj directory it’s in, or nil if it’s not in one.
Returns the navigation ID suitable for use in the
modern Help’s navigation.json
file. It is either a
topicId
or sectionId
, depending on whether the
resource is a topic, or a section metadata resource.
Returns the path as it should be used in the help book
navigation.json
file, i.e., relative to the
language.lproj
directory. Note that this is
incomplete for use in href
attributes, which require
this path to be accessed via a javascript value, e.g.,
#/hb_path
.
Returns a path to this resource via the main file index.html file that runs the entire helpbook. Useful for redirecting naked pages in the site to index file for proper display in a meta refresh tag. For example, ../../index.html?localePath=en.lproj#/topic-sample_group_number_one-page_one Note that in this case, the link must be relative, because the Apple Help Viewer doesn’t seem to work with book-absolute paths.
Indicates whether or not a resource is a section entry for a modern Apple HelpBook.
Indicates whether or not a page is “legitimate” in terms of automatic navigation, based in:
Returns an array of all of the children of this resource, taking into account their eligibility for display. Each child is legitimate if it:
The returned array will be sorted by each item’s
sort_order
.
Make page_group
available for each resource.
Useful for for assigning classes, and/or group
conditionals. The page group is the enclosing folder;
if it’s a content index.html alone in a folder, then
it’s the grandfather folder, in order to preserve
topics when carrot.html becomes carrot/index.html.
Make page_name
available for each resource. This is
the file’s base name after any renaming has occurred,
unless the file is a content index.html, in which
case the name is the name of the containing folder.
This ensures we keep the same name for cases such as
carrot.html or carrot/index.html.
Useful for assigning classes, etc.
Returns the page sequence amongst all of the brethren,
and can be used as a page number surrogate. The first
page is 1. Pages without a sort order will have a nil
page_sequence
.
Return the parent of the resource. This implementation corrects a bug in Middleman as of 4.1.7 wherein Middleman doesn’t return the parent if the the directory has been renamed for output.
Returns the page sort order or 0 if no page sort order was applied.
Pages without a sort order can still be linked to; they simply aren’t brethren or legitimate children, and so don’t participate in any of the automatic navigation features.
Returns the word frequency hash for the content of the resource.