Skip to content

Commit 788dcd0

Browse files
authored
Docs (#2779)
* add docs layout * update all to use _layouts * update the styling
1 parent 456cd7e commit 788dcd0

File tree

10 files changed

+91
-25
lines changed

10 files changed

+91
-25
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>{% if page.title %}{{ page.title }} | {% endif %}Go Micro Documentation</title>
7+
<style>
8+
body { font-family: sans-serif; margin: 0; padding: 0; background: #f9f9f9; }
9+
header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 2rem; background: #fff; border-bottom: 1px solid #eee; }
10+
.logo-link { display: flex; align-items: center; text-decoration: none; }
11+
.logo-link img { height: 40px; margin-right: 10px; }
12+
nav a { margin-left: 24px; color: #333; text-decoration: none; font-weight: 500; }
13+
nav a:hover { color: #007d9c; }
14+
main { max-width: 800px; margin: 2rem auto; background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
15+
pre { background: whitesmoke; padding: 10px; border-radius: 5px; }
16+
</style>
17+
</head>
18+
<body>
19+
<header>
20+
<a class="logo-link" href="/">
21+
<img src="/images/logo.png" alt="Go Micro Logo">
22+
<span style="font-size: 1.3rem; font-weight: bold; color: #222;">Go Micro</span>
23+
</a>
24+
<nav>
25+
<a href="/docs/">Docs</a>
26+
<a href="https://github.com/micro/go-micro" target="_blank" rel="noopener">GitHub</a>
27+
<a href="/">Home</a>
28+
</nav>
29+
</header>
30+
<main>
31+
{{ content }}
32+
</main>
33+
</body>
34+
</html>

internal/website/docs/architecture.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,7 @@
1+
---
2+
layout: default
3+
---
14

2-
## Example Usage
3-
4-
Here's a minimal Go Micro service demonstrating the architecture:
5-
6-
```go
7-
package main
8-
9-
import (
10-
"go-micro.dev/v5"
11-
"log"
12-
)
13-
14-
func main() {
15-
service := micro.NewService(
16-
micro.Name("example"),
17-
)
18-
service.Init()
19-
if err := service.Run(); err != nil {
20-
log.Fatal(err)
21-
}
22-
}
23-
```
245
## Architecture
256

267
An overview of the Go Micro architecture
@@ -63,3 +44,26 @@ in the plugins repo. State and persistence becomes a core requirement beyond pro
6344
## Design
6445

6546
We will share more on architecture soon
47+
48+
## Example Usage
49+
50+
Here's a minimal Go Micro service demonstrating the architecture:
51+
52+
```go
53+
package main
54+
55+
import (
56+
"go-micro.dev/v5"
57+
"log"
58+
)
59+
60+
func main() {
61+
service := micro.NewService(
62+
micro.Name("example"),
63+
)
64+
service.Init()
65+
if err := service.Run(); err != nil {
66+
log.Fatal(err)
67+
}
68+
}
69+
```

internal/website/docs/broker.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
layout: default
3+
---
4+
15
# Broker
26

37
The broker provides pub/sub messaging for Go Micro services.

internal/website/docs/client-server.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
layout: default
3+
---
4+
15
# Client/Server
26

37
Go Micro uses a client/server model for RPC communication between services.

internal/website/docs/getting-started.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
layout: default
3+
---
4+
15
# Getting Started
26

37
To make use of Go Micro
@@ -117,15 +121,15 @@ package greeter;
117121
option go_package = "/proto;helloworld";
118122
119123
service Say {
120-
rpc Hello(Request) returns (Response) {}
124+
rpc Hello(Request) returns (Response) {}
121125
}
122126
123127
message Request {
124-
string name = 1;
128+
string name = 1;
125129
}
126130
127131
message Response {
128-
string message = 1;
132+
string message = 1;
129133
}
130134
```
131135

internal/website/docs/README.md renamed to internal/website/docs/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
layout: default
3+
---
4+
15
# Docs
26

37
Documentation for the Go Micro framework

internal/website/docs/registry.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
layout: default
3+
---
4+
15
# Registry
26

37
The registry is responsible for service discovery in Go Micro. It allows services to register themselves and discover other services.

internal/website/docs/store.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
layout: default
3+
---
4+
15
# Store
26

37
The store provides a pluggable interface for data storage in Go Micro.

internal/website/docs/transport.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
layout: default
3+
---
4+
15
# Transport
26

37
The transport layer is responsible for communication between services.

internal/website/images/logo.png

8.5 KB
Loading

0 commit comments

Comments
 (0)