diff --git a/.gitignore b/.gitignore index feee3a44..2df0e95b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ public -build \ No newline at end of file +./build +node_modules +resources +npm-debug.log +.hugo_build.lock \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 6433a7d0..f1734c10 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "themes/learn"] - path = themes/learn - url = https://github.com/matcornic/hugo-theme-learn.git +[submodule "static/playground"] + path = static/playground + url = https://github.com/tinygo-org/playground.git diff --git a/README.md b/README.md index 729fcf6e..ab96319a 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,17 @@ Built using Hugo: http://gohugo.io/ -and the Hugo "Learn" theme: +and the Hugo "Docsy" theme: -https://github.com/matcornic/hugo-theme-learn +https://github.com/google/docsy -## Installation +## Prerequisites + +Install Hugo command line tool for your operating system with the "extended" option, along with the needed NodeJS modules for processing the site CSS: + +https://www.docsy.dev/docs/getting-started/#prerequisites-and-installation -Install Hugo command line tool for your operating system. +## Installation Clone this repo using: @@ -24,11 +28,7 @@ Change directories into the tinygo-site directory: cd tinygo-site -Install the "Learn" theme: - - git submodule update --init - -Now you should be able to run the site locally: +You are now able to run the site locally, "Docsy" theme will be automatically downloaded as module: hugo serve @@ -42,7 +42,4 @@ That's it. ## TODO: -- Generate custom godocs for all tinygo build tags, add to "Documentation" section, and point Godocs links there. -- Activate search. -- Custom domain for all packages - ? diff --git a/assets/icons/logo.svg b/assets/icons/logo.svg new file mode 100644 index 00000000..87d192e7 --- /dev/null +++ b/assets/icons/logo.svg @@ -0,0 +1,110 @@ + + + + diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss new file mode 100644 index 00000000..8b789837 --- /dev/null +++ b/assets/scss/_styles_project.scss @@ -0,0 +1,40 @@ +@import 'td/code-dark'; + +code { + tab-size: 4; +} + +.playground-editor { + /* make the editor scrollable */ + overflow: auto; +} +.playground-editor:not([style*="height"]) { + /* set a default max-height of 20 lines that is resizable (resizing will set + * style="height: ..." which invalidates this style) */ + max-height: calc(20em * var(--bs-body-line-height) + .375rem * 2); +} + +/* Match the appearance of a Bootstrap