diff --git a/README.md b/README.md index 8b939c0..e6d2b81 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ These are theme-specific settings and can be set in a settings file (in addition - `SiteTitle`: The title of the site. This should be defined regardless of whether `Logo` is because it's used for the page title, alt attributes, etc. - `Logo`: The logo file to use in the navigation bar (include a leading slash if providing a relative path). If not provided, the `SiteTitle` will be used. - `EditRoot`: The root link to use for editing pages, usually set to a value like `https://github.com/org/repo/edit/develop/input` (do not use a trailing slash). +- `RightSidebarHeadingLevel`: Heading level which should be shown in the right sidebar. By default heading level 1 is shown. ### Colors diff --git a/SiteKeys.cs b/SiteKeys.cs index ba75ffd..cc984eb 100644 --- a/SiteKeys.cs +++ b/SiteKeys.cs @@ -69,5 +69,10 @@ public static class SiteKeys /// A Google Fonts (or other) URL for use in a link element in the header. /// public const string FontLink = nameof(FontLink); + + /// + /// Heading level which should be shown in the right sidebar. + /// + public const string RightSidebarHeadingLevel = nameof(RightSidebarHeadingLevel); } } \ No newline at end of file diff --git a/input/Shared/_RightSidebar.cshtml b/input/Shared/_RightSidebar.cshtml index 7cf599a..28377a8 100644 --- a/input/Shared/_RightSidebar.cshtml +++ b/input/Shared/_RightSidebar.cshtml @@ -1,7 +1,7 @@ @{ IReadOnlyList headings = Document .GetDocumentList(Keys.Headings) - ?.Where(x => x.GetInt(Keys.Level) == 1) + ?.Where(x => x.GetInt(Keys.Level) == Document.GetInt(SiteKeys.RightSidebarHeadingLevel, 1)) .ToList(); string editLink = Document.ContainsKey(SiteKeys.EditLink) ? Document.GetString(SiteKeys.EditLink)