Skip to content

Commit 76d761d

Browse files
committed
Fix relative links in readme
1 parent c73dbf4 commit 76d761d

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

Readme.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ There are several possible ways to setup JsRoutes:
2929
4. [Sprockets](#sprockets) - Legacy
3030
* Deprecated and not recommended for modern apps
3131

32-
### Quick Start {#quick-start}
32+
<div id="quick-start"></div>
33+
34+
### Quick Start
3335

3436
Setup [Rack Middleware](https://guides.rubyonrails.org/rails_on_rack.html#action-dispatcher-middleware-stack)
3537
to automatically generate and maintain `routes.js` file and corresponding
@@ -75,7 +77,9 @@ Add js-routes files to `.gitignore`:
7577
/app/javascript/routes.d.ts
7678
```
7779

78-
### Webpacker ERB loader {#webpack}
80+
<div id="webpack"></div>
81+
82+
### Webpacker ERB loader
7983

8084
**IMPORTANT**: the setup doesn't support IDE autocompletion with [Typescript](https://www.typescriptlang.org/docs/handbook/declaration-files/templates/module-d-ts.html)
8185

@@ -136,7 +140,9 @@ import {post_path} from 'routes.js.erb';
136140
alert(post_path(2));
137141
```
138142

139-
### Advanced Setup {#advanced-setup}
143+
<div id="advanced-setup"></div>
144+
145+
### Advanced Setup
140146

141147
In case you need multiple route files for different parts of your application, there are low level methods:
142148

@@ -201,7 +207,9 @@ class AdvancedJsRoutesMiddleware < JsRoutes::Middleware
201207
end
202208
```
203209

204-
#### Typescript Definitions {#definitions}
210+
<div id="definitions"></div>
211+
212+
#### Typescript Definitions
205213

206214
JsRoutes has typescript support out of the box.
207215

@@ -222,7 +230,9 @@ JsRoutes.definitions # to output to string
222230
Even more advanced setups can be achieved by setting `module_type` to `DTS` inside [configuration](#module_type)
223231
which will cause any `JsRoutes` instance to generate defintions instead of routes themselves.
224232

225-
### Sprockets (Deprecated) {#sprockets}
233+
<div id="sprockets"></div>
234+
235+
### Sprockets (Deprecated)
226236

227237
If you are using [Sprockets](https://github.com/rails/sprockets-rails) you may configure js-routes in the following way.
228238

0 commit comments

Comments
 (0)