diff --git a/.gitmodules b/.gitmodules index 06ae8c690506..c9ca75b35b82 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,7 @@ [submodule "themes/docsy"] path = themes/docsy url = https://github.com/cncf/docsy.git - docsy-pin = v0.8.0-17-g91efe35 + docsy-pin = v0.8.0-21-g435b2e0 [submodule "content-modules/opentelemetry-specification"] path = content-modules/opentelemetry-specification url = https://github.com/open-telemetry/opentelemetry-specification.git diff --git a/layouts/partials/page-meta-links.html b/layouts/partials/page-meta-links.html deleted file mode 100644 index 5804b80045ce..000000000000 --- a/layouts/partials/page-meta-links.html +++ /dev/null @@ -1,55 +0,0 @@ -{{/* Temporary Docsy file override */ -}} -{{ if .File -}} -{{ $pathFormatted := replace .File.Path "\\" "/" -}} -{{ $gh_repo := ($.Param "github_repo") -}} -{{ $gh_url := ($.Param "github_url") -}} -{{ $gh_subdir := ($.Param "github_subdir") -}} -{{ $gh_project_repo := ($.Param "github_project_repo") -}} -{{ $gh_branch := (default "main" ($.Param "github_branch")) -}} -
-{{ if $gh_url -}} - {{ warnf "Warning: use of `github_url` is deprecated. For details see https://www.docsy.dev/docs/adding-content/repository-links/#github_url-optional" -}} - {{ T "post_edit_this" }} -{{ else if $gh_repo -}} - {{ $gh_repo_path := printf "%s/content/%s" $gh_branch $pathFormatted -}} - {{ if and ($gh_subdir) (.Site.Language.Lang) -}} - {{ $gh_repo_path = printf "%s/%s/content/%s/%s" $gh_branch $gh_subdir ($.Site.Language.Lang) $pathFormatted -}} - {{ else if .Site.Language.Lang -}} - {{ $gh_repo_path = printf "%s/content/%s/%s" $gh_branch ($.Site.Language.Lang) $pathFormatted -}} - {{ else if $gh_subdir -}} - {{ $gh_repo_path = printf "%s/%s/content/%s" $gh_branch $gh_subdir $pathFormatted -}} - {{ end -}} - - {{/* Adjust $gh_repo_path based on path_base_for_github_subdir */ -}} - {{ $ghs_base := $.Param "path_base_for_github_subdir" -}} - {{ $ghs_rename := "" -}} - {{ if reflect.IsMap $ghs_base -}} - {{ $ghs_rename = $ghs_base.to -}} - {{ $ghs_base = $ghs_base.from -}} - {{ end -}} - {{ with $ghs_base -}} - {{ $gh_repo_path = replaceRE . $ghs_rename $gh_repo_path -}} - {{ end -}} - - {{ $viewURL := printf "%s/tree/%s" $gh_repo $gh_repo_path -}} - {{ $editURL := printf "%s/edit/%s" $gh_repo $gh_repo_path -}} - {{ $issuesURL := printf "%s/issues/new?title=%s" $gh_repo (safeURL $.Title ) -}} - {{ $newPageStub := resources.Get "stubs/new-page-template.md" -}} - {{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL -}} - {{ $newPageURL := printf "%s/new/%s?%s" $gh_repo (path.Dir $gh_repo_path) $newPageQS -}} - - {{ T "post_view_this" }} - {{ T "post_edit_this" }} - {{ T "post_create_child_page" }} - {{ T "post_create_issue" }} - {{ with $gh_project_repo -}} - {{ $project_issueURL := printf "%s/issues/new" . -}} - {{ T "post_create_project_issue" }} - {{ end -}} - -{{ end -}} -{{ with .CurrentSection.AlternativeOutputFormats.Get "print" -}} - {{ T "print_entire_section" }} -{{ end }} -
-{{ end -}} diff --git a/scripts/content-modules/adjust-pages.pl b/scripts/content-modules/adjust-pages.pl index 1802f97d11df..04635695454a 100755 --- a/scripts/content-modules/adjust-pages.pl +++ b/scripts/content-modules/adjust-pages.pl @@ -17,7 +17,6 @@ my $semconvSpecRepoUrl = 'https://github.com/open-telemetry/semantic-conventions'; my $semConvRef = "$otelSpecRepoUrl/blob/main/semantic_conventions/README.md"; my $specBasePath = '/docs/specs'; -my $path_base_for_github_subdir = "content/en$specBasePath"; my %versions = qw( spec: 1.29.0 otlp: 1.1.0 @@ -52,12 +51,22 @@ () # TODO: add to front matter of OTel spec file and drop next line: $linkTitle = 'Design Goals' if $title eq 'Design Goals for OpenTelemetry Wire Protocol'; + # TODO: remove once all submodules have been updated in the context of https://github.com/open-telemetry/opentelemetry.io/issues/3922 + $frontMatterFromFile =~ s|: content/en/docs/specs/otel/|: tmp/otel/specification|g; + $frontMatterFromFile =~ s|: content/en/docs/specs/opamp/|: tmp/opamp/|g; + $frontMatterFromFile =~ s|: content/en/docs/specs/semconv/|: tmp/semconv/docs/|g; + $frontMatterFromFile =~ s|path_base_for_github_subdir:\n from: content/en/docs/specs/otlp/_index.md\n to: specification.md\n||; + $frontMatterFromFile =~ s|github_subdir: docs\n path_base_for_github_subdir: content/en/docs/specs/otlp/|path_base_for_github_subdir: tmp/otlp/|g; + + $frontMatterFromFile =~ s|github_subdir: ''\npath_base_for_github_subdir:\n from: content/en/community/mission\\.md\n to: mission-vision-values.md|path_base_for_github_subdir: tmp/community|; + $frontMatterFromFile =~ s|github_subdir: ''\npath_base_for_github_subdir: content/en/community/|path_base_for_github_subdir: tmp/community|; + # printf STDOUT "> $title -> $linkTitle\n"; print "linkTitle: $linkTitle\n" if $linkTitle and $frontMatterFromFile !~ /linkTitle: /; print "$frontMatterFromFile" if $frontMatterFromFile; if ($ARGV =~ /otel\/specification\/(.*?)_index.md$/) { print "path_base_for_github_subdir:\n"; - print " from: $path_base_for_github_subdir/otel/$1_index.md\n"; + print " from: tmp/otel/specification/$1_index.md\n"; print " to: $1README.md\n"; } print "---\n"; diff --git a/themes/docsy b/themes/docsy index 91efe3599850..435b2e067869 160000 --- a/themes/docsy +++ b/themes/docsy @@ -1 +1 @@ -Subproject commit 91efe359985017cfac3cc0cddf45dac79b3086ab +Subproject commit 435b2e0678694f3812a285a67dfac43f1c8ddd25