Skip to content

Commit 257ff26

Browse files
authored
docs: update README templates (#31861)
The README had a few inconsistencies. Use more Markdown elements and unify notation. Use code fences and note syntax with "bash", vs indentation, default, or "sh". Complete Markdown URLs. Some were incomplete or used an incorrect notation, i.e., "[text][]" vs. "[text]()", note the use of parentheticals over brackets. Add a References section and use Markdown unordered list syntax. Review links to documentation and add where missing or update to current locations to reduce redirects. Fixes: #31860
1 parent 4c19c45 commit 257ff26

File tree

9 files changed

+113
-93
lines changed

9 files changed

+113
-93
lines changed

generators/angular/templates/README.md.jhi.client.angular.ejs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,28 @@
2121
EJS fragments will process % delimiter tags in the template and & delimiter tags during the merge process.
2222
-%>
2323
<&_ if (fragment.customCliSection) { -&>
24-
[Angular CLI][] with
24+
[Angular CLI](https://angular.dev/tools/cli) with
2525
<&_ } -&>
2626
<&_ if (fragment.developmentSection) { -&>
2727
### Using Angular CLI
2828

29-
You can also use [Angular CLI][] to generate some custom client code.
29+
You can also use [Angular CLI](https://angular.dev/tools/cli) to generate some custom client code.
3030

3131
For example, the following command:
3232

33-
```
33+
```bash
3434
ng generate component my-component
3535
```
3636

3737
will generate few files:
3838

39-
```
39+
```bash
4040
create <%= clientSrcDir %>app/my-component/my-component.html
4141
create <%= clientSrcDir %>app/my-component/my-component.ts
4242
update <%= clientSrcDir %>app/app.config.ts
4343
```
4444

4545
<&_ } -&>
4646
<&_ if (fragment.referenceSection) { _&>
47-
[Angular CLI]: https://angular.dev/tools/cli
47+
- [Angular CLI](https://angular.dev/tools/cli)
4848
<&_ } -&>

generators/client/templates/README.md.jhi.client.ejs

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,23 @@ After installing Node, you should be able to run the following command to instal
4646
<%_ } _%>
4747
You will only need to run this command when dependencies change in [package.json](package.json).
4848
49-
```
49+
```bash
5050
<%= nodePackageManagerCommand %> install
5151
```
5252
53-
We use <%- nodePackageManager %> scripts and <&- fragments.customCliSection(' ') &>[<%= clientBundlerName %>][] as our build system.
53+
We use <%- nodePackageManager %> scripts and <&- fragments.customCliSection(' ') &><%= clientBundlerName %> as our build system.
5454
5555
<%_ if (locals.cacheProviderRedis || locals.cacheProviderHazelcast || locals.cacheProviderMemcached) { _%>
5656
If you are using <%= cacheProvider %> as a cache, you will have to launch a cache server.
5757
To start your cache server, run:
5858
59-
```
59+
```bash
6060
docker compose -f src/main/docker/<%= locals.cacheProviderHazelcast ? 'hazelcast-management-center' : cacheProvider %>.yml up -d
6161
```
6262
6363
<%_ if (cacheProviderRedis) { _%>
6464
65-
The cache can also be turned off by adding to the application yaml:
65+
The cache can also be turned off by adding to the `application.yml`:
6666
6767
```yaml
6868
spring:
@@ -72,15 +72,14 @@ spring:
7272
7373
See [here](https://docs.spring.io/spring-boot/reference/io/caching.html#io.caching.provider.none) for details.
7474
75-
**WARNING**: If you're using the second level Hibernate cache and disabling the Spring cache, you have to disable the second level Hibernate cache as well since they are using
76-
the same CacheManager.
75+
**WARNING**: If you're using the second level Hibernate cache and disabling the Spring cache, you have to disable the second level Hibernate cache as well since they are using the same CacheManager.
7776
<%_ } _%>
7877
<%_ } _%>
7978
8079
Run the following commands in two separate terminals to create a blissful development experience where your browser
8180
auto-refreshes when files change on your hard drive.
8281
83-
```
82+
```bash
8483
<%= nodePackageManagerCommand %> backend:start
8584
<%= nodePackageManagerCommand %> start
8685
```
@@ -120,36 +119,36 @@ ServiceWorkerModule.register('ngsw-worker.js', { enabled: false }),
120119
121120
### Managing dependencies
122121
123-
For example, to add [Leaflet][] library as a runtime dependency of your application, you would run the following command:
122+
For example, to add [Leaflet](https://leafletjs.com/) library as a runtime dependency of your application, you would run the following command:
124123
125-
```
124+
```bash
126125
<%= nodePackageManagerCommand %> <%= clientPackageMngrAdd %> leaflet
127126
```
128127
129-
To benefit from TypeScript type definitions from [DefinitelyTyped][] repository in development, you would run the following command:
128+
To benefit from TypeScript type definitions from [DefinitelyTyped](https://definitelytyped.org/) repository in development, you would run the following command:
130129
131-
```
130+
```bash
132131
<%= nodePackageManagerCommand %> <%= clientPackageMngrAddDev %> @types/leaflet
133132
```
134133
135134
Then you would import the JS and CSS files specified in library's installation instructions so that [<%= clientBundlerName %>][] knows about them:
136135
<%_ if (clientFrameworkAngular) { _%>
137136
Edit [<%= clientSrcDir %>app/app.config.ts](<%= clientSrcDir %>app/app.config.ts) file:
138137
139-
```
138+
```typescript
140139
import 'leaflet/dist/leaflet.js';
141140
```
142141
143142
Edit [<%= clientSrcDir %>content/scss/vendor.scss](<%= clientSrcDir %>content/scss/vendor.scss) file:
144143
145-
```
144+
```typescript
146145
@import 'leaflet/dist/leaflet.css';
147146
```
148147
149148
<%_ } _%>
150149
Note: There are still a few other things remaining to do for Leaflet that we won't detail here.
151150
152-
For further instructions on how to develop with JHipster, have a look at [Using JHipster in development][].
151+
For further instructions on how to develop with JHipster, have a look at [Using JHipster in development](https://www.jhipster.tech/development/).
153152
154153
<%_ if (microfrontend) { -%>
155154
### Developing Microfrontend
@@ -159,7 +158,7 @@ You must start a pre-built gateway version or from source.
159158
160159
Start gateway from source:
161160
162-
```
161+
```bash
163162
cd gateway
164163
<%= nodePackageManagerCommand %> run docker:db:up # start database if necessary
165164
<%= nodePackageManagerCommand %> run docker:others:up # start service discovery and authentication service if necessary
@@ -169,15 +168,15 @@ cd gateway
169168
Microfrontend's `build-watch` script is configured to watch and compile microfrontend's sources and synchronizes with gateway's frontend.
170169
Start it using:
171170
172-
```
171+
```bash
173172
cd microfrontend
174173
<%= nodePackageManagerCommand %> run docker:db:up # start database if necessary
175174
<%= nodePackageManagerCommand %> run build-watch
176175
```
177176
178177
It's possible to run microfrontend's frontend standalone using:
179178
180-
```
179+
```bash
181180
cd microfrontend
182181
<%= nodePackageManagerCommand %> run docker:db:up # start database if necessary
183182
<%= nodePackageManagerCommand %> watch # alias for `npm start` and `npm run backend:start` in parallel
@@ -189,23 +188,23 @@ cd microfrontend
189188
<&_ if (fragment.testingSection) { -&>
190189
### Client tests
191190
192-
Unit tests are run by [<%= clientTestFrameworkName %>][]. They're located near components and can be run with:
191+
Unit tests are run by <%= clientTestFrameworkName %>. They're located near components and can be run with:
193192
194-
```
193+
```bash
195194
<%= nodePackageManagerCommand %> test
196195
```
197196
<&_ } -&>
198197
<&_ if (fragment.referenceSection) { -&>
199198
<%_ if (clientBundlerWebpack) { _%>
200-
[Webpack]: https://webpack.js.org/
199+
- [Webpack](https://webpack.js.org/)
201200
<%_ } -%>
202201
<%_ if (clientFrameworkReact || clientFrameworkAngular || microfrontend) { _%>
203-
[BrowserSync]: https://www.browsersync.io/
202+
- [BrowserSync](https://www.browsersync.io/)
204203
<%_ } -%>
205204
<%_ if (clientFrameworkAngular || clientFrameworkReact) { _%>
206-
[Jest]: https://jestjs.io
205+
- [Jest](https://jestjs.io)
207206
<%_ } -%>
208-
[Leaflet]: https://leafletjs.com/
209-
[DefinitelyTyped]: https://definitelytyped.org/
207+
- [Leaflet](https://leafletjs.com/)
208+
- [DefinitelyTyped](https://definitelytyped.org/)
210209
<&_ } -&>
211210
<&- fragments.render() -&>

generators/common/__snapshots__/generator.spec.ts.snap

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,19 @@ This application was generated using JHipster JHIPSTER_VERSION, you can find doc
140140
141141
142142
143-
[JHipster Homepage and latest documentation]: https://www.jhipster.tech/
144-
[JHipster JHIPSTER_VERSION archive]: https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION
145-
[Using JHipster in development]: https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/development/
146-
[Using Docker and Docker-Compose]: https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/docker-compose
147-
[Using JHipster in production]: https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/production/
148-
[Running tests page]: https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/running-tests/
149-
[Code quality page]: https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/code-quality/
150-
[Setting up Continuous Integration]: https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/setting-up-ci/
151-
152-
[Node.js]: https://nodejs.org/
153-
[NPM]: https://www.npmjs.com/
143+
144+
## References
145+
146+
- [JHipster Homepage and latest documentation](https://www.jhipster.tech/)
147+
- [JHipster JHIPSTER_VERSION archive](https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION)
148+
- [Using JHipster in development](https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/development/)
149+
- [Using Docker and Docker-Compose](https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/docker-compose)
150+
- [Using JHipster in production](https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/production/)
151+
- [Running tests page](https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/running-tests/)
152+
- [Code quality page](https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/code-quality/)
153+
- [Setting up Continuous Integration](https://www.jhipster.tech/documentation-archive/vJHIPSTER_VERSION/setting-up-ci/)
154+
- [Node.js](https://nodejs.org/)
155+
- [NPM](https://www.npmjs.com/)
154156
",
155157
"stateCleared": "modified",
156158
},

generators/common/templates/README.md.jhi.ejs

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,26 @@ This application was generated using JHipster <%= jhipsterVersion %>, you can fi
5656

5757
<&- fragments.othersSection() &>
5858
<& } &>
59-
[JHipster Homepage and latest documentation]: <%= hipsterDocumentationLink %>
60-
[JHipster <%= jhipsterVersion %> archive]: <%= documentationArchiveUrl %>
59+
60+
## References
61+
62+
- [JHipster Homepage and latest documentation](<%= hipsterDocumentationLink %>)
63+
- [JHipster <%= jhipsterVersion %> archive](<%= documentationArchiveUrl %>)
6164
<%_ if (applicationTypeGateway || applicationTypeMicroservice) { _%>
62-
[Doing microservices with JHipster]: <%= documentationArchiveUrl %>/microservices-architecture/
65+
- [Doing microservices with JHipster](<%= documentationArchiveUrl %>/microservices-architecture/)
6366
<%_ } _%>
64-
[Using JHipster in development]: <%= documentationArchiveUrl %>/development/
67+
- [Using JHipster in development](<%= documentationArchiveUrl %>/development/)
6568
<%_ if (serviceDiscoveryEureka) { _%>
66-
[Service Discovery and Configuration with the JHipster-Registry]: <%= documentationArchiveUrl %>/microservices-architecture/#jhipster-registry
69+
- [Service Discovery and Configuration with the JHipster-Registry](<%= documentationArchiveUrl %>/microservices-architecture/#jhipster-registry)
6770
<%_ } _%>
6871
<%_ if (serviceDiscoveryConsul) { _%>
69-
[Service Discovery and Configuration with Consul]: <%= documentationArchiveUrl %>/microservices-architecture/#consul
72+
- [Service Discovery and Configuration with Consul](<%= documentationArchiveUrl %>/microservices-architecture/#consul)
7073
<%_ } _%>
71-
[Using Docker and Docker-Compose]: <%= documentationArchiveUrl %>/docker-compose
72-
[Using JHipster in production]: <%= documentationArchiveUrl %>/production/
73-
[Running tests page]: <%= documentationArchiveUrl %>/running-tests/
74-
[Code quality page]: <%= documentationArchiveUrl %>/code-quality/
75-
[Setting up Continuous Integration]: <%= documentationArchiveUrl %>/setting-up-ci/
76-
77-
[Node.js]: https://nodejs.org/
78-
[NPM]: https://www.npmjs.com/
74+
- [Using Docker and Docker-Compose](<%= documentationArchiveUrl %>/docker-compose)
75+
- [Using JHipster in production](<%= documentationArchiveUrl %>/production/)
76+
- [Running tests page](<%= documentationArchiveUrl %>/running-tests/)
77+
- [Code quality page](<%= documentationArchiveUrl %>/code-quality/)
78+
- [Setting up Continuous Integration](<%= documentationArchiveUrl %>/setting-up-ci/)
79+
- [Node.js](https://nodejs.org/)
80+
- [NPM](https://www.npmjs.com/)
7981
<&- fragments.referenceSection() &>

generators/cypress/templates/README.md.jhi.cypress.ejs

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ and can be run by starting Spring Boot in one terminal (`<%= nodePackageManagerC
2828

2929
Before running Cypress tests, it's possible to specify user credentials by overriding the `CYPRESS_E2E_USERNAME` and `CYPRESS_E2E_PASSWORD` environment variables.
3030

31-
```
31+
```bash
3232
export CYPRESS_E2E_USERNAME="<your-username>"
3333
export CYPRESS_E2E_PASSWORD="<your-password>"
3434
```
@@ -38,8 +38,10 @@ See Cypress documentation for setting OS [environment variables](https://docs.cy
3838
#### Lighthouse audits
3939

4040
You can execute automated [Lighthouse audits](https://developer.chrome.com/docs/lighthouse/overview) with [cypress-audit](https://github.com/mfrachet/cypress-audit) by running `<%= nodePackageManagerCommand %> run e2e:cypress:audits`.
41+
4142
You should only run the audits when your application is packaged with the production profile.
42-
The lighthouse report is created in `<%= cypressTemporaryDir %>lhreport.html`.
43+
44+
The Lighthouse report is created in `<%= cypressTemporaryDir %>lhreport.html`.
4345
<%_ if (cypressCoverage) { _%>
4446
4547
### E2E Webapp Code Coverage
@@ -49,21 +51,27 @@ When using Cypress, you can generate code coverage report by running your dev se
4951
<%_ if (cypressCoverageWebpack) { _%>
5052
Build your Angular application with instrumented code:
5153
52-
<%= nodePackageManagerCommand %> run webapp:instrumenter
54+
```bash
55+
<%= nodePackageManagerCommand %> run webapp:instrumenter
56+
```
5357
5458
<%_ } _%>
5559
Start your backend without compiling frontend:
5660
57-
<%= nodePackageManagerCommand %> run backend:start
61+
```bash
62+
<%= nodePackageManagerCommand %> run backend:start
63+
```
5864
5965
Start your Cypress end to end testing:
6066
61-
<%= nodePackageManagerCommand %> run e2e --configuration coverage
67+
```bash
68+
<%= nodePackageManagerCommand %> run e2e --configuration coverage
69+
```
6270
6371
The coverage report is generated under `<%- temporaryDir %>/cypress-coverage` folder.
6472
6573
<%_ } _%>
6674
<&_ } -&>
6775
<&_ if (fragment.referenceSection) { -&>
68-
[Cypress]: https://www.cypress.io/
76+
- [Cypress](https://www.cypress.io/)
6977
<&_ } -&>

generators/java-simple-application/generators/graalvm/templates/README.md.jhi.native.ejs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,15 @@
2626
#### Installation
2727

2828
To build a Native image, you need to install a JDK that is compatible with GraalVM. Please refer to the [GraalVM Release Notes](https://www.graalvm.org/release-notes/) and install the appropriate JDK. Using SDKMAN simplifies the installation process.
29-
```
29+
30+
```bash
3031
sdk install java 21-graalce
3132
```
33+
3234
#### How to Build a Native Image
3335

3436
To build a native image, execute the following command:
37+
3538
```bash
3639
npm run native-package
3740
# <%- packageJsonScripts['native-package'] %>
@@ -40,12 +43,14 @@ npm run native-package
4043
After that, set up peripheral services like PostgreSQL using `npm run services:up`(<%- packageJsonScripts['services:up'] %>) and ensure everything is ready.
4144

4245
Lastly, run the Native image and experience its fast startup 😊.
46+
4347
```bash
4448
npm run native-start
4549
# <%- packageJsonScripts['native-start'] %>
4650
```
4751

4852
If you've enabled e2e testing with Cypress, you can verify its operation using the following command:
53+
4954
```bash
5055
npm run native-e2e
5156
# <%- packageJsonScripts['native-e2e'] %>

generators/java-simple-application/generators/openapi-generator/templates/README.md.jhi.openapi-generator.ejs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<&_ if (fragment.developmentSection) { -&>
2424
### Doing API-First development using openapi-generator-cli
2525

26-
[OpenAPI-Generator]() is configured for this application. You can generate API code from the `src/main/resources/swagger/api.yml` definition file by running:
26+
[OpenAPI-Generator](https://openapi-generator.tech) is configured for this application. You can generate API code from the `src/main/resources/swagger/api.yml` definition file by running:
2727
<%_ if (buildToolMaven) { _%>
2828
```bash
2929
./mvnw generate-sources
@@ -38,11 +38,11 @@ Then implements the generated delegate classes with `@Service` classes.
3838

3939
To edit the `api.yml` definition file, you can use a tool such as [Swagger-Editor](). Start a local instance of the swagger-editor using docker by running: `docker compose -f src/main/docker/swagger-editor.yml up -d`. The editor will then be reachable at [http://localhost:7742](http://localhost:7742).
4040

41-
Refer to [Doing API-First development][] for more details.
41+
Refer to [Doing API-First development](<%= documentationArchiveUrl %>/doing-api-first-development/) for more details.
4242
<&_ } -&>
4343

4444
<&_ if (fragment.referenceSection) { -&>
45-
[OpenAPI-Generator]: https://openapi-generator.tech
46-
[Swagger-Editor]: https://editor.swagger.io
47-
[Doing API-First development]: <%= documentationArchiveUrl %>/doing-api-first-development/
45+
- [OpenAPI-Generator](https://openapi-generator.tech)
46+
- [Swagger-Editor](https://editor.swagger.io)
47+
- [Doing API-First development](<%= documentationArchiveUrl %>/doing-api-first-development/)
4848
<&_ } -&>
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
<&_ if (fragment.testingSection) { -&>
22
### Gatling
33

4-
Performance tests are run by [Gatling][] and written in Scala. They're located in [src/test/java/gatling/simulations](src/test/java/gatling/simulations).
4+
Performance tests are run by [Gatling](https://gatling.io/) and written in Scala. They're located in [src/test/java/gatling/simulations](src/test/java/gatling/simulations).
55

66
You can execute all Gatling tests with
7-
```
7+
8+
```bash
89
<%_ if (buildToolMaven) { _%>
910
./mvnw gatling:test
1011
<%_ } else { _%>
11-
./gradlew gatlingRun.
12+
./gradlew gatlingRun
1213
<%_ } _%>
1314
```
1415

1516
<&_ } -&>
1617

1718
<&_ if (fragment.referenceSection) { -&>
18-
[Gatling]: https://gatling.io/
19+
- [Gatling](https://gatling.io/)
1920
<&_ } -&>

0 commit comments

Comments
 (0)