{"id":17091018,"url":"https://github.com/lu4p/go-template-turbo-sample","last_synced_at":"2025-05-12T15:36:53.874Z","repository":{"id":51514643,"uuid":"325428373","full_name":"lu4p/go-template-turbo-sample","owner":"lu4p","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-11T13:16:14.000Z","size":213,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T23:42:11.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lu4p.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-30T01:50:40.000Z","updated_at":"2021-05-11T13:16:16.000Z","dependencies_parsed_at":"2022-08-21T14:40:12.714Z","dependency_job_id":null,"html_url":"https://github.com/lu4p/go-template-turbo-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu4p%2Fgo-template-turbo-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu4p%2Fgo-template-turbo-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu4p%2Fgo-template-turbo-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lu4p%2Fgo-template-turbo-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lu4p","download_url":"https://codeload.github.com/lu4p/go-template-turbo-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253766655,"owners_count":21960964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T13:57:20.954Z","updated_at":"2025-05-12T15:36:53.844Z","avatar_url":"https://github.com/lu4p.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-template-turbo-sample\nThis is a sample project to show how to use Go (templates) with Turbo.\n\nThis project uses:\n- [Go](https://golang.org/), a programming language that makes it easy to build simple, reliable, and efficient software.\n- [html/template](https://pkg.go.dev/html/template), a html templating library included in the stdlib of Go\n- [Echo](https://echo.labstack.com/), a Go web framework\n- [Turbo](https://turbo.hotwire.dev/), part of [Hotwire](https://hotwire.dev/) a new approach from Basecamp for writing modern web applications without much JavaScript\n- [tailwindcss](https://tailwindcss.com/), makes HTML look nice\n- [webpack](https://webpack.js.org/), for packing JS and CSS into single files, with minimization enabled, setup to extract CSS to a seperate file \n- [Air](https://github.com/cosmtrek/air), for hot reloading Go code and templates on change.\n\n## Setup\nYou need to have [go](https://golang.org/dl/) and [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) installed.\n\nThen run:\n```sh\ngo get -u github.com/cosmtrek/air\ngit clone https://github.com/lu4p/go-template-turbo-sample.git\ncd templates-turbo-sample\nnpm install\nnpm run dev\n```\n\nAfter the above just run `air`, to start the webapp with hot reloading.\n\n**Note:** The generated `dist/main.css` file is rather large now at ~6MB, but don't worry this is only because every possible class of tailwind is included (there a many), once you build for production only ~4KB of CSS is left.\n\nIf you want to also rebuild the JS and CSS on change run `npm run watch` in a separate terminal session.\n\nTo build for production run `npm run prod` and `go build`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flu4p%2Fgo-template-turbo-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flu4p%2Fgo-template-turbo-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flu4p%2Fgo-template-turbo-sample/lists"}