generator-jhipster-yellowbricks-client-contextpath
v1.1.1
Published
JHipster blueprint to configure client-side base href via a custom context path
Maintainers
Readme
generator-jhipster-yellowbricks-client-contextpath
One of - a JHipster blueprint that sets the
<base href> in client HTML files to a configurable context path.
JHipster source
- Generator:
generators/client - Templates:
What it does
Patches two HTML files during generation:
src/main/webapp/index.html
-<base href="/" />
+<base href="/jh/" />src/main/webapp/swagger-ui/index.html
-<base href="/swagger-ui/" />
+<base href="/jh/swagger-ui/" />The value is configurable — any context path can be used.
Prerequisites
- Node.js
^22.18.0 || >=24.11.0 - JHipster 9
Installation
npm install -g generator-jhipster-yellowbricks-client-contextpathUsage
Create a .yo-rc.json in your project directory with the desired context path:
{
"generator-jhipster-yellowbricks-client-contextpath": {
"contextPath": "/jh/"
}
}Then run JHipster with this blueprint:
# Standard generator
jhipster --blueprints yellowbricks-client-contextpath
# With JDL
jhipster import-jdl your-app.jdl --blueprints yellowbricks-client-contextpathReplace /jh/ with your actual context path. The trailing slash is required.
