{"id":25668464,"url":"https://github.com/borud/customdomain","last_synced_at":"2025-02-24T10:34:05.256Z","repository":{"id":57657051,"uuid":"459195752","full_name":"borud/customdomain","owner":"borud","description":"Demo of Go packages on custom domains","archived":false,"fork":false,"pushed_at":"2022-02-14T14:56:54.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-20T06:38:24.255Z","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/borud.png","metadata":{"files":{"readme":"README.md","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":"2022-02-14T14:30:10.000Z","updated_at":"2024-03-06T10:02:12.000Z","dependencies_parsed_at":"2022-08-26T04:10:28.523Z","dependency_job_id":null,"html_url":"https://github.com/borud/customdomain","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/borud%2Fcustomdomain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borud%2Fcustomdomain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borud%2Fcustomdomain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borud%2Fcustomdomain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borud","download_url":"https://codeload.github.com/borud/customdomain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240462584,"owners_count":19805322,"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":"2025-02-24T10:34:04.622Z","updated_at":"2025-02-24T10:34:05.250Z","avatar_url":"https://github.com/borud.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go packages on custom domain\n\nThis is a recipe for how you put your Github hosted packages on a custom domain.  We are going to use this repository as an example.  It contains a package called `customdomain` and the `go.mod` file looks like this:\n\n```text\nmodule borud.no/customdomain\n\ngo 1.17\n```\n\nIn order to redirect the Go tools to this github repository we need to create an HTML file that looks like this:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003ctitle\u003ecustomdomain\u003c/title\u003e\n    \u003cmeta name=\"go-import\" content=\"borud.no/customdomain git https://github.com/borud/customdomain\"\u003e\n    \u003cmeta name=\"go-source\" content=\"borud.no/customdomain https://github.com/borud/customdomain https://github.com/borud/customdomain/tree/master{/dir} https://github.com/borud/customdomain/blob/master{/dir}/{file}#L{line}\"\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003ch1\u003ecustomdomain\u003c/h1\u003e\n    Description here.\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nSubstitute for whatever your domain name, package name and github repository should be and you now have a custom domain name in your package name.\n\n## Using this package\n\n```go\npackage main\n\nimport \"borud.no/customdomain\"\n\nfunc main() {\n  dummy := customdomain.Sometype{}\n  dummy.Hello()\n}\n```\n\n## Private repositories\n\nIf you are using private repositories you want to specify the `git+ssh` URL rather than the `https` URL for the actual repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborud%2Fcustomdomain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborud%2Fcustomdomain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborud%2Fcustomdomain/lists"}