{"id":16800232,"url":"https://github.com/abiosoft/gopages","last_synced_at":"2025-03-17T05:17:29.501Z","repository":{"id":137636323,"uuid":"32142922","full_name":"abiosoft/gopages","owner":"abiosoft","description":"Automatically exported from code.google.com/p/gopages","archived":false,"fork":false,"pushed_at":"2015-03-13T13:08:43.000Z","size":156,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T14:49:47.671Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abiosoft.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-13T08:23:32.000Z","updated_at":"2015-03-13T13:08:44.000Z","dependencies_parsed_at":"2023-03-13T21:01:09.634Z","dependency_job_id":null,"html_url":"https://github.com/abiosoft/gopages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2Fgopages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2Fgopages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2Fgopages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abiosoft%2Fgopages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abiosoft","download_url":"https://codeload.github.com/abiosoft/gopages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243976472,"owners_count":20377691,"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-13T09:31:44.871Z","updated_at":"2025-03-17T05:17:29.483Z","avatar_url":"https://github.com/abiosoft.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"// Copyright 2010 Abiola Ibrahim \u003cabiola89@gmail.com\u003e. All rights reserved.\n// Use of this source code is governed by New BSD License\n// http://www.opensource.org/licenses/bsd-license.php\n// The content and logo is governed by Creative Commons Attribution 3.0\n// The mascott is a property of Go governed by Creative Commons Attribution 3.0\n// http://creativecommons.org/licenses/by/3.0/\n\ngopages - http://code.google.com/p/gopages\n======\n\nA simple web framework that allows embedding pages in \u003c?go ?\u003e tags.\n\nINSTALL\n============\n-Command\n$ go get code.google.com/p/gopages\n-Package\n$ go get code.google.com/p/gopages/pkg\n\nEXAMPLES\n========\n$ go get code.google.com/p/gopages/examples\n-Run\n$ $GOPATH/bin/examples\n\nHELLO WORLD\n\ncreate a folder 'hello'\n\ncreate an index.ghtml\n-------\n \u003chtml\u003e \n \t\u003cbody\u003e \n \t\u003c?go print(\"\u003ch1\u003eHello World\u003c/h1\u003e\") ?\u003e \n \t\u003c/body\u003e \n \u003c/html\u003e \n-------\nthen create hello.go\n-------\n package main\n \n import (\n \t_ \"code.google.com/p/gopages/examples/pages\"\t\n\t\"code.google.com/p/gopages/pkg\"\n\t\"net/http\"\n )\n \n func main(){\n    http.HandleFunc(\"/\", gopages.Handler(\"hello.ghtml\"))\n    http.ListenAndServe(\":9999\", nil)\n }\n-------\n\nopen terminal\n\n$ cd path/to/project\n$ gopages get\n$ $GOPATH/bin/hello\n\nfinally, point your browser to localhost:9999 \n\nHOW IT WORKS\n============\ngopages generates go source codes to \"pages\" directory in your project folder.\nIt is REQUIRED to run 'gopages' before 'go get' to build the whole project\nOr run 'gopages get' to build with 'go get' after generating pages\n\nINBUILT FUNCTIONS\n- print(...interface{})\n- formValue(string) - retrieve formValue\n\nVARIABLES\nwriter http.ResponseWriter\nrequest *http.Request\n\nTAGS\n=====\n-CODE\n\t\u003c?go ?\u003e \n\te.g. \t\"\u003cp\u003e \u003c?go print(i) ?\u003e\"\n-FRAGMENTS\n\t\u003cgo:include page=\"path/to/fragment\" /\u003e\n\te.g. \t\u003cgo:include page=\"fragments/login.ghtml\" /\u003e\n\t\t\t\u003cgo:include page=\"fragments/footer.html\" /\u003e\n\n\t\nADDING SETTINGS\n===============\ncreate a pages.json file in project root with the format below.\n\n{\n\t\"extensions\" : \"ghtml\",\n\t\"folders\" : \"src\"\n}\n\nextensions - files to generate gopages for [optional][default is \"ghtml\"]\nfolders - folders to look for gopages files [optional][default is project root]\n-separate multiple values with space. e.g. \"extensions\": \"ghtml ghtm\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabiosoft%2Fgopages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabiosoft%2Fgopages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabiosoft%2Fgopages/lists"}