Skip to content

Commit

Permalink
Spec: add version to title (open-telemetry#2666)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored May 8, 2023
1 parent 89c4b1e commit 35c2841
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/content-modules/adjust-pages.pl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
my $semConvRef = "$specRepoUrl/blob/main/semantic_conventions/README.md";
my $spec_base_path = '/docs/reference/specification';
my $path_base_for_github_subdir = "content/en$spec_base_path";
my %versions = qw(
spec: 1.20.0
);
my $spec_vers = $versions{'spec:'};

my $rootFrontMatterExtra = <<"EOS";
no_list: true
Expand All @@ -28,6 +32,11 @@

sub printTitleAndFrontMatter() {
print "---\n";
if ($title eq 'OpenTelemetry Specification') {
$title .= " $spec_vers";
# Temporary adjustment to front matter until spec is updated:
$frontMatterFromFile =~ s/linkTitle: .*/$& $spec_vers/;
}
my $titleMaybeQuoted = ($title =~ ':') ? "\"$title\"" : $title;
print "title: $titleMaybeQuoted\n";
($linkTitle) = $title =~ /^OpenTelemetry (.*)/;
Expand Down

0 comments on commit 35c2841

Please sign in to comment.