diff --git a/_config.yml b/_config.yml index 7cbe46d8fb..9b1475cadb 100644 --- a/_config.yml +++ b/_config.yml @@ -90,11 +90,9 @@ sass: # 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: + # 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" @@ -104,10 +102,22 @@ defaults: toc_min: 2 toc_max: 4 + # Set the correct edit-URL for some local and remote 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/reference + values: + # FIXME: This edit url is as "best-effort" and doesn't match anything in docker/cli repo for plugins for example. It should be generated autmatically. + 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" # Fetch upstream resources (reference documentation) used by _plugins/fetch_remote.rb # - repo is the GitHub repository to fetch from @@ -117,6 +127,7 @@ defaults: # - src is a list of glob source paths within the remote repository fetch-remote: - repo: "https://github.com/docker/cli" + default_branch: "master" ref: "20.10" paths: - dest: "engine/extend" @@ -135,6 +146,7 @@ fetch-remote: - "docs/reference/commandline/dockerd.md" - repo: "https://github.com/docker/docker" + default_branch: "master" ref: "20.10" paths: - dest: "engine/api" @@ -142,6 +154,7 @@ fetch-remote: - "docs/api/**" - repo: "https://github.com/docker/compose-cli" + default_branch: "main" ref: "main" paths: - dest: "cloud" @@ -151,6 +164,7 @@ fetch-remote: - "!docs/architecture.md" # Compose-CLI architecture, unrelated to cloud integration - repo: "https://github.com/distribution/distribution" + default_branch: "main" ref: "release/2.7" paths: - dest: "registry/spec" diff --git a/_config_production.yml b/_config_production.yml index 003143b6bc..3efd2f2df1 100644 --- a/_config_production.yml +++ b/_config_production.yml @@ -54,66 +54,6 @@ defaults: toc_min: 2 toc_max: 4 - # 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: cloud/aci-compose-features.md - values: - edit_url: "https://github.com/docker/compose-cli/tree/master/docs/" - - scope: - path: cloud/aci-container-features.md - values: - edit_url: "https://github.com/docker/compose-cli/tree/master/docs/" - - scope: - path: cloud/ecs-architecture.md - values: - edit_url: "https://github.com/docker/compose-cli/tree/master/docs/" - - scope: - path: cloud/ecs-compose-features.md - values: - edit_url: "https://github.com/docker/compose-cli/tree/master/docs/" - - scope: - path: cloud/ecs-compose-examples.md - values: - edit_url: "https://github.com/docker/compose-cli/tree/master/docs/" - - 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/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: - 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" - # Hide Enterprise content from sitemap. These directories still contains stubs # that are needed to redirect old URLs - scope: diff --git a/_layouts/docs.html b/_layouts/docs.html index f7446e6956..17bc31b751 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -4,6 +4,11 @@ {%- assign edit_url = page.edit_url -%} {%- else -%} {%- assign edit_url = "https://github.com/docker/docker.github.io/edit/master/" | append: page.path -%} +{%- endif -%} +{%- if page.issue_url -%} + {%- assign issue_url = page.issue_url -%} +{%- else -%} + {%- assign issue_url = "https://github.com/docker/docker.github.io/issues/new?body=File: [" | append: page.path | append: "](https://docs.docker.com" | append: page.url | append: ")" -%} {%- endif -%} --> {%- include head.html -%} @@ -63,7 +68,9 @@ {%- if edit_url != "" -%}