From d84e24a979831ba2e7d392dee740cb80c2ebe607 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 26 Jun 2019 13:18:47 +0000 Subject: cmd/h: add documentation page --- cmd/h/http.go | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/h/http.go b/cmd/h/http.go index 37c1ce1..0b7bbd0 100644 --- a/cmd/h/http.go +++ b/cmd/h/http.go @@ -14,6 +14,7 @@ var ( func doHTTP() error { http.Handle("/", doTemplate(indexTemplate)) + http.Handle("/docs", doTemplate(docsTemplate)) http.HandleFunc("/api/playground", runPlayground) return http.ListenAndServe(":"+*port, nil) @@ -79,7 +80,7 @@ const indexTemplate = `

The h Programming Language

-

A simple, fast, complete and safe language for developing modern software for the web

+

A simple, fast, open-source, complete and safe language for developing modern software for the web


@@ -89,6 +90,12 @@ const indexTemplate = ` h +

Outputs:

+ + + h + +

Fast Compilation

@@ -118,6 +125,12 @@ const indexTemplate = `
+

Simple

+ +

h has a simple grammar that gzips to 117 bytes. Creating a runtime environment for h is so trivial just about anyone can do it.

+ +
+

Platform Support

h supports the following platforms:

@@ -147,7 +160,48 @@ const indexTemplate = `
  • This solves all my problems. All of them. Just not in the way I expected it to.
  • Yes.
  • Perfect.
  • +
  • h is the backbone of my startup.
  • + +
    + +

    Open-Source

    + +

    The h compiler and default runtime are open-source free software sent out into the Public Domain. You can use h for any purpose at all with no limitations or restrictions.

    ` + +const docsTemplate = ` + + The h Programming Language - Docs + + + + +
    + + +

    Documentation

    + +

    Coming out soon...

    + +
    + + +` -- cgit v1.2.3