middlemac 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile +11 -1
- data/README.md +38 -6
- data/Rakefile +7 -2
- data/documentation_project/.gitignore +1 -1
- data/documentation_project/Contents/Info.plist.erb +1 -1
- 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/_partials/_yard_middlemac_config.erb +276 -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 +85 -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 +295 -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 +260 -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/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/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/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/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/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 +68 -100
- data/documentation_project/makefile +93 -0
- data/documentation_project/middlemac.webloc +0 -0
- data/features/helpers_features.feature +59 -0
- data/features/main_features.feature +21 -17
- data/features/support/env.rb +0 -14
- data/fixtures/middlemac_app/.gitignore +0 -1
- data/fixtures/middlemac_app/Contents/Info.plist.erb +1 -1
- 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/{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/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/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 +71 -100
- data/fixtures/middlemac_app/makefile +93 -0
- data/fixtures/middlemac_app/middlemac.webloc +0 -0
- data/lib/middlemac/extension.rb +123 -211
- data/lib/middlemac/helpers.rb +470 -0
- data/lib/middlemac/private.rb +494 -0
- data/lib/middlemac/sitemap.rb +516 -0
- data/lib/middlemac/trie.rb +37 -0
- data/lib/middlemac/version.rb +1 -1
- data/lib/middlemac.rb +4 -0
- data/middlemac.gemspec +7 -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 +394 -219
- 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,470 @@
|
|
1
|
+
################################################################################
|
2
|
+
# Helpers
|
3
|
+
# Methods defined in this helpers block are available in templates.
|
4
|
+
################################################################################
|
5
|
+
|
6
|
+
class Middlemac < ::Middleman::Extension
|
7
|
+
|
8
|
+
helpers do
|
9
|
+
|
10
|
+
#--------------------------------------------------------
|
11
|
+
# Returns the product `CFBundleIdentifier` for the
|
12
|
+
# current target as configured in your `config.rb`.
|
13
|
+
# @return [String] The `cfBundleIdentifier`.
|
14
|
+
#--------------------------------------------------------
|
15
|
+
def cfBundleIdentifier
|
16
|
+
config[:targets][config[:target]][:CFBundleID]
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
#--------------------------------------------------------
|
21
|
+
# Returns the product `CFBundleName` for the current
|
22
|
+
# target as configured in your `config.rb`.
|
23
|
+
# @return [String] The `CFBundleName`.
|
24
|
+
#--------------------------------------------------------
|
25
|
+
def cfBundleName
|
26
|
+
config[:targets][config[:target]][:CFBundleName]
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
#--------------------------------------------------------
|
31
|
+
# Returns the `ProductCopyright` for the current target
|
32
|
+
# as configured in your `config.rb`.
|
33
|
+
# @return [String] The `ProductCopyright`.
|
34
|
+
#--------------------------------------------------------
|
35
|
+
def product_copyright
|
36
|
+
config[:targets][config[:target]][:ProductCopyright]
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
#--------------------------------------------------------
|
41
|
+
# Returns the `ProductName` for the current target
|
42
|
+
# as configured in your `config.rb`.
|
43
|
+
# @return [String] The `ProductName`.
|
44
|
+
#--------------------------------------------------------
|
45
|
+
def product_name
|
46
|
+
config[:targets][config[:target]][:ProductName]
|
47
|
+
end
|
48
|
+
|
49
|
+
|
50
|
+
#--------------------------------------------------------
|
51
|
+
# Returns the `ProductURI` for the current target
|
52
|
+
# as configured in your `config.rb`.
|
53
|
+
# @return [String] The `ProductURI`.
|
54
|
+
#--------------------------------------------------------
|
55
|
+
def product_uri
|
56
|
+
config[:targets][config[:target]][:ProductURI]
|
57
|
+
end
|
58
|
+
|
59
|
+
|
60
|
+
#--------------------------------------------------------
|
61
|
+
# Returns the `ProductVersion` for the current target
|
62
|
+
# as configured in your `config.rb`.
|
63
|
+
# @return [String] The `ProductVersion`.
|
64
|
+
#--------------------------------------------------------
|
65
|
+
def product_version
|
66
|
+
config[:targets][config[:target]][:ProductVersion]
|
67
|
+
end
|
68
|
+
|
69
|
+
|
70
|
+
#--------------------------------------------------------
|
71
|
+
# Returns the copyright page, if one is present. The
|
72
|
+
# first page in the hb_sitemap which includes "copyright"
|
73
|
+
# within its categories.
|
74
|
+
# @return [Sitemap::Resource] The root resource.
|
75
|
+
#--------------------------------------------------------
|
76
|
+
def hb_copyright_page
|
77
|
+
hb_sitemap.find{ |r| r&.data&.categories&.include?('copyright') }
|
78
|
+
end
|
79
|
+
|
80
|
+
|
81
|
+
#--------------------------------------------------------
|
82
|
+
# Returns the very top of of the current target, i.e.,
|
83
|
+
# generally your index.html landing page in the lproj
|
84
|
+
# directory.
|
85
|
+
# @return [Sitemap::Resource] The root resource.
|
86
|
+
#--------------------------------------------------------
|
87
|
+
def hb_landing_page
|
88
|
+
hb_sitemap.first.breadcrumbs.first
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
#--------------------------------------------------------
|
93
|
+
# Returns a filtered version of the sitemap for the
|
94
|
+
# current target containing only resources that the
|
95
|
+
# modern Apple Help can navigate to directly, in the
|
96
|
+
# current language.
|
97
|
+
# as configured in your `config.rb`.
|
98
|
+
# @return [Array<Sitemap::Resource>] The applicable
|
99
|
+
# sitemap.
|
100
|
+
#--------------------------------------------------------
|
101
|
+
def hb_sitemap
|
102
|
+
extensions[:Middlemac].hb_sitemap_impl(current_page)
|
103
|
+
end
|
104
|
+
|
105
|
+
|
106
|
+
#--------------------------------------------------------
|
107
|
+
# Returns a list of the locales detected during config.
|
108
|
+
# This can be used to build locale-list.json from the
|
109
|
+
# data object.
|
110
|
+
# @return [Array<String>] The list of locales.
|
111
|
+
#--------------------------------------------------------
|
112
|
+
def hb_locale_list
|
113
|
+
extensions[:Middlemac].hb_locale_list_impl
|
114
|
+
end
|
115
|
+
|
116
|
+
|
117
|
+
#--------------------------------------------------------
|
118
|
+
# Returns the search tree for the current locale.
|
119
|
+
# @return [String] The search tree in JSON format.
|
120
|
+
#--------------------------------------------------------
|
121
|
+
def hb_search_tree
|
122
|
+
extensions[:Middlemac].hb_search_tree_impl(current_page)
|
123
|
+
end
|
124
|
+
|
125
|
+
|
126
|
+
#--------------------------------------------------------
|
127
|
+
# Returns the extension name and version; suitable for
|
128
|
+
# the `framework` field of modern Apple Help `framework`
|
129
|
+
# field.
|
130
|
+
# @return [String] The extension name and version.
|
131
|
+
#--------------------------------------------------------
|
132
|
+
def hb_framework
|
133
|
+
"middlemac-#{Gem.loaded_specs["middlemac"].version.version}"
|
134
|
+
end
|
135
|
+
|
136
|
+
|
137
|
+
#--------------------------------------------------------
|
138
|
+
# Returns the name of the configured partials directory
|
139
|
+
# to use by default with the `partials` helper, i.e., the
|
140
|
+
# value of `options[:partials_dir]`.
|
141
|
+
# @return [String] The path of the configured default
|
142
|
+
# partials directory.
|
143
|
+
#--------------------------------------------------------
|
144
|
+
def partials_dir
|
145
|
+
app.config[:partials_dir]
|
146
|
+
end
|
147
|
+
|
148
|
+
|
149
|
+
#--------------------------------------------------------
|
150
|
+
# Extends the built-in `partials` helper to allow the
|
151
|
+
# use of a default partials directory as configured with
|
152
|
+
# `options[:partials_dir]`. Middleman 4.0 removed the
|
153
|
+
# option `partials_dir` which increased flexibility a
|
154
|
+
# lot, but hurt backwards compatibility. When used the
|
155
|
+
# default location will be searched first for the
|
156
|
+
# specified partial; if not found then the built-in
|
157
|
+
# behavior will be used.
|
158
|
+
# @param [String] template The partial file to use.
|
159
|
+
# @param [Hash] opts Options to use for the partial.
|
160
|
+
# Consult **Middleman**’s documentation for possible
|
161
|
+
# options.
|
162
|
+
# @param [Block] block An option block as per the
|
163
|
+
# default implementation by **Middleman**.
|
164
|
+
# @group Extended Helpers
|
165
|
+
#--------------------------------------------------------
|
166
|
+
def partial(template, opts={}, &block)
|
167
|
+
file_name = extensions[:Middlemac].partial_impl(current_resource, template)
|
168
|
+
super(file_name, opts, &block)
|
169
|
+
end
|
170
|
+
|
171
|
+
|
172
|
+
#--------------------------------------------------------
|
173
|
+
# This helper provides CSS for every image in your
|
174
|
+
# project. Each image will have a declaration that sets
|
175
|
+
# `max-width` and `max-height` to the actual size of the
|
176
|
+
# image. Proper @2x image support is included. It’s most
|
177
|
+
# useful to use this helper in a `some_file.css.erb`
|
178
|
+
# file.
|
179
|
+
# @return [String] Returns a string with the CSS markup
|
180
|
+
# for every image found in your project.
|
181
|
+
#--------------------------------------------------------
|
182
|
+
def css_image_sizes
|
183
|
+
extensions[:Middlemac].md_sizes_impl
|
184
|
+
end
|
185
|
+
|
186
|
+
|
187
|
+
#--------------------------------------------------------
|
188
|
+
# This helper provides access to an index of images in
|
189
|
+
# Markdown reference format, enabling you to use
|
190
|
+
# reference-style images in documents. Because this
|
191
|
+
# helper includes literal Markdown, it’s only useful
|
192
|
+
# in Markdown documents.
|
193
|
+
# @return [String] Returns a string with the Markdown
|
194
|
+
# index of every image in your project.
|
195
|
+
#--------------------------------------------------------
|
196
|
+
def md_images
|
197
|
+
extensions[:Middlemac].md_images_impl(current_page)
|
198
|
+
end
|
199
|
+
|
200
|
+
|
201
|
+
#--------------------------------------------------------
|
202
|
+
# This helper provides access to an index of links in
|
203
|
+
# Markdown reference format, enabling you to use
|
204
|
+
# reference-style links in documents. Because this
|
205
|
+
# helper includes literal Markdown, it’s only useful
|
206
|
+
# in Markdown documents. These links are ready to use
|
207
|
+
# in modern Helpbooks.
|
208
|
+
# @return [String] Returns a string with the Markdown
|
209
|
+
# index of every page in your project.
|
210
|
+
#--------------------------------------------------------
|
211
|
+
def md_links
|
212
|
+
extensions[:Middlemac].md_links_impl(current_page)
|
213
|
+
end
|
214
|
+
|
215
|
+
|
216
|
+
#--------------------------------------------------------
|
217
|
+
# Returns a link in a form useful to helpbooks, i.e.,
|
218
|
+
# `#/hb_NavId`, so that Apple's Javascript can load the
|
219
|
+
# correct file. Simply specify the path to the HTML
|
220
|
+
# file, and the helper will return an acceptable link.
|
221
|
+
# @param [String] caption The text of the link.
|
222
|
+
# @param [String] url The path to the html file in the
|
223
|
+
# output hierarchy.
|
224
|
+
# @param [Hash] options Optional parameters to pass to
|
225
|
+
# the helper. Consult Middleman’s documentation for
|
226
|
+
# most of these.
|
227
|
+
# @option options [Boolean] :aside Returns the link in
|
228
|
+
# a format suitable for linking to a helpbook “aside”
|
229
|
+
# rather than the link to another page.
|
230
|
+
# @return [String] Returns an HTML `<a>` tag.
|
231
|
+
# @group Extended Helpers
|
232
|
+
#--------------------------------------------------------
|
233
|
+
def link_to(caption, url, options = {} )
|
234
|
+
|
235
|
+
unless url.is_a?(String)
|
236
|
+
return super caption, url, options
|
237
|
+
end
|
238
|
+
|
239
|
+
resource = extensions[:Middlemac]
|
240
|
+
.possible_assets_for_path(url, 'text/', current_page)
|
241
|
+
.find {|r| r.destination_path.end_with?(url[1..-1])}
|
242
|
+
|
243
|
+
if resource
|
244
|
+
if options[:aside]
|
245
|
+
options[:aside] = resource.hb_NavId
|
246
|
+
options[:class] = 'xRef Aside'
|
247
|
+
super caption, "#{resource.hb_NavId}.html##{resource.hb_NavId}", options
|
248
|
+
else
|
249
|
+
super caption, "#/#{resource.hb_NavId}", options
|
250
|
+
end
|
251
|
+
else
|
252
|
+
super caption, url, options
|
253
|
+
end
|
254
|
+
|
255
|
+
end
|
256
|
+
|
257
|
+
#--------------------------------------------------------
|
258
|
+
# Returns a link in the help:anchor:bookID format that
|
259
|
+
# Apple recommends in their documentation. Although
|
260
|
+
# they work, they’re not recommended:
|
261
|
+
# - Apple doesn’t use these in their own Help Books.
|
262
|
+
# - When served to a browser, Apple’s JavaScript removes
|
263
|
+
# the link (i.e., they don’t work) because it does not
|
264
|
+
# access the Help Index where the anchors are recorded.
|
265
|
+
# @param [String] caption The text of the link.
|
266
|
+
# @param [String] anchor The anchor to link to.
|
267
|
+
# @return [String] Returns an HTML `<a>` tag.
|
268
|
+
#--------------------------------------------------------
|
269
|
+
def link_to_anchor( caption, anchor )
|
270
|
+
"<a href='help:anchor=#{anchor} bookID=#{config[:targets][config[:target]][:CFBundleID]}'>#{caption}</a>"
|
271
|
+
end
|
272
|
+
|
273
|
+
|
274
|
+
#--------------------------------------------------------
|
275
|
+
# With the proper options enabled this helper extends
|
276
|
+
# the built-in functionality of **Middleman**’s helper
|
277
|
+
# in a couple of ways, as documented in the params
|
278
|
+
# hash.
|
279
|
+
#
|
280
|
+
# Note that Apple helpbooks embed nearly all `<img>`
|
281
|
+
# tags in a `<figure>`, so this is the default without
|
282
|
+
# the appropriate params, below.
|
283
|
+
# @param [String] path Specify path to the image file.
|
284
|
+
# @param [Hash] params Optional parameters to pass to
|
285
|
+
# the helper. **Middleman** (and other extensions)
|
286
|
+
# provide other parameters in addition to these.
|
287
|
+
# @option params [Boolean] :img_auto_extensions Allows
|
288
|
+
# control of the automatic image extensions option
|
289
|
+
# on a per-use basis.
|
290
|
+
# @option params [Boolean] :retina_srcset Allows control
|
291
|
+
# of the automatic @2x images feature on a per-use
|
292
|
+
# basis.
|
293
|
+
# @option params [Boolean] :figure Allows you to avoid
|
294
|
+
# the automatic framing of the image within a figure
|
295
|
+
# element, when set to `false`.
|
296
|
+
# @option params [String] :figure_class Specify the
|
297
|
+
# class, if any, to apply to the enclosing figure.
|
298
|
+
# @return [String] Returns an HTML `<img>` tag.
|
299
|
+
# @group Extended Helpers
|
300
|
+
#--------------------------------------------------------
|
301
|
+
def image_tag(path, params={})
|
302
|
+
|
303
|
+
params.symbolize_keys!
|
304
|
+
|
305
|
+
img_auto_extensions = extensions[:Middlemac].options[:img_auto_extensions]
|
306
|
+
img_auto_extensions = params.delete(:img_auto_extensions) if params.key?(:img_auto_extensions)
|
307
|
+
img_auto_extensions = nil if img_auto_extensions.empty?
|
308
|
+
|
309
|
+
magic_images = app.config[:target_magic_images]
|
310
|
+
magic_prefix = "#{app.config[:target_magic_word]}-"
|
311
|
+
wanted_prefix = "#{app.config[:target]}-"
|
312
|
+
|
313
|
+
retina_srcset = extensions[:Middlemac].options[:retina_srcset]
|
314
|
+
retina_srcset = params.delete(:retina_srcset) if params.key?(:retina_srcset)
|
315
|
+
|
316
|
+
figure = true
|
317
|
+
figure = params.delete(:figure) if params.key?(:figure)
|
318
|
+
figure_class = params[:figure_class] ? params.delete(:figure_class) : nil
|
319
|
+
|
320
|
+
|
321
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
322
|
+
# Setup our various lookup combinations, i.e., with or without
|
323
|
+
# extensions, and the possibility of target-specific images.
|
324
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
325
|
+
resource = nil
|
326
|
+
resource_alt = nil
|
327
|
+
|
328
|
+
srcPath = path;
|
329
|
+
srcPath_alt = path.sub(magic_prefix, wanted_prefix)
|
330
|
+
|
331
|
+
domain = extensions[:Middlemac].possible_assets_for_path(srcPath, 'image/', current_page)
|
332
|
+
domain_alt = extensions[:Middlemac].possible_assets_for_path(srcPath_alt, 'image/', current_page)
|
333
|
+
|
334
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
335
|
+
# Support images without extensions.
|
336
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
337
|
+
if img_auto_extensions && File.extname(srcPath) == ''
|
338
|
+
|
339
|
+
img_auto_extensions.reverse.each do |ext|
|
340
|
+
resource ||= domain.find {|r| r.destination_path.end_with?(srcPath[1..-1] + ext)}
|
341
|
+
end # each
|
342
|
+
|
343
|
+
else
|
344
|
+
|
345
|
+
resource = domain.find {|r| r.destination_path.end_with?(srcPath[1..-1])}
|
346
|
+
|
347
|
+
end
|
348
|
+
|
349
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
350
|
+
# Support possibility of target-specific images.
|
351
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
352
|
+
if magic_images && File.basename(srcPath).start_with?(magic_prefix)
|
353
|
+
|
354
|
+
if img_auto_extensions && File.extname(srcPath_alt) == ''
|
355
|
+
|
356
|
+
img_auto_extensions.reverse.each do |ext|
|
357
|
+
resource_alt ||= domain_alt.find {|r| r.destination_path.end_with?(srcPath_alt[1..-1] + ext)}
|
358
|
+
end # each
|
359
|
+
|
360
|
+
else
|
361
|
+
|
362
|
+
resource_alt = domain_alt.find {|r| r.destination_path.end_with?(srcPath_alt[1..-1])}
|
363
|
+
|
364
|
+
end
|
365
|
+
|
366
|
+
end
|
367
|
+
|
368
|
+
|
369
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
370
|
+
# We've got a resource and a resource_alt, maybe.
|
371
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
372
|
+
if resource_alt
|
373
|
+
path = resource_alt.destination_path
|
374
|
+
elsif resource
|
375
|
+
path = resource.destination_path
|
376
|
+
else
|
377
|
+
bn = File.basename(path, '.*')
|
378
|
+
path = path.sub(bn, "#{bn}-NOT_IN_SITEMAP" )
|
379
|
+
end
|
380
|
+
|
381
|
+
|
382
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
383
|
+
# Support automatic @2x, @3x, @4x image srcset.
|
384
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
385
|
+
if retina_srcset
|
386
|
+
|
387
|
+
sets = []
|
388
|
+
%w(@2x @3x @4x).each do |res|
|
389
|
+
|
390
|
+
test_path = path.sub(/#{File.extname(path)}/i, "#{res}#{File.extname(path)}")
|
391
|
+
|
392
|
+
if sitemap.resources.find {|r| r.destination_path == test_path}
|
393
|
+
sets << "#{test_path} #{res[1..-1]}"
|
394
|
+
end
|
395
|
+
|
396
|
+
end
|
397
|
+
|
398
|
+
if !sets.empty?
|
399
|
+
sets.unshift("#{path} 1x")
|
400
|
+
params[:srcset] ||= sets.join(', ')
|
401
|
+
end
|
402
|
+
|
403
|
+
end
|
404
|
+
|
405
|
+
|
406
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
407
|
+
# Support :figure
|
408
|
+
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
409
|
+
if figure
|
410
|
+
if figure_class
|
411
|
+
"<figure class='#{figure_class}'>\n #{super path, params}\n</figure>"
|
412
|
+
else
|
413
|
+
"<figure>\n #{super path, params}\n</figure>"
|
414
|
+
end
|
415
|
+
else
|
416
|
+
super path, params
|
417
|
+
end
|
418
|
+
|
419
|
+
end #image_tag
|
420
|
+
|
421
|
+
|
422
|
+
#--------------------------------------------------------
|
423
|
+
# This helper makes it easy to create a help book task.
|
424
|
+
# It supports markdown for the body of the task.
|
425
|
+
#
|
426
|
+
# @param [String] id Specify the id attribute for
|
427
|
+
# the containing `<div>`. Ensure that these are
|
428
|
+
# unique throughout your project so that open-closed
|
429
|
+
# states are preserved.
|
430
|
+
# @param [String] headline Specify the task’s label.
|
431
|
+
# Note that markdown and HTML are stripped away by
|
432
|
+
# Apple's scripts, and won’t influece the output.
|
433
|
+
# @param [Hash] options Optional parameters to pass to
|
434
|
+
# the helper.
|
435
|
+
# @option options [Boolean] :markdown By default, the
|
436
|
+
# helper expects that the &block contains markdown;
|
437
|
+
# be sure to set the :markdown option to `false` if
|
438
|
+
# this is not desired.
|
439
|
+
# @param [&block] block The content of the task.
|
440
|
+
# @return [String] Returns the complete task.
|
441
|
+
#--------------------------------------------------------
|
442
|
+
def helpbook_task(id, headline, options = nil, &block)
|
443
|
+
aria_id = "aria-#{id}"
|
444
|
+
captured = block_given? ? capture_html(&block) : nil
|
445
|
+
|
446
|
+
markdown = '1'
|
447
|
+
klass = 'Task'
|
448
|
+
if options
|
449
|
+
markdown = '0' if !options[:markdown]
|
450
|
+
klass = "Task #{options[:class]}" if options[:class]
|
451
|
+
end
|
452
|
+
|
453
|
+
content = <<-TASK
|
454
|
+
<div id='#{id}' class='#{klass}'>
|
455
|
+
<h2 class='Name' role='button' aria-controls='#{aria_id}'>
|
456
|
+
#{headline}
|
457
|
+
</h2>
|
458
|
+
<div class='TaskBody' role='region' id='#{aria_id}' markdown='#{markdown}'>
|
459
|
+
#{captured if captured}
|
460
|
+
</div>
|
461
|
+
</div>
|
462
|
+
TASK
|
463
|
+
|
464
|
+
concat_content(content)
|
465
|
+
end # helpbook_task
|
466
|
+
|
467
|
+
|
468
|
+
end #helpers
|
469
|
+
|
470
|
+
end # class Middlemac
|