generator-jhipster-yellowbricks-angular-relativepathresource
v1.0.1
Published
JHipster blueprint to make the Angular navbar logo path relative (removes leading slash)
Maintainers
Readme
generator-jhipster-yellowbricks-angular-relativepathresource
One of - a JHipster blueprint that makes the navbar logo path relative in
navbar.scss.
JHipster source
- Generator:
generators/angular - Template:
navbar.scss.ejs
What it does
Patches src/main/webapp/app/layouts/navbar/navbar.scss during generation to remove the leading slash from the logo background URL:
vertical-align: middle;
- background: url('/content/images/logo-jhipster.png') no-repeat center center;
+ background: url('content/images/logo-jhipster.png') no-repeat center center;
background-size: contain;This ensures the logo loads correctly when the app is deployed under a non-root context path.
Prerequisites
- Node.js
^22.18.0 || >=24.11.0 - JHipster 9
Installation
npm install -g generator-jhipster-yellowbricks-angular-relativepathresourceUsage
No configuration is needed. Run JHipster with this blueprint:
# Standard generator
jhipster --blueprints yellowbricks-angular-relativepathresource
# With JDL
jhipster import-jdl your-app.jdl --blueprints yellowbricks-angular-relativepathresource