Skip to content

Commit 43b8a2b

Browse files
Added custom header text setting to Landing and Search styles
1 parent 3a7af4e commit 43b8a2b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@
143143
"default": "Landing",
144144
"group": "homepage"
145145
},
146+
"header_text": {
147+
"type": "text",
148+
"group": "homepage",
149+
"description": "Defaults to site description when empty",
150+
"visibility": "header_style:[Landing, Search]"
151+
},
146152
"background_image": {
147153
"type": "boolean",
148154
"default": true,

partials/components/header-content.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@
6363

6464
{{!-- Landing layout --}}
6565
{{#match headerStyle "Landing"}}
66-
<h1 class="gh-header-title is-title">{{#if @custom.signup_heading}}{{@custom.signup_heading}}{{else}}{{@site.description}}{{/if}}</h1>
66+
<h1 class="gh-header-title is-title">{{#if @custom.header_text}}{{@custom.header_text}}{{else}}{{@site.description}}{{/if}}</h1>
6767
{{> "email-subscription"}}
6868
{{/match}}
6969

7070
{{!-- Search layout --}}
7171
{{#match headerStyle "Search"}}
72-
<h1 class="gh-header-title is-title">{{#if @custom.signup_heading}}{{@custom.signup_heading}}{{else}}{{@site.description}}{{/if}}</h1>
72+
<h1 class="gh-header-title is-title">{{#if @custom.header_text}}{{@custom.header_text}}{{else}}{{@site.description}}{{/if}}</h1>
7373
<form class="gh-form">
7474
{{> "icons/search"}}
7575
<button class="gh-form-input" data-ghost-search>Search posts, tags and authors</button>

0 commit comments

Comments
 (0)