nanoc 4.7.9 → 4.7.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +2 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +26 -27
- data/Guardfile +2 -0
- data/NEWS.md +11 -0
- data/README.md +1 -1
- data/Rakefile +2 -0
- data/bin/nanoc +2 -0
- data/lib/nanoc.rb +3 -1
- data/lib/nanoc/base.rb +2 -0
- data/lib/nanoc/base/contracts_support.rb +2 -0
- data/lib/nanoc/base/core_ext.rb +2 -0
- data/lib/nanoc/base/core_ext/array.rb +2 -0
- data/lib/nanoc/base/core_ext/hash.rb +2 -0
- data/lib/nanoc/base/core_ext/pathname.rb +2 -0
- data/lib/nanoc/base/core_ext/string.rb +2 -0
- data/lib/nanoc/base/entities.rb +2 -0
- data/lib/nanoc/base/entities/action_sequence.rb +2 -0
- data/lib/nanoc/base/entities/checksum_collection.rb +2 -0
- data/lib/nanoc/base/entities/code_snippet.rb +3 -0
- data/lib/nanoc/base/entities/configuration.rb +10 -3
- data/lib/nanoc/base/entities/content.rb +2 -0
- data/lib/nanoc/base/entities/context.rb +2 -0
- data/lib/nanoc/base/entities/dependency.rb +2 -0
- data/lib/nanoc/base/entities/directed_graph.rb +2 -0
- data/lib/nanoc/base/entities/document.rb +2 -0
- data/lib/nanoc/base/entities/identifiable_collection.rb +2 -0
- data/lib/nanoc/base/entities/identifier.rb +2 -0
- data/lib/nanoc/base/entities/item.rb +2 -0
- data/lib/nanoc/base/entities/item_rep.rb +2 -0
- data/lib/nanoc/base/entities/layout.rb +2 -0
- data/lib/nanoc/base/entities/lazy_value.rb +2 -0
- data/lib/nanoc/base/entities/outdatedness_reasons.rb +2 -0
- data/lib/nanoc/base/entities/outdatedness_status.rb +2 -0
- data/lib/nanoc/base/entities/pattern.rb +2 -0
- data/lib/nanoc/base/entities/processing_action.rb +2 -0
- data/lib/nanoc/base/entities/processing_actions.rb +2 -0
- data/lib/nanoc/base/entities/processing_actions/filter.rb +2 -0
- data/lib/nanoc/base/entities/processing_actions/layout.rb +2 -0
- data/lib/nanoc/base/entities/processing_actions/snapshot.rb +2 -0
- data/lib/nanoc/base/entities/props.rb +3 -1
- data/lib/nanoc/base/entities/site.rb +2 -0
- data/lib/nanoc/base/entities/snapshot_def.rb +2 -0
- data/lib/nanoc/base/error.rb +2 -0
- data/lib/nanoc/base/errors.rb +3 -1
- data/lib/nanoc/base/feature.rb +2 -0
- data/lib/nanoc/base/memoization.rb +2 -0
- data/lib/nanoc/base/repos.rb +2 -0
- data/lib/nanoc/base/repos/action_sequence_store.rb +2 -0
- data/lib/nanoc/base/repos/aggregate_data_source.rb +2 -0
- data/lib/nanoc/base/repos/checksum_store.rb +2 -0
- data/lib/nanoc/base/repos/compiled_content_cache.rb +2 -0
- data/lib/nanoc/base/repos/config_loader.rb +2 -0
- data/lib/nanoc/base/repos/data_source.rb +2 -0
- data/lib/nanoc/base/repos/dependency_store.rb +2 -0
- data/lib/nanoc/base/repos/in_mem_data_source.rb +2 -0
- data/lib/nanoc/base/repos/item_rep_repo.rb +2 -0
- data/lib/nanoc/base/repos/outdatedness_store.rb +2 -0
- data/lib/nanoc/base/repos/prefixed_data_source.rb +2 -0
- data/lib/nanoc/base/repos/site_loader.rb +2 -0
- data/lib/nanoc/base/repos/snapshot_repo.rb +2 -0
- data/lib/nanoc/base/repos/store.rb +2 -0
- data/lib/nanoc/base/services.rb +2 -0
- data/lib/nanoc/base/services/action_provider.rb +2 -0
- data/lib/nanoc/base/services/action_sequence_builder.rb +2 -0
- data/lib/nanoc/base/services/checksummer.rb +3 -1
- data/lib/nanoc/base/services/compilation_context.rb +2 -0
- data/lib/nanoc/base/services/compiler.rb +2 -0
- data/lib/nanoc/base/services/compiler/phases.rb +2 -0
- data/lib/nanoc/base/services/compiler/phases/abstract.rb +2 -0
- data/lib/nanoc/base/services/compiler/phases/cache.rb +2 -0
- data/lib/nanoc/base/services/compiler/phases/mark_done.rb +2 -0
- data/lib/nanoc/base/services/compiler/phases/recalculate.rb +2 -0
- data/lib/nanoc/base/services/compiler/phases/resume.rb +2 -0
- data/lib/nanoc/base/services/compiler/phases/write.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/build_reps.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/calculate_checksums.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/cleanup.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/compile_reps.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/determine_outdatedness.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/forget_outdated_dependencies.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/load_stores.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/postprocess.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/preprocess.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/prune.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/store_post_compilation_state.rb +2 -0
- data/lib/nanoc/base/services/compiler/stages/store_pre_compilation_state.rb +2 -0
- data/lib/nanoc/base/services/compiler_loader.rb +2 -0
- data/lib/nanoc/base/services/dependency_tracker.rb +2 -0
- data/lib/nanoc/base/services/executor.rb +2 -0
- data/lib/nanoc/base/services/filter.rb +3 -1
- data/lib/nanoc/base/services/item_rep_builder.rb +2 -0
- data/lib/nanoc/base/services/item_rep_router.rb +2 -0
- data/lib/nanoc/base/services/item_rep_selector.rb +2 -0
- data/lib/nanoc/base/services/item_rep_writer.rb +3 -1
- data/lib/nanoc/base/services/notification_center.rb +2 -0
- data/lib/nanoc/base/services/outdatedness_checker.rb +2 -0
- data/lib/nanoc/base/services/outdatedness_rule.rb +2 -0
- data/lib/nanoc/base/services/outdatedness_rules.rb +2 -0
- data/lib/nanoc/base/services/outdatedness_rules/attributes_modified.rb +2 -0
- data/lib/nanoc/base/services/outdatedness_rules/code_snippets_modified.rb +2 -0
- data/lib/nanoc/base/services/outdatedness_rules/configuration_modified.rb +2 -0
- data/lib/nanoc/base/services/outdatedness_rules/content_modified.rb +2 -0
- data/lib/nanoc/base/services/outdatedness_rules/not_written.rb +2 -0
- data/lib/nanoc/base/services/outdatedness_rules/rules_modified.rb +2 -0
- data/lib/nanoc/base/services/outdatedness_rules/uses_always_outdated_filter.rb +2 -0
- data/lib/nanoc/base/services/pruner.rb +4 -2
- data/lib/nanoc/base/services/temp_filename_factory.rb +2 -0
- data/lib/nanoc/base/views.rb +2 -0
- data/lib/nanoc/base/views/config_view.rb +2 -0
- data/lib/nanoc/base/views/identifiable_collection_view.rb +2 -0
- data/lib/nanoc/base/views/item_collection_with_reps_view.rb +2 -0
- data/lib/nanoc/base/views/item_collection_without_reps_view.rb +2 -0
- data/lib/nanoc/base/views/item_rep_collection_view.rb +2 -0
- data/lib/nanoc/base/views/item_rep_view.rb +2 -0
- data/lib/nanoc/base/views/item_with_reps_view.rb +2 -0
- data/lib/nanoc/base/views/item_without_reps_view.rb +2 -0
- data/lib/nanoc/base/views/layout_collection_view.rb +2 -0
- data/lib/nanoc/base/views/layout_view.rb +2 -0
- data/lib/nanoc/base/views/mixins/document_view_mixin.rb +2 -0
- data/lib/nanoc/base/views/mixins/mutable_document_view_mixin.rb +2 -0
- data/lib/nanoc/base/views/mixins/with_reps_view_mixin.rb +2 -0
- data/lib/nanoc/base/views/mutable_config_view.rb +2 -0
- data/lib/nanoc/base/views/mutable_identifiable_collection_view.rb +2 -0
- data/lib/nanoc/base/views/mutable_item_collection_view.rb +2 -0
- data/lib/nanoc/base/views/mutable_item_view.rb +2 -0
- data/lib/nanoc/base/views/mutable_layout_collection_view.rb +2 -0
- data/lib/nanoc/base/views/mutable_layout_view.rb +2 -0
- data/lib/nanoc/base/views/post_compile_item_collection_view.rb +2 -0
- data/lib/nanoc/base/views/post_compile_item_rep_collection_view.rb +2 -0
- data/lib/nanoc/base/views/post_compile_item_rep_view.rb +2 -0
- data/lib/nanoc/base/views/post_compile_item_view.rb +2 -0
- data/lib/nanoc/base/views/view.rb +2 -0
- data/lib/nanoc/base/views/view_context.rb +2 -0
- data/lib/nanoc/checking.rb +2 -0
- data/lib/nanoc/checking/check.rb +2 -0
- data/lib/nanoc/checking/checks.rb +2 -0
- data/lib/nanoc/checking/checks/css.rb +2 -0
- data/lib/nanoc/checking/checks/external_links.rb +3 -1
- data/lib/nanoc/checking/checks/html.rb +2 -0
- data/lib/nanoc/checking/checks/internal_links.rb +2 -0
- data/lib/nanoc/checking/checks/mixed_content.rb +2 -0
- data/lib/nanoc/checking/checks/stale.rb +2 -0
- data/lib/nanoc/checking/checks/w3c_validator.rb +2 -0
- data/lib/nanoc/checking/dsl.rb +2 -0
- data/lib/nanoc/checking/issue.rb +2 -0
- data/lib/nanoc/checking/runner.rb +2 -0
- data/lib/nanoc/cli.rb +2 -0
- data/lib/nanoc/cli/ansi_string_colorizer.rb +2 -0
- data/lib/nanoc/cli/cleaning_stream.rb +2 -0
- data/lib/nanoc/cli/command_runner.rb +2 -0
- data/lib/nanoc/cli/commands/check.rb +2 -0
- data/lib/nanoc/cli/commands/compile.rb +4 -2
- data/lib/nanoc/cli/commands/compile_listeners/abstract.rb +2 -0
- data/lib/nanoc/cli/commands/compile_listeners/debug_printer.rb +2 -0
- data/lib/nanoc/cli/commands/compile_listeners/diff_generator.rb +2 -0
- data/lib/nanoc/cli/commands/compile_listeners/file_action_printer.rb +2 -0
- data/lib/nanoc/cli/commands/compile_listeners/stack_prof_profiler.rb +3 -1
- data/lib/nanoc/cli/commands/compile_listeners/timing_recorder.rb +4 -14
- data/lib/nanoc/cli/commands/create-site.rb +229 -227
- data/lib/nanoc/cli/commands/deploy.rb +2 -0
- data/lib/nanoc/cli/commands/nanoc.rb +2 -0
- data/lib/nanoc/cli/commands/prune.rb +8 -6
- data/lib/nanoc/cli/commands/shell.rb +2 -0
- data/lib/nanoc/cli/commands/show-data.rb +6 -4
- data/lib/nanoc/cli/commands/show-plugins.rb +6 -4
- data/lib/nanoc/cli/commands/show-rules.rb +2 -0
- data/lib/nanoc/cli/commands/view.rb +6 -4
- data/lib/nanoc/cli/error_handler.rb +2 -0
- data/lib/nanoc/cli/logger.rb +2 -0
- data/lib/nanoc/cli/stream_cleaners.rb +2 -0
- data/lib/nanoc/cli/stream_cleaners/abstract.rb +2 -0
- data/lib/nanoc/cli/stream_cleaners/ansi_colors.rb +2 -0
- data/lib/nanoc/cli/stream_cleaners/utf8.rb +6 -1
- data/lib/nanoc/data_sources.rb +2 -0
- data/lib/nanoc/data_sources/filesystem.rb +2 -0
- data/lib/nanoc/data_sources/filesystem/errors.rb +2 -0
- data/lib/nanoc/data_sources/filesystem/tools.rb +2 -0
- data/lib/nanoc/deploying.rb +2 -0
- data/lib/nanoc/deploying/deployer.rb +2 -0
- data/lib/nanoc/deploying/deployers.rb +2 -0
- data/lib/nanoc/deploying/deployers/fog.rb +2 -0
- data/lib/nanoc/deploying/deployers/git.rb +2 -0
- data/lib/nanoc/deploying/deployers/rsync.rb +2 -0
- data/lib/nanoc/extra.rb +2 -0
- data/lib/nanoc/extra/core_ext.rb +2 -0
- data/lib/nanoc/extra/core_ext/pathname.rb +2 -0
- data/lib/nanoc/extra/core_ext/time.rb +2 -0
- data/lib/nanoc/extra/jruby_nokogiri_warner.rb +14 -12
- data/lib/nanoc/extra/link_collector.rb +2 -0
- data/lib/nanoc/extra/parallel_collection.rb +2 -0
- data/lib/nanoc/extra/piper.rb +2 -0
- data/lib/nanoc/filters.rb +2 -0
- data/lib/nanoc/filters/asciidoc.rb +2 -0
- data/lib/nanoc/filters/bluecloth.rb +2 -0
- data/lib/nanoc/filters/coffeescript.rb +2 -0
- data/lib/nanoc/filters/colorize_syntax.rb +3 -1
- data/lib/nanoc/filters/colorize_syntax/colorizers.rb +2 -0
- data/lib/nanoc/filters/erb.rb +2 -0
- data/lib/nanoc/filters/erubi.rb +2 -0
- data/lib/nanoc/filters/erubis.rb +2 -0
- data/lib/nanoc/filters/haml.rb +2 -0
- data/lib/nanoc/filters/handlebars.rb +2 -0
- data/lib/nanoc/filters/kramdown.rb +2 -0
- data/lib/nanoc/filters/less.rb +2 -0
- data/lib/nanoc/filters/markaby.rb +2 -0
- data/lib/nanoc/filters/maruku.rb +2 -0
- data/lib/nanoc/filters/mustache.rb +2 -0
- data/lib/nanoc/filters/pandoc.rb +2 -0
- data/lib/nanoc/filters/rainpress.rb +2 -0
- data/lib/nanoc/filters/rdiscount.rb +2 -0
- data/lib/nanoc/filters/rdoc.rb +2 -0
- data/lib/nanoc/filters/redcarpet.rb +2 -0
- data/lib/nanoc/filters/redcloth.rb +2 -0
- data/lib/nanoc/filters/relativize_paths.rb +8 -7
- data/lib/nanoc/filters/rubypants.rb +2 -0
- data/lib/nanoc/filters/sass.rb +2 -0
- data/lib/nanoc/filters/sass/sass_filesystem_importer.rb +2 -0
- data/lib/nanoc/filters/slim.rb +3 -1
- data/lib/nanoc/filters/typogruby.rb +2 -0
- data/lib/nanoc/filters/uglify_js.rb +2 -0
- data/lib/nanoc/filters/xsl.rb +2 -0
- data/lib/nanoc/filters/yui_compressor.rb +2 -0
- data/lib/nanoc/helpers.rb +2 -0
- data/lib/nanoc/helpers/blogging.rb +3 -1
- data/lib/nanoc/helpers/breadcrumbs.rb +2 -0
- data/lib/nanoc/helpers/capturing.rb +4 -2
- data/lib/nanoc/helpers/child_parent.rb +2 -0
- data/lib/nanoc/helpers/filtering.rb +2 -0
- data/lib/nanoc/helpers/html_escape.rb +2 -0
- data/lib/nanoc/helpers/link_to.rb +2 -0
- data/lib/nanoc/helpers/rendering.rb +2 -0
- data/lib/nanoc/helpers/tagging.rb +2 -0
- data/lib/nanoc/helpers/text.rb +2 -0
- data/lib/nanoc/helpers/xml_sitemap.rb +3 -1
- data/lib/nanoc/rule_dsl.rb +2 -0
- data/lib/nanoc/rule_dsl/action_provider.rb +2 -0
- data/lib/nanoc/rule_dsl/action_sequence_calculator.rb +2 -0
- data/lib/nanoc/rule_dsl/compiler_dsl.rb +4 -1
- data/lib/nanoc/rule_dsl/recording_executor.rb +2 -0
- data/lib/nanoc/rule_dsl/rule.rb +2 -0
- data/lib/nanoc/rule_dsl/rule_context.rb +2 -0
- data/lib/nanoc/rule_dsl/rules_collection.rb +2 -0
- data/lib/nanoc/rule_dsl/rules_loader.rb +2 -0
- data/lib/nanoc/spec.rb +3 -1
- data/lib/nanoc/telemetry.rb +4 -0
- data/lib/nanoc/telemetry/counter.rb +2 -0
- data/lib/nanoc/telemetry/labelled_counter.rb +2 -0
- data/lib/nanoc/telemetry/labelled_summary.rb +2 -0
- data/lib/nanoc/telemetry/registry.rb +2 -0
- data/lib/nanoc/telemetry/stopwatch.rb +2 -0
- data/lib/nanoc/telemetry/summary.rb +2 -0
- data/lib/nanoc/telemetry/table.rb +35 -0
- data/lib/nanoc/version.rb +3 -1
- data/nanoc.gemspec +2 -0
- data/spec/contributors_spec.rb +2 -0
- data/spec/nanoc/base/checksummer_spec.rb +2 -0
- data/spec/nanoc/base/compiler_spec.rb +2 -0
- data/spec/nanoc/base/directed_graph_spec.rb +2 -0
- data/spec/nanoc/base/entities/action_sequence_spec.rb +2 -0
- data/spec/nanoc/base/entities/code_snippet_spec.rb +51 -0
- data/spec/nanoc/base/entities/configuration_spec.rb +15 -0
- data/spec/nanoc/base/entities/content_spec.rb +2 -0
- data/spec/nanoc/base/entities/document_spec.rb +2 -0
- data/spec/nanoc/base/entities/identifiable_collection_spec.rb +2 -0
- data/spec/nanoc/base/entities/identifier_spec.rb +2 -0
- data/spec/nanoc/base/entities/item_rep_spec.rb +2 -0
- data/spec/nanoc/base/entities/item_spec.rb +2 -0
- data/spec/nanoc/base/entities/layout_spec.rb +2 -0
- data/spec/nanoc/base/entities/lazy_value_spec.rb +3 -1
- data/spec/nanoc/base/entities/outdatedness_status_spec.rb +2 -0
- data/spec/nanoc/base/entities/pattern_spec.rb +2 -0
- data/spec/nanoc/base/entities/processing_action_spec.rb +2 -0
- data/spec/nanoc/base/entities/processing_actions/filter_spec.rb +2 -0
- data/spec/nanoc/base/entities/processing_actions/layout_spec.rb +2 -0
- data/spec/nanoc/base/entities/processing_actions/snapshot_spec.rb +2 -0
- data/spec/nanoc/base/entities/props_spec.rb +2 -0
- data/spec/nanoc/base/entities/site_spec.rb +2 -0
- data/spec/nanoc/base/errors/dependency_cycle_spec.rb +8 -6
- data/spec/nanoc/base/feature_spec.rb +4 -2
- data/spec/nanoc/base/filter_spec.rb +2 -0
- data/spec/nanoc/base/item_rep_writer_spec.rb +2 -0
- data/spec/nanoc/base/memoization_spec.rb +2 -0
- data/spec/nanoc/base/repos/checksum_store_spec.rb +2 -0
- data/spec/nanoc/base/repos/compiled_content_cache_spec.rb +2 -0
- data/spec/nanoc/base/repos/config_loader_spec.rb +2 -0
- data/spec/nanoc/base/repos/dependency_store_spec.rb +2 -0
- data/spec/nanoc/base/repos/outdatedness_store_spec.rb +2 -0
- data/spec/nanoc/base/repos/site_loader_spec.rb +2 -0
- data/spec/nanoc/base/repos/snapshot_repo_spec.rb +2 -0
- data/spec/nanoc/base/repos/store_spec.rb +2 -0
- data/spec/nanoc/base/services/compiler/phases/abstract_spec.rb +2 -0
- data/spec/nanoc/base/services/compiler/phases/cache_spec.rb +2 -0
- data/spec/nanoc/base/services/compiler/stages/calculate_checksums_spec.rb +2 -0
- data/spec/nanoc/base/services/compiler/stages/cleanup_spec.rb +2 -0
- data/spec/nanoc/base/services/compiler/stages/compile_reps_spec.rb +2 -0
- data/spec/nanoc/base/services/dependency_tracker_spec.rb +2 -0
- data/spec/nanoc/base/services/executor_spec.rb +2 -0
- data/spec/nanoc/base/services/item_rep_router_spec.rb +2 -0
- data/spec/nanoc/base/services/item_rep_selector_spec.rb +2 -0
- data/spec/nanoc/base/services/outdatedness_checker_spec.rb +2 -0
- data/spec/nanoc/base/services/outdatedness_rules_spec.rb +2 -0
- data/spec/nanoc/base/services/pruner_spec.rb +2 -0
- data/spec/nanoc/base/services/temp_filename_factory_spec.rb +2 -0
- data/spec/nanoc/base/views/config_view_spec.rb +2 -0
- data/spec/nanoc/base/views/document_view_spec.rb +2 -0
- data/spec/nanoc/base/views/identifiable_collection_view_spec.rb +2 -0
- data/spec/nanoc/base/views/item_collection_with_reps_view_spec.rb +2 -0
- data/spec/nanoc/base/views/item_collection_without_reps_view_spec.rb +2 -0
- data/spec/nanoc/base/views/item_rep_collection_view_spec.rb +2 -0
- data/spec/nanoc/base/views/item_rep_view_spec.rb +2 -0
- data/spec/nanoc/base/views/item_view_spec.rb +2 -0
- data/spec/nanoc/base/views/layout_collection_view_spec.rb +2 -0
- data/spec/nanoc/base/views/layout_view_spec.rb +2 -0
- data/spec/nanoc/base/views/mutable_config_view_spec.rb +2 -0
- data/spec/nanoc/base/views/mutable_document_view_spec.rb +2 -0
- data/spec/nanoc/base/views/mutable_identifiable_collection_view_spec.rb +2 -0
- data/spec/nanoc/base/views/mutable_item_collection_view_spec.rb +2 -0
- data/spec/nanoc/base/views/mutable_item_view_spec.rb +2 -0
- data/spec/nanoc/base/views/mutable_layout_collection_view_spec.rb +2 -0
- data/spec/nanoc/base/views/mutable_layout_view_spec.rb +2 -0
- data/spec/nanoc/base/views/post_compile_item_rep_collection_view_spec.rb +2 -0
- data/spec/nanoc/base/views/post_compile_item_rep_view_spec.rb +2 -0
- data/spec/nanoc/base/views/post_compile_item_view_spec.rb +2 -0
- data/spec/nanoc/cli/commands/compile/diff_generator_spec.rb +2 -0
- data/spec/nanoc/cli/commands/compile/file_action_printer_spec.rb +2 -0
- data/spec/nanoc/cli/commands/compile/timing_recorder_spec.rb +2 -0
- data/spec/nanoc/cli/commands/compile_spec.rb +2 -0
- data/spec/nanoc/cli/commands/deploy_spec.rb +2 -0
- data/spec/nanoc/cli/commands/shell_spec.rb +8 -0
- data/spec/nanoc/cli/commands/show_data_spec.rb +2 -0
- data/spec/nanoc/cli/commands/show_plugins_spec.rb +2 -0
- data/spec/nanoc/cli/commands/show_rules_spec.rb +2 -0
- data/spec/nanoc/cli/commands/view_spec.rb +2 -0
- data/spec/nanoc/cli/stream_cleaners/utf8_spec.rb +2 -0
- data/spec/nanoc/data_sources/filesystem_spec.rb +2 -0
- data/spec/nanoc/deploying/fog_spec.rb +2 -0
- data/spec/nanoc/deploying/git_spec.rb +5 -2
- data/spec/nanoc/extra/parallel_collection_spec.rb +2 -0
- data/spec/nanoc/filters/colorize_syntax/rouge_spec.rb +61 -59
- data/spec/nanoc/filters/less_spec.rb +2 -0
- data/spec/nanoc/helpers/blogging_spec.rb +2 -0
- data/spec/nanoc/helpers/breadcrumbs_spec.rb +2 -0
- data/spec/nanoc/helpers/capturing_spec.rb +6 -4
- data/spec/nanoc/helpers/child_parent_spec.rb +2 -0
- data/spec/nanoc/helpers/filtering_spec.rb +2 -0
- data/spec/nanoc/helpers/html_escape_spec.rb +3 -1
- data/spec/nanoc/helpers/link_to_spec.rb +2 -0
- data/spec/nanoc/helpers/rendering_spec.rb +2 -0
- data/spec/nanoc/helpers/tagging_spec.rb +2 -0
- data/spec/nanoc/helpers/text_spec.rb +2 -0
- data/spec/nanoc/integration/compile_command_spec.rb +6 -4
- data/spec/nanoc/integration/outdatedness_integration_spec.rb +36 -34
- data/spec/nanoc/integration/partial_recompilation_spec.rb +10 -8
- data/spec/nanoc/regressions/gh_1015_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1022_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1031_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1035_spec.rb +10 -8
- data/spec/nanoc/regressions/gh_1037a_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1037b_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1040_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1045_spec.rb +14 -12
- data/spec/nanoc/regressions/gh_1047_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1064_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1067_spec.rb +8 -6
- data/spec/nanoc/regressions/gh_1082a_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1082b_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1082c_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1082d_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1093_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1094_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1097_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1100_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1102_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1107_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_1130_spec.rb +8 -6
- data/spec/nanoc/regressions/gh_1134_spec.rb +8 -6
- data/spec/nanoc/regressions/gh_1145_spec.rb +7 -5
- data/spec/nanoc/regressions/gh_1171_spec.rb +17 -15
- data/spec/nanoc/regressions/gh_761_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_767_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_769_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_776_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_787_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_795_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_804_spec.rb +7 -5
- data/spec/nanoc/regressions/gh_807_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_809_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_813_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_815_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_828_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_833_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_841_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_867_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_882_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_885_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_891_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_913_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_924_spec.rb +58 -56
- data/spec/nanoc/regressions/gh_928_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_937_spec.rb +7 -5
- data/spec/nanoc/regressions/gh_942_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_947_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_948_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_951_spec.rb +2 -0
- data/spec/nanoc/regressions/gh_954_spec.rb +14 -12
- data/spec/nanoc/regressions/gh_970a_spec.rb +6 -4
- data/spec/nanoc/regressions/gh_970b_spec.rb +10 -8
- data/spec/nanoc/regressions/gh_974_spec.rb +6 -4
- data/spec/nanoc/regressions/gh_981_spec.rb +2 -0
- data/spec/nanoc/rule_dsl/action_sequence_calculator_spec.rb +2 -0
- data/spec/nanoc/rule_dsl/recording_executor_spec.rb +2 -0
- data/spec/nanoc/rule_dsl/rule_context_spec.rb +2 -0
- data/spec/nanoc/rule_dsl/rules_collection_spec.rb +2 -0
- data/spec/nanoc/spec_spec.rb +2 -0
- data/spec/nanoc/telemetry/counter_spec.rb +2 -0
- data/spec/nanoc/telemetry/labelled_counter_spec.rb +2 -0
- data/spec/nanoc/telemetry/labelled_summary_spec.rb +2 -0
- data/spec/nanoc/telemetry/stopwatch_spec.rb +2 -0
- data/spec/nanoc/telemetry/summary_spec.rb +2 -0
- data/spec/nanoc/telemetry_spec.rb +2 -0
- data/spec/regression_filenames_spec.rb +3 -1
- data/spec/spec_helper.rb +2 -0
- data/test/base/core_ext/array_spec.rb +2 -0
- data/test/base/core_ext/hash_spec.rb +2 -0
- data/test/base/core_ext/string_spec.rb +2 -0
- data/test/base/test_code_snippet.rb +2 -0
- data/test/base/test_compiler.rb +2 -0
- data/test/base/test_context.rb +2 -0
- data/test/base/test_data_source.rb +2 -0
- data/test/base/test_dependency_tracker.rb +2 -0
- data/test/base/test_directed_graph.rb +2 -0
- data/test/base/test_filter.rb +2 -0
- data/test/base/test_item.rb +2 -0
- data/test/base/test_item_array.rb +2 -0
- data/test/base/test_layout.rb +2 -0
- data/test/base/test_notification_center.rb +2 -0
- data/test/base/test_site.rb +17 -15
- data/test/base/test_store.rb +2 -0
- data/test/checking/checks/test_css.rb +2 -0
- data/test/checking/checks/test_external_links.rb +2 -0
- data/test/checking/checks/test_html.rb +2 -0
- data/test/checking/checks/test_internal_links.rb +2 -0
- data/test/checking/checks/test_mixed_content.rb +2 -0
- data/test/checking/checks/test_stale.rb +2 -0
- data/test/checking/test_check.rb +2 -0
- data/test/checking/test_dsl.rb +2 -0
- data/test/checking/test_runner.rb +2 -0
- data/test/cli/commands/test_check.rb +2 -0
- data/test/cli/commands/test_compile.rb +2 -0
- data/test/cli/commands/test_create_site.rb +2 -0
- data/test/cli/commands/test_help.rb +2 -0
- data/test/cli/commands/test_info.rb +2 -0
- data/test/cli/commands/test_prune.rb +2 -0
- data/test/cli/test_cleaning_stream.rb +2 -0
- data/test/cli/test_cli.rb +16 -14
- data/test/cli/test_error_handler.rb +2 -0
- data/test/cli/test_logger.rb +2 -0
- data/test/data_sources/test_filesystem.rb +2 -0
- data/test/data_sources/test_filesystem_tools.rb +2 -0
- data/test/deploying/test_fog.rb +2 -0
- data/test/deploying/test_git.rb +33 -31
- data/test/deploying/test_rsync.rb +2 -0
- data/test/extra/core_ext/test_pathname.rb +2 -0
- data/test/extra/core_ext/test_time.rb +2 -0
- data/test/extra/test_link_collector.rb +2 -0
- data/test/extra/test_piper.rb +2 -0
- data/test/filters/colorize_syntax/test_coderay.rb +43 -41
- data/test/filters/colorize_syntax/test_common.rb +24 -22
- data/test/filters/colorize_syntax/test_pygmentize.rb +2 -0
- data/test/filters/colorize_syntax/test_pygments.rb +2 -0
- data/test/filters/colorize_syntax/test_simon.rb +2 -0
- data/test/filters/test_asciidoc.rb +2 -0
- data/test/filters/test_bluecloth.rb +2 -0
- data/test/filters/test_coffeescript.rb +2 -0
- data/test/filters/test_erb.rb +2 -0
- data/test/filters/test_erubi.rb +2 -0
- data/test/filters/test_erubis.rb +2 -0
- data/test/filters/test_haml.rb +2 -0
- data/test/filters/test_handlebars.rb +2 -0
- data/test/filters/test_kramdown.rb +2 -0
- data/test/filters/test_markaby.rb +2 -0
- data/test/filters/test_maruku.rb +2 -0
- data/test/filters/test_mustache.rb +2 -0
- data/test/filters/test_pandoc.rb +2 -0
- data/test/filters/test_rainpress.rb +2 -0
- data/test/filters/test_rdiscount.rb +2 -0
- data/test/filters/test_rdoc.rb +2 -0
- data/test/filters/test_redcarpet.rb +2 -0
- data/test/filters/test_redcloth.rb +2 -0
- data/test/filters/test_relativize_paths.rb +52 -50
- data/test/filters/test_rubypants.rb +2 -0
- data/test/filters/test_sass.rb +2 -0
- data/test/filters/test_slim.rb +26 -0
- data/test/filters/test_typogruby.rb +2 -0
- data/test/filters/test_uglify_js.rb +2 -0
- data/test/filters/test_xsl.rb +64 -62
- data/test/filters/test_yui_compressor.rb +2 -0
- data/test/helper.rb +20 -13
- data/test/helpers/test_blogging.rb +2 -0
- data/test/helpers/test_capturing.rb +12 -10
- data/test/helpers/test_link_to.rb +2 -0
- data/test/helpers/test_xml_sitemap.rb +2 -0
- data/test/rule_dsl/test_action_provider.rb +2 -0
- data/test/rule_dsl/test_compiler_dsl.rb +42 -40
- data/test/rule_dsl/test_rule.rb +2 -0
- data/test/rule_dsl/test_rules_collection.rb +2 -0
- data/test/test_gem.rb +2 -0
- metadata +5 -3
data/lib/nanoc/cli.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
usage 'compile [options]'
|
2
4
|
summary 'compile items of this site'
|
3
|
-
description
|
4
|
-
Compile all items of the current site.
|
5
|
+
description <<~EOS
|
6
|
+
Compile all items of the current site.
|
5
7
|
EOS
|
6
8
|
flag nil, :profile, 'profile compilation' if Nanoc::Feature.enabled?(Nanoc::Feature::PROFILER)
|
7
9
|
flag nil, :diff, 'generate diff'
|
@@ -1,6 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Nanoc::CLI::Commands::CompileListeners
|
2
4
|
class StackProfProfiler < Abstract
|
3
|
-
PROFILE_FILE = 'tmp/stackprof_profile'
|
5
|
+
PROFILE_FILE = 'tmp/stackprof_profile'
|
4
6
|
|
5
7
|
# @see Listener#enable_for?
|
6
8
|
def self.enable_for?(command_runner)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Nanoc::CLI::Commands::CompileListeners
|
2
4
|
class TimingRecorder < Abstract
|
3
5
|
attr_reader :telemetry
|
@@ -193,20 +195,8 @@ module Nanoc::CLI::Commands::CompileListeners
|
|
193
195
|
print_table(table_for_memoization)
|
194
196
|
end
|
195
197
|
|
196
|
-
def print_table(
|
197
|
-
|
198
|
-
|
199
|
-
print_row(table[0], lengths)
|
200
|
-
|
201
|
-
puts "#{'─' * lengths[0]}─┼─#{lengths[1..-1].map { |length| '─' * length }.join('───')}"
|
202
|
-
|
203
|
-
table[1..-1].each { |row| print_row(row, lengths) }
|
204
|
-
end
|
205
|
-
|
206
|
-
def print_row(row, lengths)
|
207
|
-
values = row.zip(lengths).map { |text, length| text.rjust length }
|
208
|
-
|
209
|
-
puts values[0] + ' │ ' + values[1..-1].join(' ')
|
198
|
+
def print_table(rows)
|
199
|
+
puts Nanoc::Telemetry::Table.new(rows).to_s
|
210
200
|
end
|
211
201
|
end
|
212
202
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
usage 'create-site [options] path'
|
2
4
|
aliases :create_site, :cs
|
3
5
|
summary 'create a site'
|
@@ -15,281 +17,281 @@ module Nanoc::CLI::Commands
|
|
15
17
|
end
|
16
18
|
end
|
17
19
|
|
18
|
-
DEFAULT_CONFIG =
|
19
|
-
# The syntax to use for patterns in the Rules file. Can be either `"glob"`
|
20
|
-
# (default) or `"legacy"`. The former will enable glob patterns, which behave
|
21
|
-
# like Ruby’s File.fnmatch. The latter will enable Nanoc 3.x-style patterns.
|
22
|
-
string_pattern_type: glob
|
23
|
-
|
24
|
-
# A list of file extensions that Nanoc will consider to be textual rather than
|
25
|
-
# binary. If an item with an extension not in this list is found, the file
|
26
|
-
# will be considered as binary.
|
27
|
-
text_extensions: #{array_to_yaml(Nanoc::Int::Configuration::DEFAULT_CONFIG[:text_extensions])}
|
28
|
-
|
29
|
-
# The path to the directory where all generated files will be written to. This
|
30
|
-
# can be an absolute path starting with a slash, but it can also be path
|
31
|
-
# relative to the site directory.
|
32
|
-
output_dir: #{Nanoc::Int::Configuration::DEFAULT_CONFIG[:output_dir]}
|
33
|
-
|
34
|
-
# A list of index filenames, i.e. names of files that will be served by a web
|
35
|
-
# server when a directory is requested. Usually, index files are named
|
36
|
-
# “index.html”, but depending on the web server, this may be something else,
|
37
|
-
# such as “default.htm”. This list is used by Nanoc to generate pretty URLs.
|
38
|
-
index_filenames: #{array_to_yaml(Nanoc::Int::Configuration::DEFAULT_CONFIG[:index_filenames])}
|
39
|
-
|
40
|
-
# Whether or not to generate a diff of the compiled content when compiling a
|
41
|
-
# site. The diff will contain the differences between the compiled content
|
42
|
-
# before and after the last site compilation.
|
43
|
-
enable_output_diff: false
|
44
|
-
|
45
|
-
prune:
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
# The data sources where Nanoc loads its data from. This is an array of
|
56
|
-
# hashes; each array element represents a single data source. By default,
|
57
|
-
# there is only a single data source that reads data from the “content/” and
|
58
|
-
# “layout/” directories in the site directory.
|
59
|
-
data_sources:
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
# Configuration for the “check” command, which run unit tests on the site.
|
85
|
-
checks:
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
20
|
+
DEFAULT_CONFIG = <<~EOS unless defined? DEFAULT_CONFIG
|
21
|
+
# The syntax to use for patterns in the Rules file. Can be either `"glob"`
|
22
|
+
# (default) or `"legacy"`. The former will enable glob patterns, which behave
|
23
|
+
# like Ruby’s File.fnmatch. The latter will enable Nanoc 3.x-style patterns.
|
24
|
+
string_pattern_type: glob
|
25
|
+
|
26
|
+
# A list of file extensions that Nanoc will consider to be textual rather than
|
27
|
+
# binary. If an item with an extension not in this list is found, the file
|
28
|
+
# will be considered as binary.
|
29
|
+
text_extensions: #{array_to_yaml(Nanoc::Int::Configuration::DEFAULT_CONFIG[:text_extensions])}
|
30
|
+
|
31
|
+
# The path to the directory where all generated files will be written to. This
|
32
|
+
# can be an absolute path starting with a slash, but it can also be path
|
33
|
+
# relative to the site directory.
|
34
|
+
output_dir: #{Nanoc::Int::Configuration::DEFAULT_CONFIG[:output_dir]}
|
35
|
+
|
36
|
+
# A list of index filenames, i.e. names of files that will be served by a web
|
37
|
+
# server when a directory is requested. Usually, index files are named
|
38
|
+
# “index.html”, but depending on the web server, this may be something else,
|
39
|
+
# such as “default.htm”. This list is used by Nanoc to generate pretty URLs.
|
40
|
+
index_filenames: #{array_to_yaml(Nanoc::Int::Configuration::DEFAULT_CONFIG[:index_filenames])}
|
41
|
+
|
42
|
+
# Whether or not to generate a diff of the compiled content when compiling a
|
43
|
+
# site. The diff will contain the differences between the compiled content
|
44
|
+
# before and after the last site compilation.
|
45
|
+
enable_output_diff: false
|
46
|
+
|
47
|
+
prune:
|
48
|
+
# Whether to automatically remove files not managed by Nanoc from the output
|
49
|
+
# directory.
|
50
|
+
auto_prune: true
|
51
|
+
|
52
|
+
# Which files and directories you want to exclude from pruning. If you version
|
53
|
+
# your output directory, you should probably exclude VCS directories such as
|
54
|
+
# .git, .svn etc.
|
55
|
+
exclude: [ '.git', '.hg', '.svn', 'CVS' ]
|
56
|
+
|
57
|
+
# The data sources where Nanoc loads its data from. This is an array of
|
58
|
+
# hashes; each array element represents a single data source. By default,
|
59
|
+
# there is only a single data source that reads data from the “content/” and
|
60
|
+
# “layout/” directories in the site directory.
|
61
|
+
data_sources:
|
62
|
+
-
|
63
|
+
# The type is the identifier of the data source.
|
64
|
+
type: #{Nanoc::Int::Configuration::DEFAULT_DATA_SOURCE_CONFIG[:type]}
|
65
|
+
|
66
|
+
# The path where items should be mounted (comparable to mount points in
|
67
|
+
# Unix-like systems). This is “/” by default, meaning that items will have
|
68
|
+
# “/” prefixed to their identifiers. If the items root were “/en/”
|
69
|
+
# instead, an item at content/about.html would have an identifier of
|
70
|
+
# “/en/about/” instead of just “/about/”.
|
71
|
+
items_root: #{Nanoc::Int::Configuration::DEFAULT_DATA_SOURCE_CONFIG[:items_root]}
|
72
|
+
|
73
|
+
# The path where layouts should be mounted. The layouts root behaves the
|
74
|
+
# same as the items root, but applies to layouts rather than items.
|
75
|
+
layouts_root: #{Nanoc::Int::Configuration::DEFAULT_DATA_SOURCE_CONFIG[:layouts_root]}
|
76
|
+
|
77
|
+
# The encoding to use for input files. If your input files are not in
|
78
|
+
# UTF-8 (which they should be!), change this.
|
79
|
+
encoding: utf-8
|
80
|
+
|
81
|
+
# The kind of identifier to use for items and layouts. The default is
|
82
|
+
# “full”, meaning that identifiers include file extensions. This can also
|
83
|
+
# be “legacy”, primarily used by older Nanoc sites.
|
84
|
+
identifier_type: full
|
85
|
+
|
86
|
+
# Configuration for the “check” command, which run unit tests on the site.
|
87
|
+
checks:
|
88
|
+
# Configuration for the “internal_links” checker, which checks whether all
|
89
|
+
# internal links are valid.
|
90
|
+
internal_links:
|
91
|
+
# A list of patterns, specified as regular expressions, to exclude from the check.
|
92
|
+
# If an internal link matches this pattern, the validity check will be skipped.
|
93
|
+
# E.g.:
|
94
|
+
# exclude: ['^/server_status']
|
95
|
+
exclude: []
|
96
|
+
|
97
|
+
# Configuration for the “external_links” checker, which checks whether all
|
98
|
+
# external links are valid.
|
99
|
+
external_links:
|
100
|
+
# A list of patterns, specified as regular expressions, to exclude from the check.
|
101
|
+
# If an external link matches this pattern, the validity check will be skipped.
|
102
|
+
# E.g.:
|
103
|
+
# exclude: ['^http://example.com$']
|
104
|
+
exclude: []
|
105
|
+
|
106
|
+
# A list of file patterns, specified as regular expressions, to exclude from the check.
|
107
|
+
# If a file matches this pattern, the links from this file will not be checked.
|
108
|
+
# E.g.:
|
109
|
+
# exclude_files: ['blog/page']
|
110
|
+
exclude_files: []
|
109
111
|
EOS
|
110
112
|
|
111
|
-
DEFAULT_RULES =
|
112
|
-
#!/usr/bin/env ruby
|
113
|
+
DEFAULT_RULES = <<~EOS unless defined? DEFAULT_RULES
|
114
|
+
#!/usr/bin/env ruby
|
113
115
|
|
114
|
-
compile '/**/*.html' do
|
115
|
-
|
116
|
-
end
|
116
|
+
compile '/**/*.html' do
|
117
|
+
layout '/default.*'
|
118
|
+
end
|
117
119
|
|
118
|
-
# This is an example rule that matches Markdown (.md) files, and filters them
|
119
|
-
# using the :kramdown filter. It is commented out by default, because kramdown
|
120
|
-
# is not bundled with Nanoc or Ruby.
|
121
|
-
#
|
122
|
-
#compile '/**/*.md' do
|
123
|
-
# filter :kramdown
|
124
|
-
# layout '/default.*'
|
125
|
-
#end
|
126
|
-
|
127
|
-
route '/**/*.{html,md}' do
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
end
|
120
|
+
# This is an example rule that matches Markdown (.md) files, and filters them
|
121
|
+
# using the :kramdown filter. It is commented out by default, because kramdown
|
122
|
+
# is not bundled with Nanoc or Ruby.
|
123
|
+
#
|
124
|
+
#compile '/**/*.md' do
|
125
|
+
# filter :kramdown
|
126
|
+
# layout '/default.*'
|
127
|
+
#end
|
128
|
+
|
129
|
+
route '/**/*.{html,md}' do
|
130
|
+
if item.identifier =~ '/index.*'
|
131
|
+
'/index.html'
|
132
|
+
else
|
133
|
+
item.identifier.without_ext + '/index.html'
|
134
|
+
end
|
135
|
+
end
|
134
136
|
|
135
|
-
compile '/**/*' do
|
136
|
-
|
137
|
-
end
|
137
|
+
compile '/**/*' do
|
138
|
+
write item.identifier.to_s
|
139
|
+
end
|
138
140
|
|
139
|
-
layout '/**/*', :erb
|
141
|
+
layout '/**/*', :erb
|
140
142
|
EOS
|
141
143
|
|
142
|
-
DEFAULT_ITEM =
|
143
|
-
---
|
144
|
-
title: Home
|
145
|
-
---
|
144
|
+
DEFAULT_ITEM = <<~EOS unless defined? DEFAULT_ITEM
|
145
|
+
---
|
146
|
+
title: Home
|
147
|
+
---
|
146
148
|
|
147
|
-
<h1>A Brand New Nanoc Site</h1>
|
149
|
+
<h1>A Brand New Nanoc Site</h1>
|
148
150
|
|
149
|
-
<p>You’ve just created a new Nanoc site. The page you are looking at right now is the home page for your site. To get started, consider replacing this default homepage with your own customized homepage. Some pointers on how to do so:</p>
|
151
|
+
<p>You’ve just created a new Nanoc site. The page you are looking at right now is the home page for your site. To get started, consider replacing this default homepage with your own customized homepage. Some pointers on how to do so:</p>
|
150
152
|
|
151
|
-
<ul>
|
152
|
-
|
153
|
-
|
154
|
-
</ul>
|
153
|
+
<ul>
|
154
|
+
<li><p><strong>Change this page’s content</strong> by editing the “index.html” file in the “content” directory. This is the actual page content, and therefore doesn’t include the header, sidebar or style information (those are part of the layout).</p></li>
|
155
|
+
<li><p><strong>Change the layout</strong>, which is the “default.html” file in the “layouts” directory, and create something unique (and hopefully less bland).</p></li>
|
156
|
+
</ul>
|
155
157
|
|
156
|
-
<p>If you need any help with customizing your Nanoc web site, be sure to check out the documentation (see sidebar), and be sure to subscribe to the discussion group (also see sidebar). Enjoy!</p>
|
158
|
+
<p>If you need any help with customizing your Nanoc web site, be sure to check out the documentation (see sidebar), and be sure to subscribe to the discussion group (also see sidebar). Enjoy!</p>
|
157
159
|
EOS
|
158
160
|
|
159
|
-
DEFAULT_STYLESHEET =
|
160
|
-
* {
|
161
|
-
|
162
|
-
|
161
|
+
DEFAULT_STYLESHEET = <<~EOS unless defined? DEFAULT_STYLESHEET
|
162
|
+
* {
|
163
|
+
margin: 0;
|
164
|
+
padding: 0;
|
163
165
|
|
164
|
-
|
165
|
-
}
|
166
|
+
font-family: Georgia, Palatino, serif;
|
167
|
+
}
|
166
168
|
|
167
|
-
body {
|
168
|
-
|
169
|
-
}
|
169
|
+
body {
|
170
|
+
background: #fff;
|
171
|
+
}
|
170
172
|
|
171
|
-
a {
|
172
|
-
|
173
|
-
}
|
173
|
+
a {
|
174
|
+
text-decoration: none;
|
175
|
+
}
|
174
176
|
|
175
|
-
a:link,
|
176
|
-
a:visited {
|
177
|
-
|
178
|
-
}
|
177
|
+
a:link,
|
178
|
+
a:visited {
|
179
|
+
color: #f30;
|
180
|
+
}
|
179
181
|
|
180
|
-
a:hover {
|
181
|
-
|
182
|
-
}
|
182
|
+
a:hover {
|
183
|
+
color: #f90;
|
184
|
+
}
|
183
185
|
|
184
|
-
#main {
|
185
|
-
|
186
|
+
#main {
|
187
|
+
position: absolute;
|
186
188
|
|
187
|
-
|
188
|
-
|
189
|
+
top: 40px;
|
190
|
+
left: 280px;
|
189
191
|
|
190
|
-
|
191
|
-
}
|
192
|
+
width: 500px;
|
193
|
+
}
|
192
194
|
|
193
|
-
#main h1 {
|
194
|
-
|
195
|
-
|
195
|
+
#main h1 {
|
196
|
+
font-size: 40px;
|
197
|
+
font-weight: normal;
|
196
198
|
|
197
|
-
|
199
|
+
line-height: 40px;
|
198
200
|
|
199
|
-
|
200
|
-
}
|
201
|
+
letter-spacing: -1px;
|
202
|
+
}
|
201
203
|
|
202
|
-
#main p {
|
203
|
-
|
204
|
+
#main p {
|
205
|
+
margin: 20px 0;
|
204
206
|
|
205
|
-
|
207
|
+
font-size: 15px;
|
206
208
|
|
207
|
-
|
208
|
-
}
|
209
|
+
line-height: 20px;
|
210
|
+
}
|
209
211
|
|
210
|
-
#main ul, #main ol {
|
211
|
-
|
212
|
-
}
|
212
|
+
#main ul, #main ol {
|
213
|
+
margin: 20px;
|
214
|
+
}
|
213
215
|
|
214
|
-
#main li {
|
215
|
-
|
216
|
+
#main li {
|
217
|
+
font-size: 15px;
|
216
218
|
|
217
|
-
|
218
|
-
}
|
219
|
+
line-height: 20px;
|
220
|
+
}
|
219
221
|
|
220
|
-
#main ul li {
|
221
|
-
|
222
|
-
}
|
222
|
+
#main ul li {
|
223
|
+
list-style-type: square;
|
224
|
+
}
|
223
225
|
|
224
|
-
#sidebar {
|
225
|
-
|
226
|
+
#sidebar {
|
227
|
+
position: absolute;
|
226
228
|
|
227
|
-
|
228
|
-
|
229
|
-
|
229
|
+
top: 40px;
|
230
|
+
left: 20px;
|
231
|
+
width: 200px;
|
230
232
|
|
231
|
-
|
233
|
+
padding: 20px 20px 0 0;
|
232
234
|
|
233
|
-
|
235
|
+
border-right: 1px solid #ccc;
|
234
236
|
|
235
|
-
|
236
|
-
}
|
237
|
+
text-align: right;
|
238
|
+
}
|
237
239
|
|
238
|
-
#sidebar h2 {
|
239
|
-
|
240
|
+
#sidebar h2 {
|
241
|
+
text-transform: uppercase;
|
240
242
|
|
241
|
-
|
243
|
+
font-size: 13px;
|
242
244
|
|
243
|
-
|
245
|
+
color: #333;
|
244
246
|
|
245
|
-
|
247
|
+
letter-spacing: 1px;
|
246
248
|
|
247
|
-
|
248
|
-
}
|
249
|
+
line-height: 20px;
|
250
|
+
}
|
249
251
|
|
250
|
-
#sidebar ul {
|
251
|
-
|
252
|
+
#sidebar ul {
|
253
|
+
list-style-type: none;
|
252
254
|
|
253
|
-
|
254
|
-
}
|
255
|
+
margin: 20px 0;
|
256
|
+
}
|
255
257
|
|
256
|
-
#sidebar li {
|
257
|
-
|
258
|
+
#sidebar li {
|
259
|
+
font-size: 14px;
|
258
260
|
|
259
|
-
|
260
|
-
}
|
261
|
+
line-height: 20px;
|
262
|
+
}
|
261
263
|
EOS
|
262
264
|
|
263
|
-
DEFAULT_LAYOUT =
|
264
|
-
<!DOCTYPE HTML>
|
265
|
-
<html lang="en">
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
</html>
|
265
|
+
DEFAULT_LAYOUT = <<~EOS unless defined? DEFAULT_LAYOUT
|
266
|
+
<!DOCTYPE HTML>
|
267
|
+
<html lang="en">
|
268
|
+
<head>
|
269
|
+
<meta charset="utf-8">
|
270
|
+
<title>A Brand New Nanoc Site - <%= @item[:title] %></title>
|
271
|
+
<link rel="stylesheet" href="/stylesheet.css">
|
272
|
+
|
273
|
+
<!-- you don't need to keep this, but it's cool for stats! -->
|
274
|
+
<meta name="generator" content="Nanoc <%= Nanoc::VERSION %>">
|
275
|
+
</head>
|
276
|
+
<body>
|
277
|
+
<div id="main">
|
278
|
+
<%= yield %>
|
279
|
+
</div>
|
280
|
+
<div id="sidebar">
|
281
|
+
<h2>Documentation</h2>
|
282
|
+
<ul>
|
283
|
+
<li><a href="http://nanoc.ws/doc/">Documentation</a></li>
|
284
|
+
<li><a href="http://nanoc.ws/doc/tutorial/">Tutorial</a></li>
|
285
|
+
</ul>
|
286
|
+
<h2>Community</h2>
|
287
|
+
<ul>
|
288
|
+
<li><a href="http://groups.google.com/group/nanoc/">Discussion group</a></li>
|
289
|
+
<li><a href="https://gitter.im/nanoc/nanoc">Gitter channel</a></li>
|
290
|
+
<li><a href="http://nanoc.ws/contributing/">Contributing</a></li>
|
291
|
+
</ul>
|
292
|
+
</div>
|
293
|
+
</body>
|
294
|
+
</html>
|
293
295
|
EOS
|
294
296
|
|
295
297
|
def run
|