Created
July 27, 2018 05:25
-
-
Save danieljwonder/738dce8ed01e20dccac37043735d2ded to your computer and use it in GitHub Desktop.
Add Homepage Icon to Discourse Menu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| To add this JavaScript code to your site theme: | |
| 1. Go to Admin > Customize > Themes | |
| 2. Select the theme you wish to customize | |
| 5. Click `Edit CSS/HTML` | |
| 4. Go to `</head>` tab | |
| 5. Copy & paste code from below | |
| 6. Click to Preview/Save | |
| </head> | |
| --> | |
| <script type="text/discourse-plugin" version="0.4"> | |
| api.decorateWidget('header-icons:before', helper => { | |
| return helper.h('li', [ | |
| helper.h('a#home-button.icon', { | |
| href:'https://www.domain.com/', | |
| title: '← Return to Homepage' | |
| }, helper.h('i.fa.fa-home.home-button-icon.d-icon')), | |
| ]); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment