mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 05:54:00 +08:00
![Joffrey JAFFEUX](/assets/img/avatar_default.png)
`registerUnbound` was present for legacy reasons when using helpers in raw-hbs and has been replaced by `registerRawHelper`. For new helpers used only in classic ember template, exporting a default function from `helpers/*.js` is recommended. This change also means that all existing helpers will be available to import in `gjs` files. Co-authored-by: David Taylor <david@taylorhq.com>
9 lines
221 B
JavaScript
9 lines
221 B
JavaScript
import getUrl from "discourse-common/lib/get-url";
|
|
import { registerRawHelper } from "discourse-common/lib/helpers";
|
|
|
|
registerRawHelper("base-path", basePath);
|
|
|
|
export default function basePath() {
|
|
return getUrl("");
|
|
}
|