diff --git a/htmgo-site/md/docs/quick-start/installation.md b/htmgo-site/md/docs/quick-start/installation.md index 0bccc1e..7a6656a 100644 --- a/htmgo-site/md/docs/quick-start/installation.md +++ b/htmgo-site/md/docs/quick-start/installation.md @@ -1,6 +1,61 @@ -### **Installation Instructions** +## **Getting Started** + + + +##### 1. **Install htmgo** ```bash -go install github.com/maddalax/htmgo@latest -go run htmgo template -``` \ No newline at end of file +go install github.com/maddalax/htmgo/cli/htmgo@latest +``` + + + +**2. Create new project** +Once htmgo cli tool is installed, run + +```bash +htmgo template +``` + +this will ask you for a new app name, and it will clone our starter template to a new directory it creates with your app name. + + + +**3. Running the dev server** +htmgo has built in live reload on the dev server, to use this, run this command in the root of your project + +```bash +htmgo watch +``` + +If you prefer to restart the dev server yourself (no live reload), use + +```bash +htmgo run +``` + + + +##### **4. Core concepts** + +View the [core concepts](/docs#concepts) of how to use htmgo, such as adding pages, using partials, routing, etc. + + + +**5. Building for production** +htmgo cli can be used to build the application for production as a single binary + +```bash +htmgo build +``` + +it will be output to **./dist** + + + +
+ +## **Troubleshooting:** + +**command not found: htmgo** +ensure you installed htmgo above and ensure GOPATH is set in your shell \ No newline at end of file diff --git a/htmgo-site/pages/docs.go b/htmgo-site/pages/docs.go index 45802c9..d4c938e 100644 --- a/htmgo-site/pages/docs.go +++ b/htmgo-site/pages/docs.go @@ -11,7 +11,7 @@ func DocsPage(ctx *h.RequestContext) *h.Page { return h.NewPage(base.RootPage( h.Div( - h.Class("flex flex-col p-4 justify-center items-center"), + h.Class("flex flex-col justify-center items-center"), h.List(pages, func(page dirwalk.Page, index int) *h.Element { return MarkdownContent(ctx, page.FilePath) }), diff --git a/htmgo-site/pages/markdown.go b/htmgo-site/pages/markdown.go index e801cd2..83cda4c 100644 --- a/htmgo-site/pages/markdown.go +++ b/htmgo-site/pages/markdown.go @@ -27,7 +27,7 @@ func MarkdownContent(ctx *h.RequestContext, path string) *h.Element { renderer := service.Get[markdown.Renderer](ctx.ServiceLocator()) return h.Div( h.Article( - h.Class("prose max-w-[95%] pt-3 md:p-4 md:max-w-2xl prose-code:text-black"), + h.Class("prose max-w-sm pt-3 p-4 md:p-4 md:max-w-2xl prose-code:text-black"), h.Raw(renderer.RenderFile(path)), ), )