Skip to content

Commit

Permalink
minimal htmgo doc
Browse files Browse the repository at this point in the history
  • Loading branch information
maddalax committed Nov 21, 2024
1 parent 495e759 commit 9b69b25
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
28 changes: 28 additions & 0 deletions htmgo-site/pages/docs/misc/minimal-htmgo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package misc

import (
"github.com/maddalax/htmgo/framework/h"
. "htmgo-site/pages/docs"
)

func MinimalHtmgo(ctx *h.RequestContext) *h.Page {
return DocPage(
ctx,
h.Div(
h.Class("flex flex-col gap-3"),
Title("Minimal Htmgo"),
Text(`
Looking to use htmgo as an html builder but don't want to install the entire framework? View our minimal htmgo example below:
`),
Link("Minimal htmgo template", "https://github.com/maddalax/htmgo/tree/master/examples/minimal-htmgo"),
Text("This is the most minimal example of htmgo you can get, it does not require the htmgo cli, and can be used with any go project."),
Text("Since this is a minimal example, it does not include many of the main features that the htmgo framework provides, which are: live reload, automatic tailwind css generation, and automatic partial/page registration. Those features are only available in the full htmgo framework that utilizes the htmgo cli for preprocessing."),
Text("This is useful for those who want to use htmgo as an html builder with js evaluation support, but do not want to use the full htmgo framework, such as when embedding into a different application."),
NextStep(
"mt-4",
PrevBlock("Introduction", DocPath("/introduction")),
NextBlock("Core Concepts", DocPath("/core-concepts/pages")),
),
),
)
}
4 changes: 2 additions & 2 deletions htmgo-site/pages/docs/related-projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func RelatedProjects(ctx *h.RequestContext) *h.Page {
),
NextStep(
"mt-4",
PrevBlock("Tailwind Intellisense", "/docs/misc/tailwind-intellisense"),
NextBlock("Adding Interactivity", "/docs/interactivity/swapping"),
PrevBlock("Introduction", DocPath("/introduction")),
NextBlock("Core Concepts", DocPath("/core-concepts/pages")),
),
),
)
Expand Down
1 change: 1 addition & 0 deletions htmgo-site/pages/docs/sidebar.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var sections = []Section{
{Title: "Introduction", Path: DocPath("/introduction")},
{Title: "Quick Start", Path: DocPath("/installation")},
{Title: "Related Projects", Path: DocPath("/related-projects")},
{Title: "Minimal Htmgo", Path: DocPath("/misc/minimal-htmgo")},
},
},
{
Expand Down

0 comments on commit 9b69b25

Please sign in to comment.