]> git.proxmox.com Git - pve-docs.git/blobdiff - scan-adoc-refs
mark toplevel docs
[pve-docs.git] / scan-adoc-refs
index fc6cdf4be8cebe81c6384f8fd60cad0e201a1201..c3ac08f9b4c57623a98741588d6312f21829382f 100755 (executable)
@@ -129,6 +129,19 @@ sub scan_adoc_file {
            chomp $env_last_line->{$e};
        }
 
+       if ($line =~ m/^:(\S+?):\s*(.*\S)?\s*$/) {
+           my ($key, $value) = ($1, $2);
+           if ($key eq 'pve-toplevel') {
+               
+               foreach my $e (@{$env_stack->[-1]}) {
+                   my $title = $fileinfo->{titles}->{$e}->{$filename};
+                   die "not title for toplevel file '$filename' (env=$e)\n"
+                       if !defined($title);
+                   $fileinfo->{toplevel}->{$e}->{$filename} = 1;
+               }
+           }
+       }
+
        if ($line =~ m/^\[\[(.*)\]\]\s*$/) {
            my $blockid = $1;
            die "implement me" if $blockid =~m/,/;