You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .markdownlint.yml
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,8 @@ default: true
7
7
extends: null
8
8
9
9
# MD001/heading-increment : Heading levels should only increment by one level at a time : https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md001.md
10
-
MD001: true
10
+
# NOTE: The docs intentionally jump heading levels for anchor stability, so skip this rule globally.
Copy file name to clipboardExpand all lines: docs/api/app.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,25 @@ Returns `b` unchanged when [`Immutable`](./fiber.md#immutable) is disabled or `b
25
25
func (app *App) GetBytes(b []byte) []byte
26
26
```
27
27
28
+
### ReloadViews
29
+
30
+
Reloads the configured view engine on demand by calling its `Load` method. Use this helper in development workflows (e.g., file watchers or debug-only routes) to pick up template changes without restarting the server. Returns an error if no view engine is configured or reloading fails.
31
+
32
+
```go title="Signature"
33
+
func (app *App) ReloadViews() error
34
+
```
35
+
36
+
```go title="Example"
37
+
app := fiber.New(fiber.Config{Views: engine})
38
+
39
+
app.Get("/dev/reload", func(c fiber.Ctx) error {
40
+
iferr:= app.ReloadViews(); err != nil {
41
+
return err
42
+
}
43
+
return c.SendString("Templates reloaded")
44
+
})
45
+
```
46
+
28
47
## Routing
29
48
30
49
import RoutingHandler from './../partials/routing/handler.md';
Copy file name to clipboardExpand all lines: docs/whats_new.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,7 @@ We have made several changes to the Fiber app, including:
84
84
-**State**: Provides a global state for the application, which can be used to store and retrieve data across the application. Check out the [State](./api/state) method for further details.
85
85
-**NewErrorf**: Allows variadic parameters when creating formatted errors.
86
86
-**GetBytes / GetString**: Helpers that detach values only when `Immutable` is enabled and the data still references request or response buffers. Access via `c.App().GetString` and `c.App().GetBytes`.
87
+
-**ReloadViews**: Lets you re-run the configured view engine's `Load()` logic at runtime, including guard rails for missing or nil view engines so development hot-reload hooks can refresh templates safely.
0 commit comments