From 6821c07e347d63bb72c77e4690c71b256e6d4ab5 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Sat, 5 Nov 2022 23:11:10 +0100 Subject: [PATCH] jekyll: merge scopes and exclusions config Signed-off-by: CrazyMax --- _config.yml | 13 +++++++++---- _config_production.yml | 34 ---------------------------------- 2 files changed, 9 insertions(+), 38 deletions(-) diff --git a/_config.yml b/_config.yml index 97bfb2aa11..a9071e5ebc 100644 --- a/_config.yml +++ b/_config.yml @@ -28,6 +28,9 @@ kramdown: liquid: error_mode: strict +# Exclude directories and/or files from the conversion. These exclusions are +# relative to the site's source directory and cannot be outside the source +# directory. exclude: - _deploy - _releaser @@ -89,13 +92,10 @@ sass: sass_dir: _scss style: expanded -# Set default options / metadata for some paths. -# # Setting options here prevents having to repeat the same option in front-matter # on every page. +# https://jekyllrb.com/docs/configuration/front-matter-defaults/ defaults: - # Default one for development builds (local and PR previews) - # sitemap is disabled here but not for production in _config_production.yml - scope: path: "" type: "pages" @@ -105,6 +105,10 @@ defaults: toc_max: 4 # Exclude from sitemap + - scope: + path: "desktop/enterprise" + values: + sitemap: false - scope: path: "assets/**" values: @@ -141,6 +145,7 @@ defaults: # Fetch upstream resources (reference documentation) used by _plugins/fetch_remote.rb # - repo is the GitHub repository to fetch from +# - default_branch used to generate edit_url link # - ref the Git reference # - paths is a list to the resources within the remote repository # - dest is the destination path within the working tree diff --git a/_config_production.yml b/_config_production.yml index 18dfed6ac7..f509de0935 100644 --- a/_config_production.yml +++ b/_config_production.yml @@ -2,17 +2,6 @@ # This file overrides options set in _config.yml for production / deploy ## -# Override the exclusion list to include files that are excluded in "development", -# such as the "enterprise" stubs, which are in place to facilitate redirects -# to Mirantis. -exclude: - - _releaser - - _scripts - - docker-bake.hcl - - LICENSE - - Makefile - - README.md - # Google Analytics, etc. google_analytics: GTM-WL2QLG5 onetrust_id: 8e0ebfd9-035d-4ec2-9b2f-a2de9c09f906 @@ -28,26 +17,3 @@ sass: collections: samples: output: true - -# Set default options / metadata for some paths. -# -# Setting options here prevents having to repeat the same option in front-matter -# on every page. -# -# The list below is used for *production* deploys, and overrides the one defined -# in "_config.yml", which is used for local builds and pull-request previews. -defaults: - - scope: - path: "" - type: "pages" - values: - layout: docs - toc_min: 2 - toc_max: 4 - - # Hide Enterprise content from sitemap. These directories still contains stubs - # that are needed to redirect old URLs - - scope: - path: "desktop/enterprise" - values: - sitemap: false