this repo has no description smallweb.run
smallweb
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove docs embedding

pomdtr ed24ea90 c64e755d

-38
-3
cmd/up.go
··· 23 23 "github.com/pomdtr/smallweb/app" 24 24 "github.com/pomdtr/smallweb/auth" 25 25 "github.com/pomdtr/smallweb/database" 26 - "github.com/pomdtr/smallweb/docs" 27 26 28 27 "github.com/pomdtr/smallweb/utils" 29 28 "github.com/pomdtr/smallweb/worker" ··· 223 222 var handler http.Handler 224 223 if a.Entrypoint() == "smallweb:api" { 225 224 handler = me.apiServer 226 - } else if a.Entrypoint() == "smallweb:docs" { 227 - handler = docs.Handler 228 225 } else if a.Entrypoint() == "smallweb:static" { 229 226 handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 230 227 w.Header().Set("Access-Control-Allow-Origin", "*")
-24
docs/docs.go
··· 1 - package docs 2 - 3 - import ( 4 - "embed" 5 - _ "embed" 6 - "io/fs" 7 - "net/http" 8 - ) 9 - 10 - //go:generate mdbook build 11 - 12 - //go:embed book 13 - var embedFS embed.FS 14 - 15 - var Handler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { 16 - subFS, err := fs.Sub(embedFS, "book") 17 - if err != nil { 18 - http.Error(w, err.Error(), http.StatusInternalServerError) 19 - return 20 - } 21 - 22 - server := http.FileServer(http.FS(subFS)) 23 - server.ServeHTTP(w, r) 24 - })
-1
docs/src/SUMMARY.md
··· 13 13 - [Authentication](./guides/auth.md) 14 14 - [REST Api](./guides/rest.md) 15 15 - [App Sandbox](./guides/sandbox.md) 16 - - [Hosting Docs](./guides/docs.md) 17 16 18 17 # Hosting 19 18
-10
docs/src/guides/docs.md
··· 1 - # Hosting the Docs 2 - 3 - Each smallweb instance bundle it's own documentation! You can serve it using the following smallweb.json: 4 - 5 - ```json 6 - // ~/smallweb/docs/smallweb.json 7 - { 8 - "entrypoint": "smallweb:docs" 9 - } 10 - ```