Skip to content

Commit

Permalink
Merge pull request #1110 from cogentcore/setup-docs
Browse files Browse the repository at this point in the history
add more clear pointers to install docs
  • Loading branch information
rcoreilly authored Aug 3, 2024
2 parents 0fbbdd8 + 0390a9a commit 8730313
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/content/1-basics/0-hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ func main() {
Notice how you can see the result of the code above, a button with the text "Hello, World!". Not only can you see the result of the code, you can edit the code live. Try changing "Hello, World!" to "Click me!" and you will see the button update accordingly.

Even though Cogent Core is written in Go, a compiled language, it uses the interpreter [yaegi](https://github.com/cogentcore/yaegi) to provide interactive editing. You can edit almost all of the examples on this website and see the result immediately. You can also use the [Cogent Core playground](../playground) to experiment interactively with Cogent Core.

You can jump ahead to the [install](../setup/install) page if you want to get started developing on your computer now, although we recommend that you follow the default order and read the rest of the basics and tutorials first.
2 changes: 1 addition & 1 deletion docs/content/2-setup/0-install.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Now that you have read the [basics](../basics) and [tutorials](../tutorials), you are ready to start developing with Cogent Core on your system. Complete the following steps to install Cogent Core:
Note: we recommend you read the [basics](../basics) and [tutorials](../tutorials) before you start developing with Cogent Core on your system. Complete the following steps to install Cogent Core:

1. Download and install Go from [the Go website](https://go.dev/doc/install) if you do not already have Go 1.22+ installed.
2. Run `go install cogentcore.org/core/cmd/core@main` to install the Cogent Core command line tool.
Expand Down
22 changes: 12 additions & 10 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ func main() {
htmlcore.WikilinkBaseURL = "cogentcore.org/core"
b.AddAppBar(pg.MakeToolbar)
b.AddAppBar(func(p *tree.Plan) {
tree.Add(p, func(w *core.Button) {
w.SetText("Setup").SetIcon(icons.Download)
w.OnClick(func(e events.Event) {
pg.Context.OpenURL("/setup")
})
})
tree.Add(p, func(w *core.Button) {
w.SetText("Playground").SetIcon(icons.PlayCircle)
w.OnClick(func(e events.Event) {
Expand Down Expand Up @@ -238,10 +232,18 @@ func homePage(ctx *htmlcore.Context) bool {
tree.AddChild(home, func(w *core.Text) {
w.SetType(core.TextHeadlineMedium).SetText("A cross-platform framework for building powerful, fast, elegant 2D and 3D apps")
})
tree.AddChild(home, func(w *core.Button) {
w.SetText("Get started")
w.OnClick(func(e events.Event) {
ctx.OpenURL("basics")
tree.AddChild(home, func(w *core.Frame) {
tree.AddChild(w, func(w *core.Button) {
w.SetText("Get started")
w.OnClick(func(e events.Event) {
ctx.OpenURL("/basics")
})
})
tree.AddChild(w, func(w *core.Button) {
w.SetText("Install").SetType(core.ButtonTonal)
w.OnClick(func(e events.Event) {
ctx.OpenURL("/setup/install")
})
})
})

Expand Down

0 comments on commit 8730313

Please sign in to comment.