Skip to content

Commit dca936d

Browse files
committed
docs: mark Git project-specific pages clearly
This adds a callout at the top of the pages that are irrelevant to all Git users except the ones who wish to contribute to the Git project itself. There are only very few of them, anyway (about to be a few more), but it is a good idea to ensure that readers are not confused into believing that they have to follow the Git project's coding guidelines if they want to use Git. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 868e752 commit dca936d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

layouts/_default/baseof.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ <h1>{{ .Params.book.section.cs_number }} {{ .Params.book.chapter.title }} - {{ .
117117
<!-- older manual page versions are less interesting and need to be excluded from the search -->
118118
{{ $include_in_search := (or (not (isset .Params "docname")) (isset .Params "latest-changes") (isset .Params "lang")) }}
119119
<div id="main"{{ if $include_in_search }} data-pagefind-filter="category:reference" data-pagefind-meta="category:Reference" data-pagefind-weight="0.05" data-pagefind-body{{ end }}>
120+
{{ if (and (isset .Params "docname") (in .Site.Data.docs_extra.git_project_specific .Params.docname)) }}
121+
<div class="callout">
122+
<h2>This information is specific to the Git project</h2>
123+
<p>Please note that this information is only relevant to you if you plan on <a href="{{ relURL "community#contributing" }}">contributing to the Git project itself</a>. It is in no shape or form required reading for regular Git users.</p>
124+
</div>
125+
{{ end }}
120126
{{ .Content }}
121127
{{ $match := findRESubmatch "(?s)>NAME</h2>.*?<p[^>]*>(git-)?([^ ]+)" .Content 1 }}
122128
{{ if (eq ($match | len) 1) }}

0 commit comments

Comments
 (0)