Taking inspiration from the great js.org project we at @denosaurs thought of giving something back to the deno community: a free and sleek URL where you can host a free website for your deno project.
Pretty simple.
Find a static site hosting service (we recommend GitHub Pages) and create your site. If you need some inspiration, this site is built and hosted with GitHub Pages and deployed with GitHub Actions.
Now you should determine your mod.land subdomain: either choose your username or the name of your repository, according to the existing GitHub Pages URL (for http://foo.github.io/bar, either "foo.mod.land" or "bar.mod.land" would be possible).
Add a file named "CNAME" to your root directory of your repository (or in the "gh-pages" branch, if you use that) with a single line matching the domain you have chosen (e.g. "foo.mod.land" without quotes). For more info about this step you can follow the Custom URLs section at GitHub Pages Help.
+ foo.mod.land
To finish the procedure, make a pull request in our GitHub repository that adds your subdomain to the list of existing mod.land domains. Your new URL should go live within 24 hours (keep an eye on your pull request in case of a naming conflict or a question from our side).
import { CNAMEs } from "./mod/types.ts";
export default <CNAMEs> {
"@": {
target: "denosaurs.github.io/mod.land",
},
+ "foo": {
+ target: "foo.github.io/bar",
+ }
};
Our subdomain are CNAME records which map one domain name to another. You can actually point your mod.land to many different services like Vercel or Netlify.
As the owner of the repository, you keep complete control over your published content. That also means that all rights and duties that come along with publishing a GitHub Page (e.g. GDPR) remain in your responsibility.
... to Cloudflare for their superb DNS service that makes this possible. Many thanks!