Adding header links post vdom upgrade

This is my code in the "Customize -> </head>" section.
The Link to an external site (not discourse site) doesn’t work.

The links should open Example Domain, but it opens https://example.com/forum/index.html

I found a thread with this bug, but it’s closed. Maybe @eviltrout can help.

<script type="text/discourse-plugin" version="0.4">
api.decorateWidget('home-logo:after', helper => {
    const showExtraInfo = helper.attrs.topic;
        if(!showExtraInfo) {
            return helper.h('div#header-links', [
                helper.h('a', {
                    href:'https://example.com/index.html', 
                    text:'Tracks'
                }),
                helper.h('a.active', {
                    href:'https://example.com/forum', 
                    text:'Forum'
                })
            ]);
        }
});
</script>
1 Like