middlemac 2.0.0 → 3.1.2
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 +5 -5
- data/.gitattributes +5 -0
- data/.gitignore +6 -0
- data/CHANGELOG.md +44 -10
- data/Gemfile +11 -1
- data/README.md +38 -6
- data/Rakefile +20 -4
- data/documentation_project/.gitignore +1 -1
- data/documentation_project/Contents/Info.plist.erb +5 -3
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/_data/globals.yml +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/_data/locale-list.json +318 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/_layouts/layout-apple-modern-aside.haml +19 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/_layouts/layout-apple-modern.haml +61 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/_layouts/layout-blank.haml +11 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/_layouts/layout-hpd.haml +14 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/_partials/_yard_middlemac_config.erb +366 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/_partials/_yard_middlemac_helpers.erb +897 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/_partials/_yard_middlemac_helpers_extended.erb +369 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets/partials/_yard_pagegroups_resources.erb → SharedGlobalAssets/_partials/_yard_middlemac_resources.erb} +342 -37
- data/documentation_project/Contents/Resources/{Base.lproj/assets/partials/_yard_targets_config.erb → SharedGlobalAssets/_partials/_yard_mmtargets_config.erb} +15 -110
- data/documentation_project/Contents/Resources/{Base.lproj/assets/partials/_yard_targets_helpers.erb → SharedGlobalAssets/_partials/_yard_mmtargets_helpers.erb} +4 -4
- data/documentation_project/Contents/Resources/{Base.lproj/assets/partials/_yard_targets_helpers_extended.erb → SharedGlobalAssets/_partials/_yard_mmtargets_helpers_extended.erb} +6 -2
- data/documentation_project/Contents/Resources/{Base.lproj/assets/partials/_yard_targets_instance.erb → SharedGlobalAssets/_partials/_yard_mmtargets_instance.erb} +1 -1
- data/documentation_project/Contents/Resources/{Base.lproj/assets/partials/_yard_targets_resources.erb → SharedGlobalAssets/_partials/_yard_mmtargets_resources.erb} +2 -2
- data/documentation_project/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-120x120.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-152x152.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-57x57.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-76x76.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-ipad.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-ipad_2x.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-iphone.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-iphone_2x.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/convention}/icon_256x256.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/convention}/icon_256x256@2x.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/convention}/icon_32x32.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/convention}/icon_32x32@2x.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/apple.css +3831 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/L0200_LeftArrow_2x.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/L0201_RightArrow_2x.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/arrow-blue.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/arrow.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/ask-siri.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-clear-search.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-close-2.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-close-learnmore.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-close.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-search-small.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-search.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc-rtl.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc-small-rtl.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc-small.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc-toggle-rtl.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc-toggle.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/changelanguage_icon2x.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/force-click.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-arrow-2.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-arrow.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-close.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-external-link-lg.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-external-link.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-pause.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-play.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-replay.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-warning-black.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-warning-eu.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-warning.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-120x120.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-152x152.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-57x57.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-76x76.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-ipad.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-ipad_2x.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-iphone.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-iphone_2x.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/movie-play_2x.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/nav-left.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/nav-paddle-left.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/nav-paddle-right.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/nav-right.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/search_image_large.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/tip.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/toc_blue_large.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/apple/css/img/toc_large.svg +1 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets/stylesheets/_github.scss → SharedGlobalAssets/css/middlemac/github.css.scss} +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/middlemac/middlemac.css.scss +129 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/middlemac/note.svg +19 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/middlemac/tip.svg +1 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/css/middlemac/warning.svg +19 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/fonts/_dummy.txt +1 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/all-sample.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/all-sample@2x.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/images}/free-icon_256x256.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/images}/free-icon_256x256@2x.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/images}/free-icon_32x32.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/images}/free-icon_32x32@2x.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/free-middlemac-logo-small.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/free-middlemac-logo-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/free-middlemac-logo.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/free-middlemac-logo@2x.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/middlemac-logo-small.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/middlemac-logo-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/middlemac-logo.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/middlemac-logo@2x.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/mm-targets/free-logo-small.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/mm-targets/free-logo-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/mm-targets/free-logo.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/mm-targets/free-logo@2x.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/mm-targets/pro-logo-small.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/mm-targets/pro-logo-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/mm-targets/pro-logo.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/mm-targets/pro-logo@2x.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/images}/pro-icon_256x256.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/images}/pro-icon_256x256@2x.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/images}/pro-icon_32x32.png +0 -0
- data/documentation_project/Contents/Resources/{shared → SharedGlobalAssets/images}/pro-icon_32x32@2x.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/pro-middlemac-logo-small.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/pro-middlemac-logo-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/pro-middlemac-logo.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/images/pro-middlemac-logo@2x.png +0 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/js/app.5.1.27.js +6295 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/js/middlemac-debug.js +20 -0
- data/documentation_project/Contents/Resources/SharedGlobalAssets/js/vendor.js +226 -0
- data/documentation_project/Contents/Resources/en.lproj/010_what_is_middlemac/index.html.md.erb +114 -0
- data/documentation_project/Contents/Resources/en.lproj/020_apple_help_features/index.html.md.erb +241 -0
- data/documentation_project/Contents/Resources/{Base.lproj/020_setup_tutorial/index.html.md.erb → en.lproj/030_get_started/010_set_up_middlemac.html.md.erb} +33 -37
- data/documentation_project/Contents/Resources/en.lproj/030_get_started/020_your_first_help_book.html.md.erb +374 -0
- data/documentation_project/Contents/Resources/en.lproj/030_get_started/030_serve_your_help_book.html.md.erb +97 -0
- data/documentation_project/Contents/Resources/en.lproj/030_get_started/040_build_your_help_book.html.md.erb +56 -0
- data/documentation_project/Contents/Resources/{Base.lproj/030_skills_refresher/10_markdown_skill.html.md.erb → en.lproj/030_get_started/050_about_markdown.html.md.erb} +12 -14
- data/documentation_project/Contents/Resources/{Base.lproj/030_skills_refresher/30_middleman_skill.html.md.erb → en.lproj/030_get_started/060_about_middleman.html.md.erb} +10 -14
- data/documentation_project/Contents/Resources/en.lproj/030_get_started/070_about_ruby.html.md.erb +194 -0
- data/documentation_project/Contents/Resources/en.lproj/030_get_started/aside_frontmatter.html.md.erb +64 -0
- data/documentation_project/Contents/Resources/en.lproj/030_get_started/index.html.md.erb +4 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/010_setup.html.md.erb +204 -0
- data/documentation_project/Contents/Resources/{Base.lproj/030_skills_refresher/60_filetypes_skill.html.md.erb → en.lproj/040_compose_project/020_filetypes.html.md.erb} +7 -11
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/030_directory_conventions.html.md.erb +206 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/040_groups.html.md.erb +96 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/050_targets_and_features.html.md.erb +220 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/060_frontmatter.html.md.erb +98 -0
- data/documentation_project/Contents/Resources/{Base.lproj/060_content/100_using_local_data.html.md.erb → en.lproj/040_compose_project/070_local_data.html.md.erb} +22 -9
- data/documentation_project/Contents/Resources/{Base.lproj/060_content/030_helpers.html.md.erb → en.lproj/040_compose_project/080_helpers/010_helpers.html.md.erb} +35 -69
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/080_helpers/020_markdown_links.html.md.erb +51 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/080_helpers/030_markdown_images.html.md.erb +52 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/080_helpers/index.html.md.erb +4 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/090_partials.html.md.erb +64 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/100_resources.html.md.erb +36 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/110_implement_features.html.md.erb +197 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/120_preview_build.html.md.erb +86 -0
- data/documentation_project/Contents/Resources/en.lproj/040_compose_project/index.html.md.erb +4 -0
- data/documentation_project/Contents/Resources/{Base.lproj/050_structure → en.lproj/040_compose_project}/not_free.html.md.erb +4 -11
- data/documentation_project/Contents/Resources/{Base.lproj/050_structure → en.lproj/040_compose_project}/not_pro.html.md.erb +4 -11
- data/documentation_project/Contents/Resources/en.lproj/100_reference/010_apple_help_books/010_dissect_help_book.html.md.erb +296 -0
- data/documentation_project/Contents/Resources/en.lproj/100_reference/010_apple_help_books/020_dissect_modern_help.html.md.erb +246 -0
- data/documentation_project/Contents/Resources/en.lproj/100_reference/010_apple_help_books/index.html.md.erb +4 -0
- data/documentation_project/Contents/Resources/en.lproj/100_reference/030_backwards_compatibility.html.md.erb +82 -0
- data/documentation_project/Contents/Resources/en.lproj/100_reference/040_directory_reference.html.md.erb +276 -0
- data/documentation_project/Contents/Resources/en.lproj/100_reference/050_xcode_integration.html.md.erb +165 -0
- data/documentation_project/Contents/Resources/{Base.lproj/100_reference/10_cli_ref.html.md.erb → en.lproj/100_reference/060_cli_ref.html.md.erb} +3 -29
- data/documentation_project/Contents/Resources/en.lproj/100_reference/080_frontmatter_reference.html.md.erb +111 -0
- data/documentation_project/Contents/Resources/en.lproj/100_reference/120_api_reference/070_config_ref.html.md.erb +31 -0
- data/documentation_project/Contents/Resources/en.lproj/100_reference/120_api_reference/090_helpers_ref.html.md.erb +20 -0
- data/documentation_project/Contents/Resources/{Base.lproj/100_reference/30_helpers_ext_ref.html.md.erb → en.lproj/100_reference/120_api_reference/091_helpers_ext_ref.html.md.erb} +3 -21
- data/documentation_project/Contents/Resources/{Base.lproj/100_reference/50_resource_ext_ref.html.md.erb → en.lproj/100_reference/120_api_reference/100_resource_ext_ref.html.md.erb} +3 -8
- data/documentation_project/Contents/Resources/en.lproj/100_reference/120_api_reference/index.html.md.erb +4 -0
- data/documentation_project/Contents/Resources/en.lproj/100_reference/index.html.md.erb +4 -0
- data/documentation_project/Contents/Resources/{Base.lproj → en.lproj}/110_acknowledgements/index.html.md.erb +5 -7
- data/documentation_project/Contents/Resources/en.lproj/ExactMatch.plist.erb +15 -0
- data/documentation_project/Contents/Resources/{Base.lproj → en.lproj}/InfoPlist.strings.erb +0 -0
- data/documentation_project/Contents/Resources/en.lproj/asides/aside_description.html.md.erb +21 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_books_folder_reference.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_books_project_membership.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_features_aside_example.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_features_chapter_heading.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_features_copyright_footer.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_features_landing_links.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_features_language_chooser.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_features_navigator.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_features_see_also.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_features_title_icons.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/apple_help_features_universal.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/get_started_init_contents.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/get_started_init_english.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/xcode_integration_config_sets.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/xcode_integration_plist_definitions.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/xcode_integration_target_dependencies.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/xcode_integration_target_template.png +0 -0
- data/documentation_project/Contents/Resources/en.lproj/assets/images/xcode_integration_tool_configuration.png +0 -0
- data/documentation_project/Contents/Resources/{Base.lproj → en.lproj}/index.html.md.erb +3 -13
- data/documentation_project/Contents/Resources/en.lproj/index_hpd.html.md.erb +4 -0
- data/documentation_project/Contents/Resources/en.lproj/locale-info.json.erb +16 -0
- data/documentation_project/Contents/Resources/en.lproj/navigation.json.erb +57 -0
- data/documentation_project/Contents/Resources/en.lproj/searchTree.json.erb +1 -0
- data/documentation_project/Contents/Resources/es.lproj/ExactMatch.plist.erb +15 -0
- data/{fixtures/middlemac_app/Contents/Resources/Base.lproj → documentation_project/Contents/Resources/es.lproj}/InfoPlist.strings.erb +0 -0
- data/documentation_project/Contents/Resources/es.lproj/index.html.md.erb +27 -0
- data/documentation_project/Contents/Resources/es.lproj/index_hpd.html.md.erb +4 -0
- data/documentation_project/Contents/Resources/es.lproj/locale-info.json.erb +16 -0
- data/documentation_project/Contents/Resources/es.lproj/navigation.json.erb +57 -0
- data/documentation_project/Contents/Resources/es.lproj/searchTree.json.erb +1 -0
- data/documentation_project/Contents/Resources/index.html.erb +118 -0
- data/documentation_project/Contents/Resources/locale-list.json.erb +14 -0
- data/documentation_project/Gemfile +4 -17
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/project.pbxproj +79 -101
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/xcshareddata/xcschemes/Help (free).xcscheme +11 -6
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/xcshareddata/xcschemes/Help (pro).xcscheme +80 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/xcshareddata/xcschemes/HelpViewerApp (free).xcscheme +1 -1
- data/documentation_project/HelpViewerApp/HelpViewerApp.xcodeproj/xcshareddata/xcschemes/HelpViewerApp (pro).xcscheme +1 -1
- data/documentation_project/HelpViewerApp/HelpViewerApp/AppDelegate.h +1 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp/AppDelegate.m +6 -0
- data/documentation_project/HelpViewerApp/HelpViewerApp/Base.lproj/MainMenu.xib +39 -10
- data/documentation_project/HelpViewerApp/HelpViewerApp/Info-free.plist +4 -4
- data/documentation_project/HelpViewerApp/HelpViewerApp/Info-pro.plist +4 -4
- data/documentation_project/HelpViewerApp/HelpViewerApp/versions.xcconfig +8 -0
- data/documentation_project/HelpViewerApp/README.md +6 -26
- data/documentation_project/{Middlemac (free).help → Middlemac_(free).help}/.gitignore +0 -0
- data/documentation_project/{Middlemac (pro).help → Middlemac_(pro).help}/.gitignore +0 -0
- data/documentation_project/config.rb +83 -100
- data/documentation_project/makefile +93 -0
- data/documentation_project/middlemac.webloc +0 -0
- data/ext/trie/darray.c +673 -0
- data/ext/trie/darray.h +233 -0
- data/ext/trie/extconf.rb +23 -0
- data/ext/trie/fileutils.c +151 -0
- data/ext/trie/fileutils.h +36 -0
- data/ext/trie/tail.c +340 -0
- data/ext/trie/tail.h +207 -0
- data/ext/trie/trie-private.c +299 -0
- data/ext/trie/trie-private.h +31 -0
- data/ext/trie/trie.c +628 -0
- data/ext/trie/trie.h +40 -0
- data/ext/trie/triedefs.h +73 -0
- data/ext/trie/typedefs.h +117 -0
- data/features/helpers_features.feature +58 -0
- data/features/main_features.feature +23 -19
- data/features/support/env.rb +0 -14
- data/fixtures/middlemac_app/.gitignore +0 -1
- data/fixtures/middlemac_app/Contents/Info.plist.erb +5 -3
- data/fixtures/middlemac_app/Contents/Resources/{Base.lproj/assets → SharedGlobalAssets}/_data/globals.yml +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/_data/locale-list.json +318 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/_layouts/layout-apple-modern-aside.haml +19 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/_layouts/layout-apple-modern.haml +61 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/_layouts/layout-blank.haml +11 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/_layouts/layout-hpd.haml +14 -0
- data/fixtures/middlemac_app/Contents/Resources/{Base.lproj/assets/partials → SharedGlobalAssets/_partials}/_partials_dir_partial.erb +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-120x120.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-152x152.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-57x57.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-76x76.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-ipad.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-ipad_2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-iphone.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/convention/icon-webclip-iphone_2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/{shared → SharedGlobalAssets/convention}/icon_256x256.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/{shared → SharedGlobalAssets/convention}/icon_256x256@2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/{shared → SharedGlobalAssets/convention}/icon_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/{shared → SharedGlobalAssets/convention}/icon_32x32@2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/apple.css +3831 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/L0200_LeftArrow_2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/L0201_RightArrow_2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/arrow-blue.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/arrow.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/ask-siri.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-clear-search.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-close-2.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-close-learnmore.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-close.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-search-small.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-search.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc-rtl.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc-small-rtl.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc-small.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc-toggle-rtl.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc-toggle.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/button-toc.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/changelanguage_icon2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/force-click.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-arrow-2.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-arrow.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-close.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-external-link-lg.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-external-link.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-pause.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-play.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-replay.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-warning-black.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-warning-eu.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-warning.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-120x120.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-152x152.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-57x57.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-76x76.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-ipad.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-ipad_2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-iphone.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/icon-webclip-iphone_2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/movie-play_2x.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/nav-left.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/nav-paddle-left.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/nav-paddle-right.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/nav-right.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/search_image_large.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/tip.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/toc_blue_large.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/apple/css/img/toc_large.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/{Base.lproj/assets/stylesheets/_github.scss → SharedGlobalAssets/css/middlemac/github.css.scss} +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/middlemac/middlemac.css.scss +129 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/middlemac/note.svg +19 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/middlemac/tip.svg +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/css/middlemac/warning.svg +19 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/fonts/_dummy.txt +1 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/images/global_thing_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/js/app.5.1.27.js +6295 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/js/middlemac-debug.js +20 -0
- data/fixtures/middlemac_app/Contents/Resources/SharedGlobalAssets/js/vendor.js +226 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/10_hello_world_file.html.md.erb +17 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/30_sample_group_number_one/index.html.md.erb +8 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/30_sample_group_number_one/page_one.html.md.erb +108 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/30_sample_group_number_one/page_two.html.md.erb +36 -0
- data/fixtures/middlemac_app/Contents/Resources/{Base.lproj → en.lproj}/40_sample_group_number_two/01_nested_group_example/01_page_one.html.md.erb +0 -5
- data/fixtures/middlemac_app/Contents/Resources/{Base.lproj → en.lproj}/40_sample_group_number_two/01_nested_group_example/02_pagina_dos.html.md.erb +0 -5
- data/fixtures/middlemac_app/Contents/Resources/{Base.lproj → en.lproj}/40_sample_group_number_two/01_nested_group_example/03_page_san.html.md.erb +0 -5
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/40_sample_group_number_two/01_nested_group_example/index.html.md.erb +4 -0
- data/fixtures/middlemac_app/Contents/Resources/{Base.lproj → en.lproj}/40_sample_group_number_two/02_page_two.html.md.erb +0 -5
- data/fixtures/middlemac_app/Contents/Resources/{Base.lproj → en.lproj}/40_sample_group_number_two/03_page_three.html.md.erb +0 -5
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/40_sample_group_number_two/index.html.md.erb +4 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/50_testing_world_file.html.md.erb +58 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/60_goodbye_world_file.html.md.erb +203 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/ExactMatch.plist.erb +15 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/InfoPlist.strings.erb +10 -0
- data/fixtures/middlemac_app/Contents/Resources/{Base.lproj → en.lproj}/_new_style_partial.erb +0 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/asides/aside_description.html.md.erb +20 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/assets/_partials/_localized_partials_dir_partial.erb +1 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/assets/images/all-graphic_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/assets/images/neat_thing_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/assets/images/subdirectory/logo_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/assets/images/subdirectory/pro-image_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/copyright.html.md.erb +19 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/index.html.md.erb +20 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/index_hpd.html.md.erb +4 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/locale-info.json.erb +16 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/navigation.json.erb +57 -0
- data/fixtures/middlemac_app/Contents/Resources/en.lproj/searchTree.json.erb +1 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/10_hola_mundo_file.html.md.erb +15 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/60_goodbye_world_file.html.md.erb +193 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/ExactMatch.plist.erb +15 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/InfoPlist.strings.erb +10 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/assets/images/all-graphic_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/assets/images/neat_thing_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/assets/images/subdirectory/logo_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/assets/images/subdirectory/pro-image_32x32.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/copyright.html.md.erb +19 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/index.html.md.erb +21 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/index_hpd.html.md.erb +4 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/locale-info.json.erb +16 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/navigation.json.erb +57 -0
- data/fixtures/middlemac_app/Contents/Resources/es.lproj/searchTree.json.erb +1 -0
- data/fixtures/middlemac_app/Contents/Resources/index.html.erb +118 -0
- data/fixtures/middlemac_app/Contents/Resources/locale-list.json.erb +14 -0
- data/fixtures/middlemac_app/Gemfile +4 -17
- data/fixtures/middlemac_app/config.rb +82 -99
- data/fixtures/middlemac_app/makefile +93 -0
- data/fixtures/middlemac_app/middlemac.webloc +0 -0
- data/lib/middlemac.rb +4 -0
- data/lib/middlemac/extension.rb +152 -211
- data/lib/middlemac/helpers.rb +470 -0
- data/lib/middlemac/private.rb +497 -0
- data/lib/middlemac/sitemap.rb +516 -0
- data/lib/middlemac/trie-extension.rb +37 -0
- data/lib/middlemac/version.rb +1 -1
- data/middlemac.gemspec +25 -6
- data/resources/stopwords/ar.plist +206 -0
- data/resources/stopwords/ca.plist +0 -0
- data/resources/stopwords/cs.plist +30 -0
- data/resources/stopwords/da.plist +6 -0
- data/resources/stopwords/de.plist +119 -0
- data/resources/stopwords/el.plist +0 -0
- data/resources/stopwords/en.plist +0 -0
- data/resources/stopwords/es.plist +282 -0
- data/resources/stopwords/es_419.plist +282 -0
- data/resources/stopwords/fi.plist +206 -0
- data/resources/stopwords/fr.plist +132 -0
- data/resources/stopwords/he.plist +0 -0
- data/resources/stopwords/hr.plist +0 -0
- data/resources/stopwords/hu.plist +44 -0
- data/resources/stopwords/id.plist +6 -0
- data/resources/stopwords/it.plist +153 -0
- data/resources/stopwords/ja.plist +6 -0
- data/resources/stopwords/ko.plist +106 -0
- data/resources/stopwords/ms.plist +6 -0
- data/resources/stopwords/nl.plist +198 -0
- data/resources/stopwords/no.plist +207 -0
- data/resources/stopwords/pl.plist +207 -0
- data/resources/stopwords/pt.plist +207 -0
- data/resources/stopwords/pt_PT.plist +207 -0
- data/resources/stopwords/ro.plist +0 -0
- data/resources/stopwords/ru.plist +207 -0
- data/resources/stopwords/sk.plist +0 -0
- data/resources/stopwords/sv.plist +280 -0
- data/resources/stopwords/th.plist +56 -0
- data/resources/stopwords/tr.plist +200 -0
- data/resources/stopwords/uk.plist +764 -0
- data/resources/stopwords/vi.plist +6 -0
- data/resources/stopwords/zh_CN.plist +207 -0
- data/resources/stopwords/zh_TW.plist +207 -0
- data/yard/readme.md +4 -4
- metadata +423 -225
- data/documentation_project/Contents/Resources/Base.lproj/010_what_is_middlemac/index.html.md.erb +0 -126
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/20_frontmatter_skill.html.md.erb +0 -54
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/40_ruby_skill.html.md.erb +0 -67
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/50_ruby_ecosystem.html.md.erb +0 -136
- data/documentation_project/Contents/Resources/Base.lproj/030_skills_refresher/index.html.md.erb +0 -35
- data/documentation_project/Contents/Resources/Base.lproj/040_setup/index.html.md.erb +0 -88
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/010_directories_and_images.html.md.erb +0 -176
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/020_layouts_and_templates.html.md.erb +0 -71
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/025_css.html.md.erb +0 -71
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/030_groups.html.md.erb +0 -83
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/040_breadcrumbs.html.md.erb +0 -43
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/050_navigator.html.md.erb +0 -26
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/060_targets.html.md.erb +0 -63
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/070_features.html.md.erb +0 -122
- data/documentation_project/Contents/Resources/Base.lproj/050_structure/index.html.md.erb +0 -21
- data/documentation_project/Contents/Resources/Base.lproj/060_content/010_frontmatter.html.md.erb +0 -88
- data/documentation_project/Contents/Resources/Base.lproj/060_content/040_partials.html.md.erb +0 -121
- data/documentation_project/Contents/Resources/Base.lproj/060_content/050_resources.html.md.erb +0 -60
- data/documentation_project/Contents/Resources/Base.lproj/060_content/070_including_excluding.html.md.erb +0 -68
- data/documentation_project/Contents/Resources/Base.lproj/060_content/080_markdown_links_images.html.md.erb +0 -93
- data/documentation_project/Contents/Resources/Base.lproj/060_content/090_css_image_sizes.html.md.erb +0 -90
- data/documentation_project/Contents/Resources/Base.lproj/060_content/index.html.md.erb +0 -21
- data/documentation_project/Contents/Resources/Base.lproj/070_preview_build/index.html.md.erb +0 -78
- data/documentation_project/Contents/Resources/Base.lproj/090_build_application/10_apple_help_setup.html.md.erb +0 -110
- data/documentation_project/Contents/Resources/Base.lproj/090_build_application/20_xcode_integration.html.md.erb +0 -64
- data/documentation_project/Contents/Resources/Base.lproj/090_build_application/index.html.md.erb +0 -25
- data/documentation_project/Contents/Resources/Base.lproj/100_reference/20_config_ref.html.md.erb +0 -56
- data/documentation_project/Contents/Resources/Base.lproj/100_reference/40_helpers_ref.html.md.erb +0 -45
- data/documentation_project/Contents/Resources/Base.lproj/100_reference/index.html.md.erb +0 -26
- data/documentation_project/Contents/Resources/Base.lproj/120_backwards_compatibility/index.html.md.erb +0 -88
- data/documentation_project/Contents/Resources/Base.lproj/130_all_help_content/index.html.md.erb +0 -15
- data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/layout-html4.haml +0 -22
- data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/layout-xhtml.haml +0 -28
- data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/template-logo-large.haml +0 -30
- data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/template-logo-medium.haml +0 -30
- data/documentation_project/Contents/Resources/Base.lproj/assets/_layouts/template-logo-small.haml +0 -30
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/FontAwesome.otf +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.svg +0 -655
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/middlemac-extras@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras-small@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-extras/sub_images/middlemac-extras@2x.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-pagegroups/middleman-pagegroups-small.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/images/mm-pagegroups/middleman-pagegroups.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/javascripts/all.js +0 -1
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs.haml +0 -11
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs_alt.haml +0 -15
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_brethren.haml +0 -18
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_brethren_index.haml +0 -14
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_legitimate_children.haml +0 -16
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_prev_next.haml +0 -21
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_nav_toc_index.haml +0 -21
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_extras_config.erb +0 -200
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_extras_helpers.erb +0 -146
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_extras_helpers_extended.erb +0 -135
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_middlemac_config.erb +0 -207
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_middlemac_helpers.erb +0 -297
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_middlemac_helpers_extended.erb +0 -96
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_config.erb +0 -744
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_helpers.erb +0 -710
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_helpers_css.erb +0 -523
- data/documentation_project/Contents/Resources/Base.lproj/assets/partials/_yard_pagegroups_helpers_extended.erb +0 -56
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/_apple_helpbook.scss +0 -946
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/_normalize.scss +0 -374
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/breadcrumb-separator-light.png +0 -0
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/image_sizes.css.erb +0 -8
- data/documentation_project/Contents/Resources/Base.lproj/assets/stylesheets/style.css.scss +0 -4
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/10_hello_world_file.html.md.erb +0 -22
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/20_goodbye_world_file.html.md.erb +0 -22
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/30_sample_group_number_one/index.html.md.erb +0 -24
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/30_sample_group_number_one/page_one.html.md.erb +0 -20
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/30_sample_group_number_one/page_two.html.md.erb +0 -19
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/01_nested_group_example/index.html.md.erb +0 -18
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/40_sample_group_number_two/index.html.md.erb +0 -24
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/45_testing_world_file.html.md.erb +0 -55
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/50_entire_world_file.html.md.erb +0 -15
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/layout-html4.haml +0 -22
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/layout-xhtml.haml +0 -28
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/template-logo-large.haml +0 -30
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/template-logo-medium.haml +0 -30
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/_layouts/template-logo-small.haml +0 -30
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/FontAwesome.otf +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.svg +0 -655
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/images/_empty_directory.html.md.erb +0 -1
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/javascripts/all.js +0 -1
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs.haml +0 -11
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_breadcrumbs_alt.haml +0 -15
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_brethren.haml +0 -18
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_brethren_index.haml +0 -14
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_legitimate_children.haml +0 -16
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_prev_next.haml +0 -21
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/partials/_nav_toc_index.haml +0 -21
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/_apple_helpbook.scss +0 -946
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/_normalize.scss +0 -374
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/breadcrumb-separator-light.png +0 -0
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/image_sizes.css.erb +0 -8
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/assets/stylesheets/style.css.scss +0 -4
- data/fixtures/middlemac_app/Contents/Resources/Base.lproj/index.html.md.erb +0 -17
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[
|
|
2
|
+
<% locales = data[:'locale-list'].select { |locale| hb_locale_list.include?(locale[:folder]) } %>
|
|
3
|
+
<% locales.each do |locale| %>
|
|
4
|
+
{
|
|
5
|
+
"text-direction": "<%= locale[:'text-direction'] %>",
|
|
6
|
+
"name": "<%= locale[:name] %>",
|
|
7
|
+
"isoName": "<%= locale[:isoName] %>",
|
|
8
|
+
"isoCodes": [
|
|
9
|
+
<%= locale[:isoCodes].map { |e| "\"#{e}\"" }.join(",\n ") %>
|
|
10
|
+
],
|
|
11
|
+
"folder": "<%= locale[:folder] %>"
|
|
12
|
+
}<%= ',' unless locale.equal?(locales.last) %>
|
|
13
|
+
<% end %>
|
|
14
|
+
]
|
|
@@ -17,35 +17,22 @@ source 'https://rubygems.org'
|
|
|
17
17
|
#######################################
|
|
18
18
|
# Middlemac, natch.
|
|
19
19
|
#######################################
|
|
20
|
-
gem 'middlemac', '~>
|
|
21
|
-
gem '
|
|
22
|
-
gem 'middleman-targets', '~> 1.0.7'
|
|
23
|
-
gem 'middleman-pagegroups', '~> 1.0.4'
|
|
20
|
+
gem 'middlemac', '~> 3.1.2'
|
|
21
|
+
gem 'middleman-targets', '~> 1.0.12'
|
|
24
22
|
|
|
25
23
|
|
|
26
24
|
#######################################
|
|
27
25
|
# Core gems
|
|
28
26
|
#######################################
|
|
29
|
-
gem 'middleman', '~> 4.
|
|
27
|
+
gem 'middleman', '~> 4.3.7'
|
|
30
28
|
gem 'middleman-core'
|
|
31
29
|
gem 'middleman-cli'
|
|
32
30
|
gem 'middleman-livereload' # Live-reloading plugin
|
|
33
31
|
gem 'middleman-syntax' # Syntax Highlighting
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
#######################################
|
|
37
|
-
# Style and fonts
|
|
38
|
-
#######################################
|
|
39
32
|
gem 'middleman-compass'
|
|
40
|
-
gem 'font-awesome-sass'
|
|
41
33
|
|
|
42
34
|
|
|
43
35
|
#######################################
|
|
44
|
-
#
|
|
45
|
-
#######################################
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
#######################################
|
|
49
|
-
# Core gems
|
|
36
|
+
# Other gems
|
|
50
37
|
#######################################
|
|
51
38
|
gem 'tzinfo-data', platforms: [:mswin, :mingw] # Time zone data for Windows
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
################################################################################
|
|
2
2
|
# config.rb
|
|
3
|
-
# Configure Middleman to generate Apple
|
|
3
|
+
# Configure Middleman to generate Apple Help Book containers for multiple
|
|
4
4
|
# targets.
|
|
5
5
|
################################################################################
|
|
6
6
|
|
|
7
|
+
##########################################################################
|
|
8
|
+
# Build System Integration
|
|
9
|
+
# If built from Xcode (or another build system you create), then setup
|
|
10
|
+
# some of our variables automatically from the environment variables
|
|
11
|
+
# that the build system sets for us. You’ll have to set up Xcode to
|
|
12
|
+
# set this environment variable, of course.
|
|
13
|
+
##########################################################################
|
|
14
|
+
version_app = ENV.has_key?('MIDDLEMAC_CFBundleShortVersionString') ? ENV['MIDDLEMAC_CFBundleShortVersionString'] : nil
|
|
15
|
+
|
|
16
|
+
|
|
7
17
|
##########################################################################
|
|
8
18
|
# Targets Configuration
|
|
9
19
|
# Middlemac is capable of building multiple targets for variants of your
|
|
@@ -39,13 +49,14 @@ config[:target] = :pro
|
|
|
39
49
|
# :HPDBookIconPath
|
|
40
50
|
# If specified a target-specific icon will be used as the help book icon by
|
|
41
51
|
# Apple’s help viewer. This path must be relative to the location of the
|
|
42
|
-
# `Resources` directory per Apple’s specification. If `nil` (or not present)
|
|
43
|
-
# then the default `
|
|
52
|
+
# `Resources` directory per Apple’s specification. If `nil` (or not present)
|
|
53
|
+
# then the default `SharedGlobalAssets/convention/icon_32x32@2x.png` will be
|
|
54
|
+
# used.
|
|
44
55
|
|
|
45
56
|
# :CFBundleName
|
|
46
57
|
# This value will be used for correct .plists and .strings setup, and will
|
|
47
58
|
# determine final .help directory name. All targets should use the same
|
|
48
|
-
# :CFBundleName. Built targets will be named `
|
|
59
|
+
# :CFBundleName. Built targets will be named `CFBundleName_(target).help`.
|
|
49
60
|
# This is *not* intended to be a product name, which is defined below.
|
|
50
61
|
|
|
51
62
|
# :ProductName
|
|
@@ -61,6 +72,10 @@ config[:target] = :pro
|
|
|
61
72
|
# You can specify different product URIs for each build target. The URI
|
|
62
73
|
# for the current target will be available via the `product_uri` helper.
|
|
63
74
|
|
|
75
|
+
# :ProductCopyright
|
|
76
|
+
# You should specify a copyright string to be included in the Apple Help Book.
|
|
77
|
+
# This typically appears when you print a Help Book.
|
|
78
|
+
|
|
64
79
|
# (other)
|
|
65
80
|
# You can specify additional .plist and .strings keys here, too. Have a look
|
|
66
81
|
# at `Info.plist.erb` and `InfoPlist.strings.erb`; simply use the exact key
|
|
@@ -79,8 +94,9 @@ config[:targets] = {
|
|
|
79
94
|
:HPDBookIconPath => nil,
|
|
80
95
|
:CFBundleName => 'New Project',
|
|
81
96
|
:ProductName => 'New Project',
|
|
82
|
-
:ProductVersion => '
|
|
97
|
+
:ProductVersion => version_app || '3.1.1',
|
|
83
98
|
:ProductURI => 'http://www.sample.com',
|
|
99
|
+
:ProductCopyright => '© 2021 Jim Derry. All rights reserved.',
|
|
84
100
|
:features =>
|
|
85
101
|
{
|
|
86
102
|
:feature_advertise_pro => true,
|
|
@@ -96,8 +112,9 @@ config[:targets] = {
|
|
|
96
112
|
:HPDBookIconPath => nil,
|
|
97
113
|
:CFBundleName => 'New Project',
|
|
98
114
|
:ProductName => 'New Project Pro',
|
|
99
|
-
:ProductVersion => '
|
|
115
|
+
:ProductVersion => version_app || '3.1.1',
|
|
100
116
|
:ProductURI => 'http://www.sample.com',
|
|
117
|
+
:ProductCopyright => '© 2021 Jim Derry. All rights reserved.',
|
|
101
118
|
:features =>
|
|
102
119
|
{
|
|
103
120
|
:feature_advertise_pro => false,
|
|
@@ -121,64 +138,6 @@ config[:target_magic_images] = true
|
|
|
121
138
|
config[:target_magic_word] = 'all'
|
|
122
139
|
|
|
123
140
|
|
|
124
|
-
################################################################
|
|
125
|
-
# Page Groups Configuration
|
|
126
|
-
# Middlemac uses the `middleman-pagegroups` gem in order to
|
|
127
|
-
# automate nearly all of the navigation in your help book
|
|
128
|
-
# project.
|
|
129
|
-
################################################################
|
|
130
|
-
activate :MiddlemanPageGroups do |config|
|
|
131
|
-
|
|
132
|
-
# Indicate whether or not numeric file name prefixes used for sorting
|
|
133
|
-
# pages should be eliminated during output. This results in cleaner
|
|
134
|
-
# URI's. Helpers such as `page_name` and Middleman helpers such as
|
|
135
|
-
# `page_class` will reflect the pretty name.
|
|
136
|
-
config.strip_file_prefixes = true
|
|
137
|
-
|
|
138
|
-
# Indicates whether or not Middleman's built-in `page_class` helper is
|
|
139
|
-
# extended to include the page_group and page_name.
|
|
140
|
-
config.extend_page_class = true
|
|
141
|
-
|
|
142
|
-
# the following options provide defaults for the built-in helpers and
|
|
143
|
-
# sample partials. They'll also work in your own partials and helpers.
|
|
144
|
-
|
|
145
|
-
config.nav_breadcrumbs_class = 'breadcrumbs'
|
|
146
|
-
config.nav_breadcrumbs_alt_class = 'breadcrumbs'
|
|
147
|
-
config.nav_breadcrumbs_alt_label = 'Current page'
|
|
148
|
-
config.nav_brethren_class = 'table_contents'
|
|
149
|
-
config.nav_brethren_index_class = 'related-topics'
|
|
150
|
-
config.nav_legitimate_children_class = 'table_contents'
|
|
151
|
-
config.nav_prev_next_class = 'navigate_prev_next'
|
|
152
|
-
config.nav_prev_next_label_prev = 'Previous'
|
|
153
|
-
config.nav_prev_next_label_next = 'Next'
|
|
154
|
-
config.nav_toc_index_class = 'help_map'
|
|
155
|
-
|
|
156
|
-
end
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
################################################################
|
|
160
|
-
# Extras Configuration
|
|
161
|
-
# Middlemac uses the `middlemac-extras` gem in order to
|
|
162
|
-
# provide other useful tools. They can be configured here.
|
|
163
|
-
################################################################
|
|
164
|
-
activate :MiddlemacExtras do |config|
|
|
165
|
-
|
|
166
|
-
# If set to true, then the enhanced image_tag helper will be used
|
|
167
|
-
# to include @2x srcset automatically, if the image asset exists.
|
|
168
|
-
config.retina_srcset = true
|
|
169
|
-
|
|
170
|
-
# If set to true then the `image_tag` helper will work for images even
|
|
171
|
-
# if you don't specify an extension, but only if a file exists on disk
|
|
172
|
-
# that has one of the extensions in :img_auto_extensions_order.
|
|
173
|
-
config.img_auto_extensions = true
|
|
174
|
-
|
|
175
|
-
# Set this to an array of extensions in the order of precedence for
|
|
176
|
-
# using `image_tag` without file extensions.
|
|
177
|
-
config.img_auto_extensions_order = %w(.svg .png .jpg .jpeg .gif .tiff .tif)
|
|
178
|
-
|
|
179
|
-
end
|
|
180
|
-
|
|
181
|
-
|
|
182
141
|
################################################################
|
|
183
142
|
# Configuration
|
|
184
143
|
# Change the option values to suit your needs.
|
|
@@ -191,16 +150,49 @@ activate :Middlemac do |options|
|
|
|
191
150
|
# named in the form `#{CFBundleName} (target).help`. You might want to target
|
|
192
151
|
# the `Resources` directory of your XCode project so that your XCode project
|
|
193
152
|
# is always up to date.
|
|
194
|
-
options.
|
|
153
|
+
options.help_output_location = nil
|
|
154
|
+
|
|
155
|
+
# Indicates whether or not spaces should be avoided in the name of the help
|
|
156
|
+
# bundle. The default value for backwards compatibility is `true` because
|
|
157
|
+
# some tools, such a make, don't like spaces.
|
|
158
|
+
options.help_output_avoid_spaces = true
|
|
159
|
+
|
|
160
|
+
# Indicates whether or not the `help_output_location` includes the `(target)`
|
|
161
|
+
# prefix in the help book bundle name. The default, `true`, will result in
|
|
162
|
+
# `#{CFBundleName} (target).help`, which is the historical behavior. Setting
|
|
163
|
+
# this to `false` will result in a help book named `#{CFBundleName}.help`,
|
|
164
|
+
# instead. This can be useful if you are building help books from scripts via
|
|
165
|
+
# XCode, and you set `help_output_location` to `ENV['BUILT_PRODUCTS_DIR']`.
|
|
166
|
+
# @return [Boolean] `true` or `false` to enable or disable this behavior.
|
|
167
|
+
options.help_output_use_target = true
|
|
195
168
|
|
|
196
|
-
#
|
|
197
|
-
#
|
|
198
|
-
#
|
|
199
|
-
options.
|
|
169
|
+
# If set to true, then the enhanced image_tag helper will be used
|
|
170
|
+
# to include @2x, @3x, and @4x srcset automatically, if the image assets
|
|
171
|
+
# exist.
|
|
172
|
+
options.retina_srcset = true
|
|
173
|
+
|
|
174
|
+
# If set to an array of possible image extension values, then the `image_tag`
|
|
175
|
+
# helper will work for images even if you don't specify an extension, but only
|
|
176
|
+
# if a file exists in the sitemap that has one of these extensions. Set this to
|
|
177
|
+
# an array of extensions in the order of precedence.
|
|
178
|
+
options.img_auto_extensions = %w(.svg .png .jpg .jpeg .gif .tiff .tif)
|
|
179
|
+
|
|
180
|
+
# If set to true, some of the templates will show additional information
|
|
181
|
+
# when pages are generated, such as contents of md_links and md_images.
|
|
182
|
+
# Also, JavaScript redirects will be omitted from naked pages, and the
|
|
183
|
+
# meta refresh will be set to 100 seconds for such pages.
|
|
184
|
+
options.show_debug = false
|
|
185
|
+
|
|
186
|
+
# If set to true, Apple will provide next page and previous page navigation
|
|
187
|
+
# gadgets automatically at the bottom of each content page. Apple itself
|
|
188
|
+
# does not use this feature currently.
|
|
189
|
+
options.show_previous_next = false
|
|
200
190
|
|
|
201
|
-
#
|
|
202
|
-
#
|
|
203
|
-
|
|
191
|
+
# Indicate whether or not numeric file name prefixes used for sorting
|
|
192
|
+
# pages should be eliminated during output. This results in cleaner
|
|
193
|
+
# URI's. Helpers such as `page_name` and Middleman helpers such as
|
|
194
|
+
# `page_class` will reflect the pretty name.
|
|
195
|
+
config.strip_file_prefixes = true
|
|
204
196
|
|
|
205
197
|
end #activate
|
|
206
198
|
|
|
@@ -214,42 +206,33 @@ end #activate
|
|
|
214
206
|
#===============================================================
|
|
215
207
|
# Setup directories to mirror Help Book directory layout.
|
|
216
208
|
#===============================================================
|
|
217
|
-
set :source,
|
|
218
|
-
set :
|
|
219
|
-
|
|
220
|
-
set :
|
|
221
|
-
set :
|
|
222
|
-
set :
|
|
223
|
-
set :css_dir,
|
|
224
|
-
|
|
225
|
-
set :
|
|
226
|
-
set :
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
#===============================================================
|
|
230
|
-
# Ignore items we don't want copied to the destination
|
|
231
|
-
#===============================================================
|
|
232
|
-
#ignore 'data/*'
|
|
209
|
+
set :source, 'Contents'
|
|
210
|
+
set :data_dir, 'Contents/Resources/SharedGlobalAssets/_data'
|
|
211
|
+
set :assets_dir, 'Resources/SharedGlobalAssets'
|
|
212
|
+
set :partials_dir, '_partials'
|
|
213
|
+
set :layouts_dir, '_layouts'
|
|
214
|
+
set :convention_dir, 'convention'
|
|
215
|
+
set :css_dir, 'css'
|
|
216
|
+
set :fonts_dir, 'fonts'
|
|
217
|
+
set :images_dir, 'images'
|
|
218
|
+
set :js_dir, 'js'
|
|
233
219
|
|
|
234
220
|
|
|
235
221
|
#===============================================================
|
|
236
|
-
#
|
|
237
|
-
#
|
|
238
|
-
# paths with root being the source directory; they will be
|
|
239
|
-
# converted to relative paths at build.
|
|
222
|
+
# Other required setup. Note: don't use relative assets or
|
|
223
|
+
# links here, as Apple require very specific hrefs.
|
|
240
224
|
#===============================================================
|
|
241
225
|
set :strip_index_file, false
|
|
242
|
-
set :relative_links, true
|
|
243
|
-
activate :relative_assets do |options|
|
|
244
|
-
options.rewrite_ignore = [/image_sizes\.css/]
|
|
245
|
-
end
|
|
246
226
|
|
|
247
227
|
|
|
248
228
|
#===============================================================
|
|
249
|
-
# Default to
|
|
229
|
+
# Default to HTML5 Layout.
|
|
230
|
+
# Specify layouts from most specific to least specific.
|
|
250
231
|
#===============================================================
|
|
251
|
-
|
|
252
|
-
|
|
232
|
+
Haml::TempleEngine.disable_option_validator!
|
|
233
|
+
set :haml, :format => :html5
|
|
234
|
+
page 'Resources/*.lproj/asides/*.html', :layout => :'layout-apple-modern-aside'
|
|
235
|
+
page 'Resources/*.lproj/*.html', :layout => :'layout-apple-modern'
|
|
253
236
|
|
|
254
237
|
|
|
255
238
|
#===============================================================
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
###############################################################################
|
|
2
|
+
# Building from make rather than the previous shell script gives us a lot of
|
|
3
|
+
# flexibility and is a bit simpler to integrate with Xcode.
|
|
4
|
+
#
|
|
5
|
+
# Usage:
|
|
6
|
+
# make build|clean TARGET=target
|
|
7
|
+
# Specifying a target is required.
|
|
8
|
+
#
|
|
9
|
+
# Make will assume that this makefile is in the root of your project, at the
|
|
10
|
+
# same level as your source Contents/ directory. To use this file from Xcode,
|
|
11
|
+
# create an External Build System target, and specify `/usr/bin/make` as the
|
|
12
|
+
# build tool, `$(ACTION) TARGET=your_target_or_variable` as the arguments,
|
|
13
|
+
# and for Directory, a path to this file, e.g., `$(PROJECT_DIR)/path/to/me`.
|
|
14
|
+
###############################################################################
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
#====================================================================
|
|
18
|
+
# Prerequisites:
|
|
19
|
+
# - Ensure that a TARGET is specified.
|
|
20
|
+
# - Make sure Middlemac is installed and reachable. Although we
|
|
21
|
+
# could do that in a recipe, we need to discover our BUILD_DIR,
|
|
22
|
+
# which cannot be done in a recipe.
|
|
23
|
+
# - Discover our BUILD_DIR, by asking Middleman for the build
|
|
24
|
+
# directory for the specified target.
|
|
25
|
+
# Output will be provided in a target recipe if these conditions
|
|
26
|
+
# cannot be met.
|
|
27
|
+
#====================================================================
|
|
28
|
+
|
|
29
|
+
ifdef TARGET
|
|
30
|
+
MM_EXISTS := $(shell [[ -s "$(HOME)/.rvm/environments/default" ]] && source "$(HOME)/.rvm/environments/default" ; which middlemac)
|
|
31
|
+
endif
|
|
32
|
+
ifdef MM_EXISTS
|
|
33
|
+
BUILD_DIR := $(shell export LANG=en_US.UTF-8 && [[ -s "$(HOME)/.rvm/environments/default" ]] && source "$(HOME)/.rvm/environments/default" ; bundle exec middleman list_all | grep "$(TARGET)," | cut -d\ -f2- )
|
|
34
|
+
endif
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
#====================================================================
|
|
38
|
+
# "Source" files to monitor for changes. If any of these change,
|
|
39
|
+
# then they will have a new file modification date than the
|
|
40
|
+
# $(BUILD_DIR), causing the action to execute.
|
|
41
|
+
#====================================================================
|
|
42
|
+
SRC_FILES = $(shell find Contents)
|
|
43
|
+
SRC_FILES += config.rb Gemfile Gemfile.lock
|
|
44
|
+
|
|
45
|
+
#====================================================================
|
|
46
|
+
# The default action, will build the specified TARGET using
|
|
47
|
+
# Middleman, by depending on the $(BUILD_DIR).
|
|
48
|
+
#====================================================================
|
|
49
|
+
.PHONY: build
|
|
50
|
+
build: check_prerequisites $(BUILD_DIR)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
#====================================================================
|
|
54
|
+
# The action that will actually perform the building of the help
|
|
55
|
+
# book. If the directory specified by $(BUILD_DIR) is older than
|
|
56
|
+
# any of the given source files, then this action will be executed.
|
|
57
|
+
# NOTE: make does NOT work with spaces in filenames.
|
|
58
|
+
#====================================================================
|
|
59
|
+
$(BUILD_DIR): $(SRC_FILES)
|
|
60
|
+
@echo "Make will have Middleman build target '$(TARGET)'"
|
|
61
|
+
# @echo "RECIPE AS KNOWN TO MAKE: $@"
|
|
62
|
+
# @echo " ACTUAL BUILD_DIR: $(BUILD_DIR)"
|
|
63
|
+
# @echo " EXECUTION REASON: $?"
|
|
64
|
+
@export LANG=en_US.UTF-8 && \
|
|
65
|
+
[[ -s "$(HOME)/.rvm/environments/default" ]] && source "$(HOME)/.rvm/environments/default" ; \
|
|
66
|
+
bundle exec middleman build --target "$(TARGET)"
|
|
67
|
+
@touch "$(BUILD_DIR)"
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
#====================================================================
|
|
71
|
+
# Clean the given target.
|
|
72
|
+
#====================================================================
|
|
73
|
+
.PHONY: clean
|
|
74
|
+
clean: check_prerequisites
|
|
75
|
+
@echo "Cleaning $(BUILD_DIR)…"
|
|
76
|
+
@rm -rf "$(BUILD_DIR)"
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
#====================================================================
|
|
80
|
+
# Ensure that we have everything that we need to proceed with doing
|
|
81
|
+
# something with Middlemac and with the target.
|
|
82
|
+
#====================================================================
|
|
83
|
+
.PHONY: check_prerequisites
|
|
84
|
+
check_prerequisites:
|
|
85
|
+
ifndef TARGET
|
|
86
|
+
$(error "ERROR: It's required to specify a target macro, e.g., TARGET=default.")
|
|
87
|
+
endif
|
|
88
|
+
ifndef MM_EXISTS
|
|
89
|
+
$(error "ERROR: Middlemac was not found, and is required to continue.")
|
|
90
|
+
endif
|
|
91
|
+
ifndef BUILD_DIR
|
|
92
|
+
$(error "ERROR: Target ${TARGET} was specified, but Middlemac did not find any valid targets.")
|
|
93
|
+
endif
|
|
Binary file
|
data/lib/middlemac.rb
CHANGED
|
@@ -2,5 +2,9 @@ require 'middleman-core'
|
|
|
2
2
|
|
|
3
3
|
Middleman::Extensions.register :Middlemac, :before_configuration do
|
|
4
4
|
require_relative 'middlemac/extension'
|
|
5
|
+
require_relative 'middlemac/sitemap'
|
|
6
|
+
require_relative 'middlemac/helpers'
|
|
7
|
+
require_relative 'middlemac/private'
|
|
8
|
+
require_relative 'middlemac/trie-extension'
|
|
5
9
|
Middlemac
|
|
6
10
|
end
|
data/lib/middlemac/extension.rb
CHANGED
|
@@ -1,29 +1,70 @@
|
|
|
1
1
|
require 'middleman-core'
|
|
2
|
-
|
|
2
|
+
require 'fastimage'
|
|
3
|
+
require 'pathname'
|
|
4
|
+
require 'json'
|
|
5
|
+
require 'nokogiri'
|
|
6
|
+
require 'words_counted'
|
|
7
|
+
require 'trie/trie'
|
|
3
8
|
|
|
4
9
|
################################################################################
|
|
5
|
-
# **Middlemac**
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
# while minimizing source code.
|
|
10
|
+
# **Middlemac** is a tool to build macOS application help book files from
|
|
11
|
+
# simple source documents. It handles all of the esoteric details for you,
|
|
12
|
+
# and provides easy-to-use helpers for working with multiple versions of
|
|
13
|
+
# your application (e.g., pro and free) while minimizing source code.
|
|
10
14
|
# @author Jim Derry <balthisar@gmail.com>
|
|
11
15
|
################################################################################
|
|
16
|
+
|
|
12
17
|
class Middlemac < ::Middleman::Extension
|
|
13
18
|
|
|
14
19
|
|
|
20
|
+
############################################################
|
|
21
|
+
# Define additional Middleman settings.
|
|
22
|
+
############################################################
|
|
23
|
+
define_setting :assets_dir, 'Resources/SharedGlobalAssets', 'The assets base directory. All other assets are relative to this.'
|
|
24
|
+
define_setting :convention_dir, 'convention', 'The directory for Middlemac conventions items.'
|
|
25
|
+
define_setting :partials_dir, '_partials', 'A convenient shortcut to common partials.'
|
|
26
|
+
|
|
27
|
+
# @!group Middleman Configuration
|
|
28
|
+
|
|
29
|
+
# @!attribute [rw] config[:assets_dir]=
|
|
30
|
+
# Specifies the high-level, shared assets root directory.
|
|
31
|
+
# @return [String] The shared assets root directory.
|
|
32
|
+
# @note This is a Middleman application level config option.
|
|
33
|
+
|
|
34
|
+
# @!attribute [rw] config[:convention_dir]=
|
|
35
|
+
# Specifies the special directory for assets the middlemac
|
|
36
|
+
# requires by convention. This directory does not have a
|
|
37
|
+
# localized variant.
|
|
38
|
+
# @return [String] The special convention directory.
|
|
39
|
+
# @note This is a Middleman application level config option.
|
|
40
|
+
|
|
41
|
+
# @!attribute [rw] options[:partials_dir]=
|
|
42
|
+
# Specifies the default location for partials. Prior to **Middleman** 4.0,
|
|
43
|
+
# all partials were kept in a common directory. **Middlemac** restores this
|
|
44
|
+
# previous behavior by allowing all partials to be grouped in a common
|
|
45
|
+
# directory. When using the `partial` helper, this directory will be checked
|
|
46
|
+
# first for the existence of a partial; if not found, then the default,
|
|
47
|
+
# built-in behavior will take over.
|
|
48
|
+
# @return [String] The directory to search for partials.
|
|
49
|
+
|
|
50
|
+
|
|
15
51
|
############################################################
|
|
16
52
|
# Define the options that are to be set within `config.rb`
|
|
17
53
|
# as extension options.
|
|
18
54
|
############################################################
|
|
19
|
-
option :
|
|
20
|
-
option :
|
|
21
|
-
option :
|
|
55
|
+
option :help_output_location, nil, 'Directory to place the built helpbook.'
|
|
56
|
+
option :help_output_avoid_spaces, true, 'If true, spaces in the help book file name bundle will be replaced with underscores.'
|
|
57
|
+
option :help_output_use_target, true, 'If false, the help book will not include (target) in its bundle name.'
|
|
58
|
+
option :img_auto_extensions, %w(.svg .png .jpg .jpeg .gif .tiff .tif), 'If not empty, then `image_tag` will work without filename extensions.'
|
|
59
|
+
option :retina_srcset, true, 'If true then the image_tag helper will be extended to include automatic @2x images.'
|
|
60
|
+
option :show_debug, false, 'If true, the main layout will show some debug information and site contents.'
|
|
61
|
+
option :show_previous_next, false, 'If true, show navigation controls at the bottom of each content page.'
|
|
62
|
+
option :strip_file_prefixes, true, 'If true leading numbers used for sorting files will be removed for presentation purposes.'
|
|
22
63
|
|
|
23
64
|
|
|
24
65
|
# @!group Extension Configuration
|
|
25
66
|
|
|
26
|
-
# @!attribute [rw] options[:
|
|
67
|
+
# @!attribute [rw] options[:help_output_location]=
|
|
27
68
|
# Specifies the directory where the finished `.help` bundle should go. It
|
|
28
69
|
# must be relative to your `config.rb` file, or set it to `nil` to leave the
|
|
29
70
|
# output in the default location (in the help project directory). The *actual*
|
|
@@ -32,28 +73,56 @@ class Middlemac < ::Middleman::Extension
|
|
|
32
73
|
# of your XCode project with this option, it’s possible to ensure that an
|
|
33
74
|
# Xcode project is automatically up to date every time a help project is
|
|
34
75
|
# built.
|
|
35
|
-
# @
|
|
36
|
-
|
|
37
|
-
#
|
|
38
|
-
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
#
|
|
43
|
-
|
|
44
|
-
#
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
|
|
53
|
-
#
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
76
|
+
# @return [String] The directory where the final help bundle will be built.
|
|
77
|
+
|
|
78
|
+
# @!attribute [rw] options[:help_output_avoid_spaces]=
|
|
79
|
+
# Indicates whethr or not the `help_output_location` includes spaces in its
|
|
80
|
+
# filename or not. Some GNU tools, such as make, choke on spaces. The default
|
|
81
|
+
# setting for this option is *yes* in order to maintain backward
|
|
82
|
+
# compatibility.
|
|
83
|
+
# @return [Boolean] `true` or `false` to enable or disable this behavior.
|
|
84
|
+
|
|
85
|
+
# @!attribute [rw] options[:help_output_use_target]=
|
|
86
|
+
# Indicates whether or not the `help_output_location` includes the `(target)`
|
|
87
|
+
# prefix in the help book bundle name. The default, `true`, will result in
|
|
88
|
+
# `#{CFBundleName} (target).help`, which is the historical behavior. Setting
|
|
89
|
+
# this to `false` will result in a help book named `#{CFBundleName}.help`,
|
|
90
|
+
# instead. This can be useful if you are building help books from scripts via
|
|
91
|
+
# XCode, and you set `help_output_location` to `ENV['BUILT_PRODUCTS_DIR']`.
|
|
92
|
+
# @return [Boolean] `true` or `false` to enable or disable this behavior.
|
|
93
|
+
|
|
94
|
+
# @!attribute [rw] options[:img_auto_extensions]=
|
|
95
|
+
# This option determines whether or not to support specifying images without
|
|
96
|
+
# using a file name extension, as well as the priority of the possible file
|
|
97
|
+
# extensions. If not empty or nil, then the `image_tag` helper will work for
|
|
98
|
+
# images even if you don’t specify an extension, but only if a file exists in
|
|
99
|
+
# the sitemap that has one of the extensions in the array.
|
|
100
|
+
# @return [Array<String>] Set to an array of image extensions.
|
|
101
|
+
|
|
102
|
+
# @!attribute [rw] options[:show_debug]=
|
|
103
|
+
# This option determines whether or not extra debug information is provided
|
|
104
|
+
# at the bottom of each content page.
|
|
105
|
+
# @return [Boolean] `true` or `false` to enable or disable this feature.
|
|
106
|
+
|
|
107
|
+
# @!attribute [rw] options[:show_previous_next]=
|
|
108
|
+
# This option determines whether or not the Apple Help System should display
|
|
109
|
+
# previous and next page navigators at the bottom of each content page. Note
|
|
110
|
+
# that Apple itself does not use this feature.
|
|
111
|
+
# @return [Boolean] `true` or `false` to enable or disable this feature.
|
|
112
|
+
|
|
113
|
+
# @!attribute [rw] options[:retina_srcset]=
|
|
114
|
+
# This option determines whether or not the enhanced `image_tag` helper will
|
|
115
|
+
# be used to include an @2x `srcset` attribute automatically. This automatic
|
|
116
|
+
# behavior will only be applied if the image asset exists on disk and this
|
|
117
|
+
# option is set to `true`.
|
|
118
|
+
# @return [Boolean] `true` or `false` to enable or disable this feature.
|
|
119
|
+
|
|
120
|
+
# @!attribute [rw] options[:strip_file_prefixes]=
|
|
121
|
+
# If `true` leading numbers used for sorting files will be removed for
|
|
122
|
+
# presentation purposes. This makes it possible to neatly organize your
|
|
123
|
+
# source files in their presentation order on your filesystem but output
|
|
124
|
+
# nice filenames without ugly prefix numbers.
|
|
125
|
+
# @return [Boolean] `true` or `false` to enable or disable this feature.
|
|
57
126
|
|
|
58
127
|
# @!endgroup
|
|
59
128
|
|
|
@@ -66,6 +135,11 @@ class Middlemac < ::Middleman::Extension
|
|
|
66
135
|
|
|
67
136
|
super
|
|
68
137
|
|
|
138
|
+
@md_links_b = {}
|
|
139
|
+
@md_images_b = {}
|
|
140
|
+
@md_sizes_b = nil
|
|
141
|
+
@hb_search_tree_b = nil
|
|
142
|
+
|
|
69
143
|
end # initialize
|
|
70
144
|
|
|
71
145
|
|
|
@@ -76,13 +150,51 @@ class Middlemac < ::Middleman::Extension
|
|
|
76
150
|
#############################################################
|
|
77
151
|
def after_configuration
|
|
78
152
|
|
|
79
|
-
|
|
153
|
+
puts "****************************************************"
|
|
154
|
+
puts "after_configuration"
|
|
155
|
+
puts "****************************************************"
|
|
80
156
|
|
|
81
|
-
|
|
157
|
+
# Set the correct :build_dir based on the options.
|
|
158
|
+
dir = options[:help_output_location] || File.expand_path('./')
|
|
82
159
|
cf_bundle_name = app.config[:targets][app.config[:target]][:CFBundleName]
|
|
83
160
|
target = app.config[:target]
|
|
84
|
-
|
|
85
|
-
|
|
161
|
+
|
|
162
|
+
if options[:help_output_use_target]
|
|
163
|
+
output_name = "#{cf_bundle_name} (#{target}).help"
|
|
164
|
+
else
|
|
165
|
+
output_name = "#{cf_bundle_name}.help"
|
|
166
|
+
end
|
|
167
|
+
output_name.gsub!(' ', '_') if options[:help_output_avoid_spaces]
|
|
168
|
+
|
|
169
|
+
app.config[:build_dir] = File.join(dir, output_name, 'Contents')
|
|
170
|
+
|
|
171
|
+
return if app.config[:exit_before_ready]
|
|
172
|
+
|
|
173
|
+
# Set the other directories accordingly.
|
|
174
|
+
app.config[:layouts_dir] = File.join(app.config[:assets_dir], app.config[:layouts_dir])
|
|
175
|
+
app.config[:partials_dir] = File.join(app.config[:assets_dir], app.config[:partials_dir])
|
|
176
|
+
app.config[:convention_dir] = File.join(app.config[:assets_dir], app.config[:convention_dir])
|
|
177
|
+
app.config[:css_dir] = File.join(app.config[:assets_dir], app.config[:css_dir])
|
|
178
|
+
app.config[:fonts_dir] = File.join(app.config[:assets_dir], app.config[:fonts_dir])
|
|
179
|
+
app.config[:images_dir] = File.join(app.config[:assets_dir], app.config[:images_dir])
|
|
180
|
+
app.config[:js_dir] = File.join(app.config[:assets_dir], app.config[:js_dir])
|
|
181
|
+
|
|
182
|
+
# Reset the helpers' buffers when the configuration
|
|
183
|
+
# changes. For speed we don't want to recalculate everything
|
|
184
|
+
# every time a helper is used, but only the first time.
|
|
185
|
+
@md_links_b = {}
|
|
186
|
+
@md_images_b = {}
|
|
187
|
+
@md_sizes_b = nil
|
|
188
|
+
@hb_search_tree_b = nil
|
|
189
|
+
|
|
190
|
+
# Build a list of all of the available localizations, so that
|
|
191
|
+
# - We can run the help indexer multiple times, and
|
|
192
|
+
# - We can build the data for locale-list.json.
|
|
193
|
+
project_root = File.join(app.config[:source], 'Resources')
|
|
194
|
+
@localizations = Pathname.new(project_root).children.select { |c| c.directory? && c.basename.to_s.end_with?('.lproj') }
|
|
195
|
+
.map { |p| p.basename.to_s }
|
|
196
|
+
|
|
197
|
+
@localizations.each { |k| say "Middlemac will handle localized content for #{k}.", :blue }
|
|
86
198
|
|
|
87
199
|
end
|
|
88
200
|
|
|
@@ -94,181 +206,10 @@ class Middlemac < ::Middleman::Extension
|
|
|
94
206
|
############################################################
|
|
95
207
|
def after_build(builder)
|
|
96
208
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
end # after_build
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
############################################################
|
|
103
|
-
# Helpers
|
|
104
|
-
# Methods defined in this helpers block are available in
|
|
105
|
-
# templates.
|
|
106
|
-
############################################################
|
|
107
|
-
|
|
108
|
-
helpers do
|
|
109
|
-
|
|
110
|
-
#--------------------------------------------------------
|
|
111
|
-
# This helper returns the name of the breadcrumbs
|
|
112
|
-
# partial configured to be used in your project, i.e.,
|
|
113
|
-
# the value of `options[:Breadcrumbs]`.
|
|
114
|
-
# @return [String] The name of the configured breadcrumbs
|
|
115
|
-
# partial.
|
|
116
|
-
#--------------------------------------------------------
|
|
117
|
-
def breadcrumbs
|
|
118
|
-
extensions[:Middlemac].options[:Breadcrumbs]
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
#--------------------------------------------------------
|
|
123
|
-
# Returns the name of the configured partials directory
|
|
124
|
-
# to use by default with the `partials` helper, i.e., the
|
|
125
|
-
# value of `options[:partials_dir]`.
|
|
126
|
-
# @return [String] The path of the configured default
|
|
127
|
-
# partials directory.
|
|
128
|
-
#--------------------------------------------------------
|
|
129
|
-
def partials_dir
|
|
130
|
-
extensions[:Middlemac].options[:partials_dir]
|
|
131
|
-
end
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
#--------------------------------------------------------
|
|
135
|
-
# Returns the product `CFBundleIdentifier` for the
|
|
136
|
-
# current target as configured in your `config.rb`.
|
|
137
|
-
# @return [String] The `cfBundleIdentifier`.
|
|
138
|
-
#--------------------------------------------------------
|
|
139
|
-
def cfBundleIdentifier
|
|
140
|
-
config[:targets][config[:target]][:CFBundleID]
|
|
141
|
-
end
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
#--------------------------------------------------------
|
|
145
|
-
# Returns the product `CFBundleName` for the current
|
|
146
|
-
# target as configured in your `config.rb`.
|
|
147
|
-
# @return [String] The `CFBundleName`.
|
|
148
|
-
#--------------------------------------------------------
|
|
149
|
-
def cfBundleName
|
|
150
|
-
config[:targets][config[:target]][:CFBundleName]
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
#--------------------------------------------------------
|
|
155
|
-
# Returns the `ProductName` for the current target
|
|
156
|
-
# as configured in your `config.rb`.
|
|
157
|
-
# @return [String] The `ProductName`.
|
|
158
|
-
#--------------------------------------------------------
|
|
159
|
-
def product_name
|
|
160
|
-
config[:targets][config[:target]][:ProductName]
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
#--------------------------------------------------------
|
|
165
|
-
# Returns the `ProductVersion` for the current target
|
|
166
|
-
# as configured in your `config.rb`.
|
|
167
|
-
# @return [String] The `ProductVersion`.
|
|
168
|
-
#--------------------------------------------------------
|
|
169
|
-
def product_version
|
|
170
|
-
config[:targets][config[:target]][:ProductVersion]
|
|
171
|
-
end
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
#--------------------------------------------------------
|
|
175
|
-
# Returns the `ProductURI` for the current target
|
|
176
|
-
# as configured in your `config.rb`.
|
|
177
|
-
# @return [String] The `ProductURI`.
|
|
178
|
-
#--------------------------------------------------------
|
|
179
|
-
def product_uri
|
|
180
|
-
config[:targets][config[:target]][:ProductURI]
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
#--------------------------------------------------------
|
|
185
|
-
# Extends the built-in `partials` helper to allow the
|
|
186
|
-
# use of a default partials directory as configured with
|
|
187
|
-
# `options[:partials_dir]`. Middleman 4.0 removed the
|
|
188
|
-
# option `partials_dir` which increased flexibility a
|
|
189
|
-
# lot, but hurt backwards compatibility. When used the
|
|
190
|
-
# default location will be searched first for the
|
|
191
|
-
# specified partial; if not found then the built-in
|
|
192
|
-
# behavior will be used.
|
|
193
|
-
# @param [String] template The partial file to use.
|
|
194
|
-
# @param [Hash] opts Options to use for the partial.
|
|
195
|
-
# Consult **Middleman**’s documentation for possible
|
|
196
|
-
# options.
|
|
197
|
-
# @param [Block] &block An option block as per the
|
|
198
|
-
# default implementation by **Middleman**.
|
|
199
|
-
# @group Extended Helpers
|
|
200
|
-
#--------------------------------------------------------
|
|
201
|
-
def partial(template, opts={}, &block)
|
|
202
|
-
file_check = File.join(extensions[:Middlemac].options[:partials_dir], "_#{template}")
|
|
203
|
-
if ::Middleman::TemplateRenderer.resolve_template( @app, file_check)
|
|
204
|
-
super(file_check, opts, &block)
|
|
205
|
-
else
|
|
206
|
-
super(template, opts, &block)
|
|
207
|
-
end
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
end #helpers
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
############################################################
|
|
215
|
-
# Instance Methods
|
|
216
|
-
# @!group Instance Methods
|
|
217
|
-
############################################################
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
#########################################################
|
|
221
|
-
# Runs Apple’s the help indexer if it is available on
|
|
222
|
-
# the system.
|
|
223
|
-
# @return [Void]
|
|
224
|
-
#########################################################
|
|
225
|
-
def run_help_indexer
|
|
226
|
-
|
|
227
|
-
cf_bundle_name = app.config[:targets][app.config[:target]][:CFBundleName]
|
|
228
|
-
target = app.config[:target]
|
|
229
|
-
|
|
230
|
-
# see whether a help indexer is available.
|
|
231
|
-
`command -v hiutil > /dev/null`
|
|
232
|
-
if $?.success?
|
|
233
|
-
|
|
234
|
-
index_dir = File.expand_path(File.join(app.config[:build_dir], 'Resources/', 'Base.lproj/'))
|
|
235
|
-
index_dst = File.expand_path(File.join(index_dir, "#{cf_bundle_name}.helpindex"))
|
|
236
|
-
|
|
237
|
-
say "'…#{index_dir.split(//).last(60).join}' (indexing)", :cyan
|
|
238
|
-
say "'…#{index_dst.split(//).last(60).join}' (final file)", :cyan
|
|
239
|
-
|
|
240
|
-
`hiutil -Cf "#{index_dst}" "#{index_dir}"`
|
|
241
|
-
else
|
|
242
|
-
say "NOTE: `hiutil` is not found, so no index will exist for target '#{target}'.", :red
|
|
209
|
+
@localizations.each do |locale|
|
|
210
|
+
run_help_indexer(locale)
|
|
243
211
|
end
|
|
244
212
|
|
|
245
|
-
end #
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
#########################################################
|
|
249
|
-
# Output colored messages using ANSI codes.
|
|
250
|
-
# @param [String] message The message to output to the
|
|
251
|
-
# console.
|
|
252
|
-
# @param [Symbol] color The color in which to display
|
|
253
|
-
# the message.
|
|
254
|
-
# @returns [Void]
|
|
255
|
-
# @!visibility private
|
|
256
|
-
#########################################################
|
|
257
|
-
def say(message = '', color = :reset)
|
|
258
|
-
colors = { :blue => "\033[34m",
|
|
259
|
-
:cyan => "\033[36m",
|
|
260
|
-
:green => "\033[32m",
|
|
261
|
-
:red => "\033[31m",
|
|
262
|
-
:yellow => "\033[33m",
|
|
263
|
-
:reset => "\033[0m",
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
|
267
|
-
puts message
|
|
268
|
-
else
|
|
269
|
-
puts colors[color] + message + colors[:reset]
|
|
270
|
-
end
|
|
271
|
-
end # say
|
|
272
|
-
|
|
213
|
+
end # after_build
|
|
273
214
|
|
|
274
|
-
end # class
|
|
215
|
+
end # class Middlemac
|