mirror of https://github.com/docker/docs.git
Optimize configuration to reduce build-times
- remove wildcard match for defaults (this caused a ripple effect and slowed down total build time with 60 seconds?) - skip generating metadata.json (which took 25+ seconds) - skip generating sitemap.xml (10+ seconds) Build-times before/after: Production before: 132 seconds Production after: 62 seconds Development before: 121 seconds Development after: 35 seconds Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
9b79a27ab4
commit
2fe7e6106a
108
_config.yml
108
_config.yml
|
@ -1,3 +1,8 @@
|
||||||
|
##
|
||||||
|
# Default configuration file
|
||||||
|
#
|
||||||
|
# This file overrides options set in _config.yml for production / deploy
|
||||||
|
##
|
||||||
name: Docker Documentation
|
name: Docker Documentation
|
||||||
markdown: kramdown
|
markdown: kramdown
|
||||||
kramdown:
|
kramdown:
|
||||||
|
@ -11,11 +16,10 @@ incremental: true
|
||||||
permalink: pretty
|
permalink: pretty
|
||||||
safe: false
|
safe: false
|
||||||
lsi: false
|
lsi: false
|
||||||
exclude: ["_samples", "_scripts", "404.html", "datacenter", "ee", "index.html"]
|
exclude: ["_samples", "_scripts", "404.html", "datacenter", "ee", "index.html", "js/metadata.json"]
|
||||||
|
|
||||||
# Component versions -- address like site.docker_ce_version
|
# Component versions -- address like site.docker_ce_version
|
||||||
# You can't have - characters in these for non-YAML reasons
|
# You can't have - characters in these for non-YAML reasons
|
||||||
|
|
||||||
latest_engine_api_version: "1.40"
|
latest_engine_api_version: "1.40"
|
||||||
docker_ce_version: "19.03"
|
docker_ce_version: "19.03"
|
||||||
compose_version: "1.27.4"
|
compose_version: "1.27.4"
|
||||||
|
@ -24,15 +28,34 @@ compose_file_v2: "2.4"
|
||||||
machine_version: "0.16.0"
|
machine_version: "0.16.0"
|
||||||
distribution_version: "2.7"
|
distribution_version: "2.7"
|
||||||
|
|
||||||
collections:
|
# List of plugins to enable for local development builds. Mostly the same as
|
||||||
samples:
|
# for production, but without the "jekyll-sitemap" plugin, which is not needed
|
||||||
output: true
|
# for previewing, and excluding saves some time to build
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- jekyll-redirect-from
|
- jekyll-redirect-from
|
||||||
- jekyll-relative-links
|
- jekyll-relative-links
|
||||||
- jekyll-sitemap
|
|
||||||
|
|
||||||
|
# Assets
|
||||||
|
#
|
||||||
|
# We specify the directory for Jekyll so we can use @imports.
|
||||||
|
#
|
||||||
|
# For local development, we build css with the "expanded" format to produce
|
||||||
|
# human-readable output for easier debugging.
|
||||||
|
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. Avoid using wildcards, such as "path: engine/api/v1.*", as
|
||||||
|
# limitations in Jekyll cause those to introduce a _severe_ impact on build-time,
|
||||||
|
# affecting generation of (e.g.) sitemap.xml and metadata.json, resulting in the
|
||||||
|
# total build to take 60 seconds longer to build (!).
|
||||||
|
#
|
||||||
|
# The list below is for "development" (local builds, and PR previews) builds only,
|
||||||
|
# and should be kept minimal to allow for fast builds. Other options should go
|
||||||
|
# into _config_production.yml, which is used for production deploys.
|
||||||
defaults:
|
defaults:
|
||||||
- scope:
|
- scope:
|
||||||
path: ""
|
path: ""
|
||||||
|
@ -42,78 +65,7 @@ defaults:
|
||||||
toc_min: 2
|
toc_min: 2
|
||||||
toc_max: 3
|
toc_max: 3
|
||||||
|
|
||||||
# Set the correct edit-URL for upstream resources. We usually don't create a direct
|
|
||||||
# edit link for these, and instead point to the directory that contains the file.
|
|
||||||
- scope:
|
|
||||||
path: engine/api/v1.*
|
|
||||||
values:
|
|
||||||
edit_url: "https://github.com/docker/docker/tree/master/docs/api"
|
|
||||||
- scope:
|
|
||||||
path: engine/deprecated
|
|
||||||
values:
|
|
||||||
edit_url: "https://github.com/docker/cli/tree/master/docs/"
|
|
||||||
- scope:
|
|
||||||
path: engine/extend
|
|
||||||
values:
|
|
||||||
edit_url: "https://github.com/docker/cli/tree/master/docs/extend"
|
|
||||||
- scope:
|
|
||||||
path: engine/reference
|
|
||||||
values:
|
|
||||||
edit_url: "https://github.com/docker/cli/tree/master/docs/reference"
|
|
||||||
- scope:
|
- scope:
|
||||||
path: engine/reference/commandline
|
path: engine/reference/commandline
|
||||||
values:
|
values:
|
||||||
edit_url: "https://github.com/docker/cli/tree/master/docs/reference/commandline"
|
|
||||||
skip_read_time: true
|
skip_read_time: true
|
||||||
- scope:
|
|
||||||
path: glossary
|
|
||||||
values:
|
|
||||||
edit_url: "https://github.com/docker/docker.github.io/blob/master/_data/glossary.yaml"
|
|
||||||
- scope:
|
|
||||||
path: notary/reference
|
|
||||||
values:
|
|
||||||
edit_url: "https://github.com/theupdateframework/notary/tree/master/docs/reference"
|
|
||||||
- scope:
|
|
||||||
path: registry/configuration
|
|
||||||
values:
|
|
||||||
edit_url: "https://github.com/docker/distribution/tree/master/docs"
|
|
||||||
- scope:
|
|
||||||
path: registry/spec
|
|
||||||
values:
|
|
||||||
edit_url: "https://github.com/docker/distribution/tree/master/docs/spec"
|
|
||||||
- scope:
|
|
||||||
path: compliance
|
|
||||||
values:
|
|
||||||
edit_url: "https://github.com/mirantis/compliance/tree/master/docs/compliance"
|
|
||||||
|
|
||||||
# Hide Enterprise content from sitemap. These directories still contains stubs
|
|
||||||
# that are needed to redirect old URLs
|
|
||||||
- scope:
|
|
||||||
path: "datacenter"
|
|
||||||
values:
|
|
||||||
sitemap: false
|
|
||||||
title: Docker Enterprise moved to Mirantis
|
|
||||||
- scope:
|
|
||||||
path: "desktop/enterprise"
|
|
||||||
values:
|
|
||||||
sitemap: false
|
|
||||||
- scope:
|
|
||||||
path: "ee"
|
|
||||||
values:
|
|
||||||
sitemap: false
|
|
||||||
title: Docker Enterprise moved to Mirantis
|
|
||||||
- scope:
|
|
||||||
path: "machine"
|
|
||||||
values:
|
|
||||||
sitemap: false
|
|
||||||
- scope:
|
|
||||||
path: "samples/library"
|
|
||||||
values:
|
|
||||||
sitemap: false
|
|
||||||
|
|
||||||
# Assets
|
|
||||||
#
|
|
||||||
# We specify the directory for Jekyll so we can use @imports.
|
|
||||||
sass:
|
|
||||||
sass_dir: _scss
|
|
||||||
style: expanded
|
|
||||||
|
|
|
@ -1,11 +1,112 @@
|
||||||
|
##
|
||||||
|
# This file overrides options set in _config.yml for production / deploy
|
||||||
|
##
|
||||||
|
|
||||||
# Include files that are excluded in "development" ("enterprise" stubs) for production
|
# 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: ["_scripts", "404.html", "index.html"]
|
exclude: ["_scripts", "404.html", "index.html"]
|
||||||
|
|
||||||
# Google Analytics, etc.
|
# Google Analytics, etc.
|
||||||
google_analytics: GTM-WL2QLG5
|
google_analytics: GTM-WL2QLG5
|
||||||
polldaddy_id: 8453675
|
polldaddy_id: 8453675
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
- jekyll-redirect-from
|
||||||
|
- jekyll-relative-links
|
||||||
|
- jekyll-sitemap
|
||||||
|
|
||||||
# Assets
|
# Assets
|
||||||
|
#
|
||||||
|
# For production/deploy, we build css with the "compressed" format, to produce
|
||||||
|
# smaller files.
|
||||||
sass:
|
sass:
|
||||||
style: compressed
|
style: compressed
|
||||||
|
|
||||||
|
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. Avoid using wildcards, such as "path: engine/api/v1.*", as
|
||||||
|
# limitations in Jekyll cause those to introduce a _severe_ impact on build-time,
|
||||||
|
# affecting generation of (e.g.) sitemap.xml and metadata.json, resulting in the
|
||||||
|
# total build to take 60 seconds longer to build (!).
|
||||||
|
#
|
||||||
|
# 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: 3
|
||||||
|
|
||||||
|
# Set the correct edit-URL for upstream resources. We usually don't create a direct
|
||||||
|
# edit link for these, and instead point to the directory that contains the file.
|
||||||
|
- scope:
|
||||||
|
path: engine/deprecated.md
|
||||||
|
values:
|
||||||
|
edit_url: "https://github.com/docker/cli/tree/master/docs/"
|
||||||
|
- scope:
|
||||||
|
path: engine/extend.md
|
||||||
|
values:
|
||||||
|
edit_url: "https://github.com/docker/cli/tree/master/docs/extend"
|
||||||
|
- scope:
|
||||||
|
path: engine/reference
|
||||||
|
values:
|
||||||
|
edit_url: "https://github.com/docker/cli/tree/master/docs/reference"
|
||||||
|
- scope:
|
||||||
|
path: engine/reference/commandline
|
||||||
|
values:
|
||||||
|
edit_url: "https://github.com/docker/cli/tree/master/docs/reference/commandline"
|
||||||
|
skip_read_time: true
|
||||||
|
- scope:
|
||||||
|
path: glossary.md
|
||||||
|
values:
|
||||||
|
edit_url: "https://github.com/docker/docker.github.io/blob/master/_data/glossary.yaml"
|
||||||
|
- scope:
|
||||||
|
path: notary/reference
|
||||||
|
values:
|
||||||
|
edit_url: "https://github.com/theupdateframework/notary/tree/master/docs/reference"
|
||||||
|
- scope:
|
||||||
|
path: registry/configuration
|
||||||
|
values:
|
||||||
|
edit_url: "https://github.com/docker/distribution/tree/master/docs"
|
||||||
|
- scope:
|
||||||
|
path: registry/spec
|
||||||
|
values:
|
||||||
|
edit_url: "https://github.com/docker/distribution/tree/master/docs/spec"
|
||||||
|
- scope:
|
||||||
|
path: compliance
|
||||||
|
values:
|
||||||
|
edit_url: "https://github.com/mirantis/compliance/tree/master/docs/compliance"
|
||||||
|
|
||||||
|
# Hide Enterprise content from sitemap. These directories still contains stubs
|
||||||
|
# that are needed to redirect old URLs
|
||||||
|
- scope:
|
||||||
|
path: "datacenter"
|
||||||
|
values:
|
||||||
|
sitemap: false
|
||||||
|
title: Docker Enterprise moved to Mirantis
|
||||||
|
- scope:
|
||||||
|
path: "desktop/enterprise"
|
||||||
|
values:
|
||||||
|
sitemap: false
|
||||||
|
- scope:
|
||||||
|
path: "ee"
|
||||||
|
values:
|
||||||
|
sitemap: false
|
||||||
|
title: Docker Enterprise moved to Mirantis
|
||||||
|
- scope:
|
||||||
|
path: "machine"
|
||||||
|
values:
|
||||||
|
sitemap: false
|
||||||
|
- scope:
|
||||||
|
path: "samples/library"
|
||||||
|
values:
|
||||||
|
sitemap: false
|
||||||
|
|
Loading…
Reference in New Issue