Skip to content

Commit 4959f41

Browse files
authored
Merge pull request #23 from nilotpaul/cli
fixed root layout issue in generated template & updated docs
2 parents 4e64b0e + f610e38 commit 4959f41

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
A modern CLI Tool to bootstrap scalable web applications without hassling with JavaScript. It provides pre-configured developer tooling with no bloat, flexible for easy one step deployments.
66

7-
87
# What's better?
98

109
- Only the necessary pre-configuration (full-control).
@@ -69,5 +68,6 @@ Read detailed usage and examples of every stack configured.
6968
# Coming Soon
7069

7170
- More Framework Options.
71+
- Different Rendering Strategies (seperate client, [templ](https://templ.guide)).
7272
- More examples and documentation.
7373
- Please suggest More 🙏🏼

docs/go-fiber-templates.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,18 @@ You only need:
5151
5252
- Commands to build for production:
5353
```sh
54-
build cmd:
54+
# build cmd:
5555
node ./esbuild.config.js
5656
go build -tags '!dev' -o bin/build
5757

58-
run cmd:
58+
# run cmd:
5959
ENVIRONMENT=PRODUCTION ./bin/build
6060
```
6161

6262
# How easy it is to use?
6363

6464
> **Note: By default it'll use the default root layout**
6565
66-
6766
## Simple Example
6867
```go
6968
func handleGetHome(c *fiber.Ctx) error {

util/rawdata_util.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ func processRootLayoutPageData(cfg StackConfig) string {
8383
{{ end }}
8484
%s
8585
86-
<body class="%s">{{ embed }}</body>
86+
<title>{{ .Ctx.Title }}</title>
87+
<meta name="title" content="{{ .Ctx.Title }}">
8788
</head>
89+
<body class="%s">{{ embed }}</body>
8890
</html>
8991
`,
9092
generateHeadStyles(cfg),
@@ -115,6 +117,7 @@ func processRawHomePageData(cfg StackConfig) string {
115117
%s
116118
117119
<title>{{ .Ctx.Title }}</title>
120+
<meta name="title" content="{{ .Ctx.Title }}">
118121
</head>
119122
%s
120123
</html>
@@ -146,7 +149,8 @@ func processRawErrorPageData(cfg StackConfig) string {
146149
<script src="http://localhost:35729/livereload.js"></script>
147150
{{ end }}
148151
149-
<title>{{ .Ctx.Msg }}</title>
152+
<title>{{ .Ctx.Title }}</title>
153+
<meta name="title" content="{{ .Ctx.Title }}">
150154
</head>
151155
%s
152156
</html>

0 commit comments

Comments
 (0)