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
|
||||
fetch-remote:
|
||||
- repo: "https://github.com/docker/cli"
|
||||
default_branch: "master"
|
||||
ref: "20.10"
|
||||
paths:
|
||||
- dest: "engine/extend"
|
||||
|
@ -145,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"
|
||||
|
@ -152,6 +154,7 @@ fetch-remote:
|
|||
- "docs/api/**"
|
||||
|
||||
- repo: "https://github.com/docker/compose-cli"
|
||||
default_branch: "main"
|
||||
ref: "main"
|
||||
paths:
|
||||
- dest: "cloud"
|
||||
|
@ -161,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"
|
||||
|
|
|
@ -71,7 +71,7 @@ module Jekyll
|
|||
|
||||
next unless File.file?(ent.path) && File.extname(ent.path) == ".md"
|
||||
# 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}"
|
||||
site.config['defaults'] << {
|
||||
"scope" => { "path" => destent.path },
|
||||
|
|
Loading…
Reference in New Issue