mirror of https://github.com/docker/docs.git
jekyll: use repo default branch for edit url of remote resources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
977c1598ae
commit
050078c5f8
|
@ -127,6 +127,7 @@ defaults:
|
||||||
# - src is a list of glob source paths within the remote repository
|
# - src is a list of glob source paths within the remote repository
|
||||||
fetch-remote:
|
fetch-remote:
|
||||||
- repo: "https://github.com/docker/cli"
|
- repo: "https://github.com/docker/cli"
|
||||||
|
default_branch: "master"
|
||||||
ref: "20.10"
|
ref: "20.10"
|
||||||
paths:
|
paths:
|
||||||
- dest: "engine/extend"
|
- dest: "engine/extend"
|
||||||
|
@ -145,6 +146,7 @@ fetch-remote:
|
||||||
- "docs/reference/commandline/dockerd.md"
|
- "docs/reference/commandline/dockerd.md"
|
||||||
|
|
||||||
- repo: "https://github.com/docker/docker"
|
- repo: "https://github.com/docker/docker"
|
||||||
|
default_branch: "master"
|
||||||
ref: "20.10"
|
ref: "20.10"
|
||||||
paths:
|
paths:
|
||||||
- dest: "engine/api"
|
- dest: "engine/api"
|
||||||
|
@ -152,6 +154,7 @@ fetch-remote:
|
||||||
- "docs/api/**"
|
- "docs/api/**"
|
||||||
|
|
||||||
- repo: "https://github.com/docker/compose-cli"
|
- repo: "https://github.com/docker/compose-cli"
|
||||||
|
default_branch: "main"
|
||||||
ref: "main"
|
ref: "main"
|
||||||
paths:
|
paths:
|
||||||
- dest: "cloud"
|
- dest: "cloud"
|
||||||
|
@ -161,6 +164,7 @@ fetch-remote:
|
||||||
- "!docs/architecture.md" # Compose-CLI architecture, unrelated to cloud integration
|
- "!docs/architecture.md" # Compose-CLI architecture, unrelated to cloud integration
|
||||||
|
|
||||||
- repo: "https://github.com/distribution/distribution"
|
- repo: "https://github.com/distribution/distribution"
|
||||||
|
default_branch: "main"
|
||||||
ref: "release/2.7"
|
ref: "release/2.7"
|
||||||
paths:
|
paths:
|
||||||
- dest: "registry/spec"
|
- dest: "registry/spec"
|
||||||
|
|
|
@ -71,7 +71,7 @@ module Jekyll
|
||||||
|
|
||||||
next unless File.file?(ent.path) && File.extname(ent.path) == ".md"
|
next unless File.file?(ent.path) && File.extname(ent.path) == ".md"
|
||||||
# set edit url for markdown files in site config defaults
|
# set edit url for markdown files in site config defaults
|
||||||
edit_url = "#{entry['repo']}/edit/#{entry['ref']}/#{file_clean}"
|
edit_url = "#{entry['repo']}/edit/#{entry['default_branch']}/#{file_clean}"
|
||||||
puts " edit_url: #{edit_url}"
|
puts " edit_url: #{edit_url}"
|
||||||
site.config['defaults'] << {
|
site.config['defaults'] << {
|
||||||
"scope" => { "path" => destent.path },
|
"scope" => { "path" => destent.path },
|
||||||
|
|
Loading…
Reference in New Issue